diff options
author | zachir <zachir@librem.one> | 2023-03-12 23:45:49 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2023-03-12 23:45:49 -0500 |
commit | b9628ab8b8583fb6e37688acbf7d9f5139737b75 (patch) | |
tree | ada3da1fae7bf92d81013d659686726cc996c8ba /proj.py | |
parent | c20ba67adaf3dcb5a1ce2b39d00f123e17b0cf7d (diff) |
move proj and ups scripts to a work repo
Diffstat (limited to 'proj.py')
-rwxr-xr-x | proj.py | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/proj.py b/proj.py deleted file mode 100755 index a85b38c..0000000 --- a/proj.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python3 - -from pysdcp import Projector -from time import sleep -import sys - -PROJ_IP_ADDRESS="10.45.0.100" - -args_len = len(sys.argv) - -first_part = "" -is_second_part = False - -if args_len == 1: - exit() - -pj = Projector(PROJ_IP_ADDRESS) - -for i in range(1, args_len): - if is_second_part == False: - if sys.argv[i] == "power": - is_second_part = True - elif sys.argv[i] == "mute": - is_second_part = True - elif sys.argv[i] == "sleep": - is_second_part = True - else: - print("Command not understood.") - exit() - first_part = sys.argv[i] - else: - is_second_part = False - if first_part == "sleep": - try: - s = float(sys.argv[i]) - except ValueError: - print(f"Value {sys.argv[i]} doesn't look like a number!") - continue - sleep(s) - elif first_part == "power": - if sys.argv[i] == "on": - pj.set_power(True) - elif sys.argv[i] == "off": - pj.set_power(False) - elif sys.argv[i] == "get": - print(pj.get_power()) - else: - print("Command not understood.") - elif first_part == "mute": - if sys.argv[i] == "on": - pj.set_mute(True) - elif sys.argv[i] == "off": - pj.set_mute(False) - elif sys.argv[i] == "get": - print(pj.get_mute()) - else: - print("Command not understood.") |