From 49c798f7de55472fa6cab6ca04aaf9ae554f92ec Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Mon, 27 Aug 2018 11:05:31 +0200 Subject: [PATCH] Adding show-modules-html and show-modules-txt --- show-modules-html | 30 ++++++++++++++++++++++++++++++ show-modules-txt | 30 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100755 show-modules-html create mode 100755 show-modules-txt diff --git a/show-modules-html b/show-modules-html new file mode 100755 index 0000000..4b510ef --- /dev/null +++ b/show-modules-html @@ -0,0 +1,30 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# Standard modules +import os +import sys +import logging + +# own modules: +basedir = os.path.abspath(os.path.dirname(__file__)) +libdir = os.path.join(basedir, 'lib') + +sys.path.insert(0, libdir) + +from webhooks.show_modules import ShowModulesApp + +MY_APPNAME = os.path.basename(sys.argv[0]) +LOG = logging.getLogger(MY_APPNAME) + +app = ShowModulesApp(appname=MY_APPNAME) +app._output_type = 'html' + +if app.verbose > 2: + LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app)) + +app() + +sys.exit(0) + +# vim: ts=4 et diff --git a/show-modules-txt b/show-modules-txt new file mode 100755 index 0000000..697930b --- /dev/null +++ b/show-modules-txt @@ -0,0 +1,30 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# Standard modules +import os +import sys +import logging + +# own modules: +basedir = os.path.abspath(os.path.dirname(__file__)) +libdir = os.path.join(basedir, 'lib') + +sys.path.insert(0, libdir) + +from webhooks.show_modules import ShowModulesApp + +MY_APPNAME = os.path.basename(sys.argv[0]) +LOG = logging.getLogger(MY_APPNAME) + +app = ShowModulesApp(appname=MY_APPNAME) +app._output_type = 'txt' + +if app.verbose > 2: + LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app)) + +app() + +sys.exit(0) + +# vim: ts=4 et -- 2.39.5