commit 5e42af488b4e1305622af4cf239d8a3b7a05424b Author: Michał Słomkowski Date: Thu Jun 9 02:25:29 2016 +0200 Add project bootstrap. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..be3979b --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +# IntelliJ project files +.idea +*.iml + +test-files + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..bbeebcb --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# THIS PROJECT IS WORK IN PROGRESS + +# nginx config file formatter + +Formats *nginx* configuration files. \ No newline at end of file diff --git a/nginxfmt.py b/nginxfmt.py new file mode 100755 index 0000000..b592824 --- /dev/null +++ b/nginxfmt.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +import argparse + +argparser = argparse.ArgumentParser() + +argparser.add_argument("-v", "--verbose", action="store_true", help="show formatted file names") +argparser.add_argument("-b", "--backup-original", action="store_true", help="backup original config file") +argparser.add_argument("config_file", type=argparse.FileType('r'), nargs='+') + +args = argparser.parse_args()