You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-10Lines changed: 27 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,26 @@
1
-
# *nginx* config file formatter
1
+
# *nginx* config file formatter/beautifier
2
2
3
-
This Python script formats *nginx* configuration files in consistent way, described below:
3
+
*nginx* config file formatter/beautifier written in Python with no additional dependencies. It can be used as library or standalone script. It formats *nginx* configuration files in consistent way, described below:
4
+
5
+
* All lines are indented in uniform manner, with 4 spaces per level. Number of spaces is customizable.
6
+
* Neighbouring empty lines are collapsed to at most two empty lines.
7
+
* Curly braces placement follows Java convention.
8
+
* Whitespaces are collapsed, except in comments and quotation marks.
4
9
5
-
* all lines are indented in uniform manner, with 4 spaces per level
6
-
* neighbouring empty lines are collapsed to at most two empty lines
7
-
* curly braces placement follows Java convention
8
-
* whitespaces are collapsed, except in comments and quotation marks
9
10
10
11
## Installation
11
12
12
-
Python 3.4 or later is needed to run this program. The simplest form of installation would be copying `nginxfmt.py` to
13
-
your scripts directory.
13
+
Python 3.4 or later is needed to run this program. The easiest way is to download package from PyPI:
14
+
15
+
```bash
16
+
pip3 install nginxfmt
17
+
```
18
+
19
+
20
+
### Manual installation
21
+
22
+
The simplest form of installation would be copying `nginxfmt.py` to
23
+
your scripts directory. It has no 3-rd party dependencies.
14
24
15
25
You can also clone the repository and symlink the executable:
0 commit comments