diff --git a/companion_software/houston/__main__.py b/companion_software/houston/__main__.py index 8d6b3d4..55beadd 100644 --- a/companion_software/houston/__main__.py +++ b/companion_software/houston/__main__.py @@ -1,8 +1,9 @@ -import time import logging import verboselogs import coloredlogs +from houston import Houston + # Install verbose logs verboselogs.install() @@ -13,15 +14,10 @@ logger = logging.getLogger('Houston_Log') # Install colored logs coloredlogs.install(level='INFO', logger=logger, - fmt='%(asctime)s,%(msecs)03d %(hostname)s %(levelname)s %(message)s') + fmt='%(asctime)s,%(msecs)03d %(hostname)s %(levelname)s %(message)s') # noqa: E501 logger.info('Lewis Companion Software Started.') -logger.success('Ready to robot!') -# Junk~ -while True: - try: - logger.debug('Nothing to do.') - time.sleep(1) - except KeyboardInterrupt: - break +if __name__ == '__main__': + app = Houston(logger) + app.run() diff --git a/companion_software/houston/houston.py b/companion_software/houston/houston.py new file mode 100644 index 0000000..8843a59 --- /dev/null +++ b/companion_software/houston/houston.py @@ -0,0 +1,21 @@ +# Lewis Crawler +# 2021 - 2022 +# Kitsune Scientific + +import time + + +class Houston: + def __init__(self, logger): + self.log = logger + + def run(self): + self.log.success('Ready to robot!') + + # Junk~ + while True: + try: + self.log.debug('Nothing to do.') + time.sleep(1) + except KeyboardInterrupt: + break