From 21253ff6e798356aff97479ca0d80326bcf0e9b3 Mon Sep 17 00:00:00 2001 From: Hemna Date: Tue, 15 Dec 2020 10:51:02 -0500 Subject: [PATCH 1/2] Updated README with a TOC This patch updates the README.rst to include an index table at the top as well as a section describing building and using the docker container --- README.rst | 55 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 2cd34b8..7b1dfa8 100644 --- a/README.rst +++ b/README.rst @@ -11,6 +11,8 @@ APRSD .. image:: https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336 :target: https://timothycrosley.github.io/isort/ +.. contents:: :local: + Listen on amateur radio aprs-is network for messages and respond to them. You must have an amateur radio callsign to use this software. Put your callsign in the "USER" variable and update your aprs-is password in "PASS". @@ -50,7 +52,7 @@ Installation: pip install aprsd Example usage: --------------- +============== aprsd -h @@ -58,7 +60,7 @@ Example output: --------------- SEND EMAIL (radio to smtp server) ---------------------------------- +================================= :: @@ -80,7 +82,7 @@ SEND EMAIL (radio to smtp server) RECEIVE EMAIL (imap server to radio) ------------------------------------- +==================================== :: @@ -97,7 +99,7 @@ RECEIVE EMAIL (imap server to radio) WEATHER -------- +======= :: @@ -125,7 +127,7 @@ WEATHER LOCATION --------- +======== :: @@ -157,6 +159,9 @@ AND... ping, fortune, time..... Development ----------- +Workflow +======== + While working aprsd, The workflow is as follows * Edit code, save file @@ -167,7 +172,7 @@ While working aprsd, The workflow is as follows Release -------- +======= To do release to pypi: @@ -192,3 +197,41 @@ To do release to pypi: twine upload dist/* + +Docker Container +---------------- + +Building +======== + +There are 2 versions of the container Dockerfile that can be used. +The main Dockerfile, which is for building the official release container +based off of the pip install version of aprsd and the Dockerfile-dev, +which is used for building a container based off of a git branch of +the repo. + +Official Build +============== + + docker build -t hemna6969/aprsd:latest . + +Development Build +================= + + docker build -t hemna6969/aprsd:latest -f Dockerfile-dev . + + +Running the container +===================== + +There is a docker-compose.yml file that can be used to run your container. +There are 2 volumes defined that can be used to store your configuration +and the plugins directory: /config and /plugins + +If you want to install plugins at container start time, then use the +environment var in docker-compose.yml specified as APRS_PLUGINS +Provide a csv list of pypi installable plugins. Then make sure the plugin +python file is in your /plugins volume and the plugin will be installed at +container startup. The plugin may have dependencies that are required. +The plugin file should be copied to /plugins for loading by aprsd + From 8a6273867cc9bd341f4c4ed628048c932320cf8e Mon Sep 17 00:00:00 2001 From: Hemna Date: Tue, 15 Dec 2020 11:10:46 -0500 Subject: [PATCH 2/2] Updated loggin timestamp to include [] Added timestamp inside of [] for easier parsing --- aprsd/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aprsd/main.py b/aprsd/main.py index 6058a40..0c6c2a2 100644 --- a/aprsd/main.py +++ b/aprsd/main.py @@ -676,7 +676,7 @@ def setup_logging(loglevel, quiet): log_level = levels[loglevel] LOG.setLevel(log_level) - log_format = "%(asctime)s [%(threadName)-12s] [%(levelname)-5.5s]" " %(message)s" + log_format = "[%(asctime)s] [%(threadName)-12s] [%(levelname)-5.5s]" " %(message)s" date_format = "%m/%d/%Y %I:%M:%S %p" log_formatter = logging.Formatter(fmt=log_format, datefmt=date_format) fh = RotatingFileHandler(