diff options
| author | Scott Gasch <[email protected]> | 2021-03-24 18:08:54 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2021-03-24 18:08:54 -0700 |
| commit | 497fb9e21f45ec08e1486abaee6dfa7b20b8a691 (patch) | |
| tree | 47aa97a0fca36c4e7025cee5ad4e9ec6db49b881 /orb_utils.py | |
Initial revision
Diffstat (limited to 'orb_utils.py')
| -rw-r--r-- | orb_utils.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/orb_utils.py b/orb_utils.py new file mode 100644 index 0000000..5bc6d1a --- /dev/null +++ b/orb_utils.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 + +"""Utilities related to changing the orb's color.""" + +import os + +import config + + +parser = config.add_commandline_args( + f"Orb Utils ({__file__})", + "Args having to do with controlling Scott's Orb.", +) +parser.add_argument( + "--orb_utils_file_location", + default="/Users/scott/orb_color", + metavar="FILENAME", + type=str, + help="The location of the orb file on whatever machine is hosting it." +) +parser.add_argument( + "--orb_utils_user_machine", + default="[email protected]", + metavar="USER@HOSTNAME", + type=str, + help="The username/machine combo that is hosting the orb." +) + + +def make_orb(color: str) -> None: + user_machine = config.config['orb_utils_user_machine'] + orbfile_path = config.config['orb_utils_file_location'] + os.system( + f"ssh {user_machine} 'echo \"{color}\" > {orbfile_path}'" + ) |
