From 573932879a12a3919264ab5fc1f230773cd38d35 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Tue, 12 Nov 2024 07:47:35 -0800 Subject: [PATCH] doc: show full preference names --- .../archive_reader_json_preferences.properties | 4 ++++ docs/source/conf.py | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/app/databrowser-json/src/main/resources/archive_reader_json_preferences.properties b/app/databrowser-json/src/main/resources/archive_reader_json_preferences.properties index 359b0f1813..0ac7881f56 100644 --- a/app/databrowser-json/src/main/resources/archive_reader_json_preferences.properties +++ b/app/databrowser-json/src/main/resources/archive_reader_json_preferences.properties @@ -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 diff --git a/docs/source/conf.py b/docs/source/conf.py index 47809f63d4..58c72db57f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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")