aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docker/get_output_dir.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-12-03 03:39:44 +0100
committerEgor Tensin <Egor.Tensin@gmail.com>2022-12-03 03:39:44 +0100
commit3c4941bb88ac6bcfd93e297a922be4b80b8991ea (patch)
treea569764896bfecd6c72d9c757bb5867cac690e7b /docker/get_output_dir.py
parentdocker: refactor entrypoint.sh (diff)
downloadcgitize-3c4941bb88ac6bcfd93e297a922be4b80b8991ea.tar.gz
cgitize-3c4941bb88ac6bcfd93e297a922be4b80b8991ea.zip
docker: chmod o-rwx the output directory
Diffstat (limited to '')
-rwxr-xr-xdocker/get_output_dir.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/docker/get_output_dir.py b/docker/get_output_dir.py
new file mode 100755
index 0000000..9c21a72
--- /dev/null
+++ b/docker/get_output_dir.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+
+from argparse import ArgumentParser
+import sys
+
+from cgitize.config import Config
+
+
+def parse_args(argv=None):
+ if argv is None:
+ argv = sys.argv[1:]
+ parser = ArgumentParser()
+ parser.add_argument('config', metavar='PATH',
+ help='config file path')
+ return parser.parse_args(argv)
+
+
+def main(argv=None):
+ args = parse_args(argv)
+ cfg = Config.read(args.config)
+ print(cfg.main.output_dir)
+
+
+if __name__ == '__main__':
+ main()