Commit dee2b990 authored by Pierre Dittgen's avatar Pierre Dittgen
Browse files

Don't add 'errors' subdirectory in target directory

parent 030be10f
...@@ -44,12 +44,10 @@ def generate_documentation(JSON_SPEC_FILE="spec-fr_FR.json", TARGET_DIR="./"): ...@@ -44,12 +44,10 @@ def generate_documentation(JSON_SPEC_FILE="spec-fr_FR.json", TARGET_DIR="./"):
''' '''
assert os.path.exists(TARGET_DIR) assert os.path.exists(TARGET_DIR)
assert os.path.exists(JSON_SPEC_FILE) assert os.path.exists(JSON_SPEC_FILE)
root_dir = os.path.join(TARGET_DIR, "errors")
if not os.path.exists(root_dir):
os.makedirs(root_dir)
with open(JSON_SPEC_FILE, "r", encoding="utf-8") as _file: with open(JSON_SPEC_FILE, "r", encoding="utf-8") as _file:
specs = json.load(_file) specs = json.load(_file)
root_dir = TARGET_DIR
readme = os.path.join(root_dir, "index.md") readme = os.path.join(root_dir, "index.md")
index_content = [] index_content = []
for error_id, error in specs["errors"].items(): for error_id, error in specs["errors"].items():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment