Skip to content

Commit 3180dc6

Browse files
committed
doc: use generated config.ini in reference.txt
Deleted the manually maintained config.ini reference items. Lost a few nice index references along the way but... Updated configuration.py with longer descriptions from the manually maintained items where appropriate. Checking in the generated tracker_config.txt and the Makefile used to generate the config and the man pages and then generate local documentation using setup.py build_docs.
1 parent 64d31bb commit 3180dc6

File tree

4 files changed

+1294
-446
lines changed

4 files changed

+1294
-446
lines changed

doc/Makefile

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
all: man_html tracker_config.txt
2+
cd ..; ./setup.py build_doc
3+
4+
tracker_config.txt: ../roundup/configuration.py
5+
# generate a current config file
6+
python3 ../roundup/scripts/roundup_admin.py \
7+
genconfig _temp_config.txt
8+
9+
## format and add directives to config file
10+
# 1. delete first 8 lines of comments (1,8d)
11+
# Some sections have a comment block before the section
12+
# [main] Put the comment block with the section marker
13+
# after the index/code directives. To do this:
14+
# 2. Store all comment and blank lines in the hold space
15+
# (H). Delete the current line and continue with the
16+
# next line (d).
17+
# 3. When we see a section marker, append the section
18+
# marker to the hold space (H). substitute for the
19+
# section marker index and code directives
20+
# (s/.../.../) using the section name (\1) for the
21+
# index. Print the directives (p). Empty (zero) the
22+
# pattern space (z). Pull the hold space to the
23+
# pattern space (x) (which also empties the hold space
24+
# because of (z). Print the new pattern space
25+
# [comments and section marker] (p). Delete the patern
26+
# space and process next input line (d).
27+
# 4. For any other line, append the line to the hold
28+
# space (H). Zero out the pattern buffer (z). Swap the
29+
# hold space and pattern space [comments and setting
30+
# line] (x).
31+
#
32+
# Automatically print the pattern space after the last
33+
# command because we are not using 'sed -n'.
34+
#
35+
# The last sed command indents every line that is not
36+
# empty or does not start with '..' (a directive) with
37+
# two spaces.
38+
# The cat -s squeezes adjacent blank lines to 1 blank
39+
# line.
40+
@sed -e '1,8d' \
41+
-e '/^\#\|^$$/{H;d}' \
42+
-e '/^\[\([a-z]*\)\]/{H; s/^\[\([a-z]*\)\]/\n.. index:: config.ini; sections \1\n\n.. code:: ini/; p; z; x; p; d}' \
43+
-e '/./{H;z;x}' \
44+
_temp_config.txt | \
45+
sed -e '/^\.\.\|^$$/!s/^/ /' | \
46+
cat -s > tracker_config.txt
47+
rm -f _temp_config.txt
48+
49+
## generate html versions of man pages for inclusion in documentation
50+
# find all man pages and generate output file paths.
51+
MAN_ROFF=$(wildcard ../share/man/man1/*.1)
52+
MAN_HTML=$(patsubst ../share/man/man1/%.1,html_extra/man_pages/%.1.html,$(MAN_ROFF))
53+
54+
man_html: $(MAN_HTML)
55+
56+
html_extra/man_pages/%.1.html: ../share/man/man1/%.1
57+
man --html=cat $< > $@
58+
#man2html $< > $@
59+
60+
clean:
61+
rm -f _temp_config.txt tracker_config.txt \
62+
html_extra/man_pages/*.1.html

0 commit comments

Comments
 (0)