From 5e42af488b4e1305622af4cf239d8a3b7a05424b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20S=C5=82omkowski?= Date: Thu, 9 Jun 2016 02:25:29 +0200 Subject: [PATCH] Add project bootstrap. --- .gitignore | 7 +++++++ README.md | 5 +++++ nginxfmt.py | 11 +++++++++++ 3 files changed, 23 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100755 nginxfmt.py 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()