From: Frank Brehm Date: Mon, 27 Aug 2018 09:05:31 +0000 (+0200) Subject: Adding show-modules-html and show-modules-txt X-Git-Tag: 0.10.7^2~6 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=49c798f7de55472fa6cab6ca04aaf9ae554f92ec;p=pixelpark%2Fpuppetmaster-webhooks.git Adding show-modules-html and 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