From d8ac75650a1c8198c9fe145f586f2b5917616374 Mon Sep 17 00:00:00 2001 From: varkenvarken Date: Sun, 10 Jul 2022 11:24:37 +0200 Subject: [PATCH] documentation and cleanup --- .vscode/tasks.json | 12 ++++++++++++ pylnlib/__main__.py | 27 +++++++++++++++++++++------ 2 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 .vscode/tasks.json diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..df3f251 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,12 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "mkdocs", + "type": "shell", + "command": "PYTHONPATH=`pwd` mkdocs gh-deploy --force" + } + ] +} \ No newline at end of file diff --git a/pylnlib/__main__.py b/pylnlib/__main__.py index 41d71e3..8c6361a 100755 --- a/pylnlib/__main__.py +++ b/pylnlib/__main__.py @@ -4,16 +4,31 @@ # # License: GPL 3, see file LICENSE # -# Version: 20220626170320 +# Version: 20220710112411 + +""" +Module to allow pylnlib to be invoked as a module. + +Example: +``` +python -m pylnlib +``` + +If invoked this way, it will start listening for data on a serial interface +and will report any incoming messages. Incoming messages related to unknown +slots, switches or sensors will trigger outgoing status request messages. + +It can both capture and replay messages. For more info run it with the -- help option + +``` +python -m pylnlib --help +``` + +""" -import argparse -import sys -import time from threading import Thread from time import sleep -from .Interface import Interface -from .Scrollkeeper import Scrollkeeper from .Utils import Args, createInterface, createScrollkeeper, reporter if __name__ == "__main__":