Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: show full preference names #3189

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# ---------------------------------------
# Package org.phoebus.archive.reader.json
# ---------------------------------------

# Shall a precision of zero for a floating-point value result in this value
# using a number format without fractional digits (true) or shall it be treated
# as an indication that the value should be rendered with a default number of
Expand Down
16 changes: 16 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,15 +340,31 @@ def createPreferenceAppendix(root):

""")
for pack in sorted(pref_files.keys()):
pkgname = None
pref_file = pref_files[pack]
out.write("\n")
out.write(pack + "\n")
out.write(("-" * len(pack)) + "\n")
out.write("\n")
out.write("File " + pref_file + "::\n\n")
print('processing', pref_file)
with open(pref_file) as prefs:
for line in prefs:
# expect lines like:
# 1) Special comment with package id.
# '# Package org.phoebus.applications.alarm\n'
# 2) ignore...
# '--------------\n'
# '# ... ignore ...\n'
# ' \n'
# 4) preference
# 'key = value'
line = line.strip()
if line.startswith('# Package'):
pkgname = line.split(' ')[2]
elif line[:1] not in ('', '#', '-'):
assert pkgname is not None, pref_file # preference file missing "# Package ..." name line
line = '%s/%s'%(pkgname, line)
out.write(" " + line + "\n")
out.write("\n")

Expand Down
Loading