fix formatting, add info about black
This commit is contained in:
parent
235c9fdb2a
commit
b5c5db85c2
3 changed files with 12 additions and 3 deletions
3
.githooks/pre-commit
Normal file
3
.githooks/pre-commit
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
echo "Formatting all python files with Black"
|
||||
black .
|
|
@ -1 +1,6 @@
|
|||
# Nginx configurator (patent for that name is pending...)
|
||||
|
||||
|
||||
|
||||
# Contributions
|
||||
Please use `black` formatter.
|
5
n-gen.py
5
n-gen.py
|
@ -1,17 +1,18 @@
|
|||
import json
|
||||
import pyinputplus as pyip
|
||||
from jinja2 import Environment, PackageLoader, select_autoescape
|
||||
|
||||
# Get clusters from json config
|
||||
with open("clusters.json") as json_file:
|
||||
CLUSTERS = json.load(json_file)["clusters"]
|
||||
|
||||
# Setup Jinja2
|
||||
from jinja2 import Environment, PackageLoader, select_autoescape
|
||||
jin = Environment(loader=PackageLoader("n-gen"), autoescape=select_autoescape())
|
||||
|
||||
# ID of next config - TBD
|
||||
# ID of next config - TBD - read this from list of configs and increment!
|
||||
CONF_ID = 1
|
||||
|
||||
|
||||
def get_domains():
|
||||
new_domain = True
|
||||
domains = []
|
||||
|
|
Loading…
Reference in a new issue