Executable added
This commit is contained in:
@@ -4,6 +4,9 @@ version = "0.1.0"
|
|||||||
description = ""
|
description = ""
|
||||||
authors = ["Marijn Doeve <marijn@doeve.me>"]
|
authors = ["Marijn Doeve <marijn@doeve.me>"]
|
||||||
|
|
||||||
|
[tool.poetry.scripts]
|
||||||
|
projectorpi = "projectorpi.cli:main"
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.9"
|
python = "^3.9"
|
||||||
pyserial = "^3.5"
|
pyserial = "^3.5"
|
||||||
|
|||||||
0
src/projectorpi/__init__.py
Normal file
0
src/projectorpi/__init__.py
Normal file
@@ -1,12 +1,12 @@
|
|||||||
#! /usr/bin/env python3
|
#! /usr/bin/env python3
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from projector import ProjectorSerial
|
from .projector import ProjectorSerial
|
||||||
from extron import ExtronSerial
|
from .extron import ExtronSerial
|
||||||
|
|
||||||
verbose = False
|
verbose = False
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def main():
|
||||||
parser = ArgumentParser(
|
parser = ArgumentParser(
|
||||||
prog="projectorpi", description="A tool that turns the projector on and off."
|
prog="projectorpi", description="A tool that turns the projector on and off."
|
||||||
)
|
)
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
# | == carriage return
|
# | == carriage return
|
||||||
from types import LambdaType
|
from types import LambdaType
|
||||||
from typing import Callable
|
from typing import Callable
|
||||||
from serialdevice import SerialDevice
|
from .serialdevice import SerialDevice
|
||||||
|
|
||||||
# \x1b == ESC
|
# \x1b == ESC
|
||||||
C: Callable[[str], str] = lambda command: f"\x1b{command}\r"
|
C: Callable[[str], str] = lambda command: f"\x1b{command}\r"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
from serialdevice import SerialDevice
|
from .serialdevice import SerialDevice
|
||||||
|
|
||||||
STX = chr(0x02)
|
STX = chr(0x02)
|
||||||
ETX = chr(0x03)
|
ETX = chr(0x03)
|
||||||
Reference in New Issue
Block a user