diff --git a/companion_software/dashboard/README.md b/companion_software/README.md similarity index 100% rename from companion_software/dashboard/README.md rename to companion_software/README.md diff --git a/companion_software/dashboard/dash.py b/companion_software/dashboard/dash.py deleted file mode 100644 index cdd2af1..0000000 --- a/companion_software/dashboard/dash.py +++ /dev/null @@ -1,39 +0,0 @@ -import time -import logging -import verboselogs -import coloredlogs - -verboselogs.install() - -# Create a logger object. -hlog = logging.getLogger('Houston_Log') -rlog = logging.getLogger('Robot_Log') - -# By default the install() function installs a handler on the root logger, -# this means that log messages from your code and log messages from the -# libraries that you use will all show up on the terminal. -#coloredlogs.install(level='DEBUG') - - -# If you don't want to see log messages from libraries, you can pass a -# specific logger object to the install() function. In this case only log -# messages originating from that logger will show up on the terminal. -coloredlogs.install(level='INFO', - logger=hlog, - fmt='%(asctime)s,%(msecs)03d %(hostname)s %(levelname)s %(message)s') - -coloredlogs.install(level='INFO', - logger=rlog, - fmt='%(asctime)s,%(msecs)03d Robot %(levelname)s %(message)s') - -hlog.info('Lewis Companion Software Started.') -hlog.success('Ready to robot!') -rlog.info('Logging message from robot!') - -# Junk~ -while True: - try: - hlog.debug('Nothing to do.') - time.sleep(1) - except KeyboardInterrupt: - break diff --git a/companion_software/dashboard/entrypoint.sh b/companion_software/dashboard/entrypoint.sh deleted file mode 100755 index 18a1aaf..0000000 --- a/companion_software/dashboard/entrypoint.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -cd /opt/lewis-crawler/companion_software/dashboard - -git pull - -pipenv install -r requirements.txt - -pipenv run python dash.py diff --git a/companion_software/entrypoint.sh b/companion_software/entrypoint.sh new file mode 100755 index 0000000..6731136 --- /dev/null +++ b/companion_software/entrypoint.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +cd /opt/lewis-crawler/companion_software + +git pull + +pipenv install -r requirements.txt + +pipenv run python houston diff --git a/companion_software/houston/__main__.py b/companion_software/houston/__main__.py new file mode 100644 index 0000000..8d6b3d4 --- /dev/null +++ b/companion_software/houston/__main__.py @@ -0,0 +1,27 @@ +import time +import logging +import verboselogs +import coloredlogs + + +# Install verbose logs +verboselogs.install() + +# Create a logger object. +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') + +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 diff --git a/companion_software/dashboard/requirements.txt b/companion_software/requirements.txt similarity index 100% rename from companion_software/dashboard/requirements.txt rename to companion_software/requirements.txt