]> Frank Brehm's Git Trees - pixelpark/puppetmaster-webhooks.git/commitdiff
Adding show-modules-html and show-modules-txt
authorFrank Brehm <frank.brehm@pixelpark.com>
Mon, 27 Aug 2018 09:05:31 +0000 (11:05 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Mon, 27 Aug 2018 09:05:31 +0000 (11:05 +0200)
show-modules-html [new file with mode: 0755]
show-modules-txt [new file with mode: 0755]

diff --git a/show-modules-html b/show-modules-html
new file mode 100755 (executable)
index 0000000..4b510ef
--- /dev/null
@@ -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 (executable)
index 0000000..697930b
--- /dev/null
@@ -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