Boilerplate
This commit is contained in:
parent
e94f342739
commit
ac4ff7a657
|
@ -1,8 +1,9 @@
|
||||||
import time
|
|
||||||
import logging
|
import logging
|
||||||
import verboselogs
|
import verboselogs
|
||||||
import coloredlogs
|
import coloredlogs
|
||||||
|
|
||||||
|
from houston import Houston
|
||||||
|
|
||||||
|
|
||||||
# Install verbose logs
|
# Install verbose logs
|
||||||
verboselogs.install()
|
verboselogs.install()
|
||||||
|
@ -13,15 +14,10 @@ logger = logging.getLogger('Houston_Log')
|
||||||
# Install colored logs
|
# Install colored logs
|
||||||
coloredlogs.install(level='INFO',
|
coloredlogs.install(level='INFO',
|
||||||
logger=logger,
|
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.info('Lewis Companion Software Started.')
|
||||||
logger.success('Ready to robot!')
|
|
||||||
|
|
||||||
# Junk~
|
if __name__ == '__main__':
|
||||||
while True:
|
app = Houston(logger)
|
||||||
try:
|
app.run()
|
||||||
logger.debug('Nothing to do.')
|
|
||||||
time.sleep(1)
|
|
||||||
except KeyboardInterrupt:
|
|
||||||
break
|
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue