Skip to content

Commit

Permalink
docs: fix config file path
Browse files Browse the repository at this point in the history
  • Loading branch information
sunhoww committed Dec 31, 2021
1 parent b25eb46 commit 9e3e63d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/gen-config-doc.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
#!/usr/bin/python

import re
import os


_KEYS_FILE = os.path.join(
os.path.dirname(__file__), "../src/main/java/org/traccar/config/Keys.java"
)

def get_config_key_descriptions():
desc_re = re.compile(r"(/\*\*\n|\s+\*/|\s+\*)")
key_match_re = re.compile(r"\(\n(.+)\);", re.DOTALL)
key_split_re = re.compile(r",\s+", re.DOTALL)
snippets = []

with open("../src/main/java/org/traccar/config/Keys.java", "r") as f:
with open(_KEYS_FILE, "r") as f:
code = f.read()
config = re.findall(
r"(/\*\*.*?\*/)\n\s+(public static final Config.*?;)", code, re.DOTALL
Expand Down

0 comments on commit 9e3e63d

Please sign in to comment.