Boilerplate

This commit is contained in:
Kenwood 2021-11-27 16:52:55 -05:00
parent e94f342739
commit ac4ff7a657
2 changed files with 27 additions and 10 deletions

View File

@ -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()

View File

@ -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