Boilerplate
This commit is contained in:
parent
e94f342739
commit
ac4ff7a657
|
@ -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()
|
||||
|
|
|
@ -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