Ran black code formatter on everything.
[python_utils.git] / orb_utils.py
1 #!/usr/bin/env python3
2
3 """Utilities related to changing the orb's color."""
4
5 import os
6
7 import config
8
9
10 parser = config.add_commandline_args(
11     f"Orb Utils ({__file__})",
12     "Args having to do with controlling Scott's Orb.",
13 )
14 parser.add_argument(
15     "--orb_utils_file_location",
16     default="/Users/scott/orb_color",
17     metavar="FILENAME",
18     type=str,
19     help="The location of the orb file on whatever machine is hosting it.",
20 )
21 parser.add_argument(
22     "--orb_utils_user_machine",
23     default="[email protected]",
24     metavar="USER@HOSTNAME",
25     type=str,
26     help="The username/machine combo that is hosting the orb.",
27 )
28
29
30 def make_orb(color: str) -> None:
31     user_machine = config.config['orb_utils_user_machine']
32     orbfile_path = config.config['orb_utils_file_location']
33     os.system(f"ssh {user_machine} 'echo \"{color}\" > {orbfile_path}'")