Mercurial > p > roundup > code
annotate doc/Makefile @ 8209:9d2ad7386627
chore(ruff): use names not magic numbers.
This one names the 32 chars as being equivalent to 256 bytes
Also adds the missing http_.client.TOO_MANY_REQUESTS under python 2 to
http_. It allows me to use a symbolic name and not have to touch
client.py code when I remove python2 support from http_.
Also the prior checkin had a bogus commit message. Sigh, time to step
away from the computer today 8-). It replaced a magic number with
MAX_MIME_EXTENSION_LENGTH which was set to a better magic number
derived by parsing extensions in /etc/mime.types.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 11 Dec 2024 16:24:16 -0500 |
| parents | d4fbfc6a7662 |
| children | 8824c81cc431 |
| rev | line source |
|---|---|
|
8096
ea1f377c87d6
docs: add roundup-admin interactive help output to admin_guide.txt
John Rouillard <rouilj@ieee.org>
parents:
8075
diff
changeset
|
1 all: man_html tracker_config.txt admin_help.html |
|
7920
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
2 cd ..; ./setup.py build_doc |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
3 |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
4 tracker_config.txt: ../roundup/configuration.py |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
5 # generate a current config file |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
6 python3 ../roundup/scripts/roundup_admin.py \ |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
7 genconfig _temp_config.txt |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
8 |
|
8036
8b5f8b950f58
docs: add section anchors to config.ini in references.txt; change format
John Rouillard <rouilj@ieee.org>
parents:
7920
diff
changeset
|
9 awk -f format_config.awk _temp_config.txt | \ |
|
8b5f8b950f58
docs: add section anchors to config.ini in references.txt; change format
John Rouillard <rouilj@ieee.org>
parents:
7920
diff
changeset
|
10 cat -s > tracker_config.txt |
|
7920
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
11 rm -f _temp_config.txt |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
12 |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
13 ## generate html versions of man pages for inclusion in documentation |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
14 # find all man pages and generate output file paths. |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
15 MAN_ROFF=$(wildcard ../share/man/man1/*.1) |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
16 MAN_HTML=$(patsubst ../share/man/man1/%.1,html_extra/man_pages/%.1.html,$(MAN_ROFF)) |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
17 |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
18 man_html: $(MAN_HTML) |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
19 |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
20 html_extra/man_pages/%.1.html: ../share/man/man1/%.1 |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
21 man --html=cat $< > $@ |
|
8075
08fcbdfe670b
docs: set max width for man page paragraphs to 65ch
John Rouillard <rouilj@ieee.org>
parents:
8036
diff
changeset
|
22 # set max width for paragraphs |
|
08fcbdfe670b
docs: set max width for man page paragraphs to 65ch
John Rouillard <rouilj@ieee.org>
parents:
8036
diff
changeset
|
23 sed -i '/<style/,/<\/style/s/\(p\s* { \)margin/\1max-width: 65ch; margin/' $@ |
|
8116
d4fbfc6a7662
docs: add canonical link for all generated man pages
John Rouillard <rouilj@ieee.org>
parents:
8096
diff
changeset
|
24 # add link rel=cannonical $@(F) takes |
|
d4fbfc6a7662
docs: add canonical link for all generated man pages
John Rouillard <rouilj@ieee.org>
parents:
8096
diff
changeset
|
25 # target $@ (html_extra/man_pages/x.1.html) |
|
d4fbfc6a7662
docs: add canonical link for all generated man pages
John Rouillard <rouilj@ieee.org>
parents:
8096
diff
changeset
|
26 # and returns file part (x.1.html) |
|
d4fbfc6a7662
docs: add canonical link for all generated man pages
John Rouillard <rouilj@ieee.org>
parents:
8096
diff
changeset
|
27 sed -i '/<head>/,/<\/head>/s#^<style#<link rel="canonical" href="https://www.roundup-tracker.org/docs/man_pages/$(@F)">\n<style#' $@ |
|
7920
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
28 #man2html $< > $@ |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
29 |
|
8096
ea1f377c87d6
docs: add roundup-admin interactive help output to admin_guide.txt
John Rouillard <rouilj@ieee.org>
parents:
8075
diff
changeset
|
30 admin_help.html: ../roundup/admin.py |
|
ea1f377c87d6
docs: add roundup-admin interactive help output to admin_guide.txt
John Rouillard <rouilj@ieee.org>
parents:
8075
diff
changeset
|
31 python3 ../roundup/scripts/roundup_admin.py htmlhelp > admin_help.py |
|
ea1f377c87d6
docs: add roundup-admin interactive help output to admin_guide.txt
John Rouillard <rouilj@ieee.org>
parents:
8075
diff
changeset
|
32 |
|
7920
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
33 clean: |
|
6aa0525187cd
doc: use generated config.ini in reference.txt
John Rouillard <rouilj@ieee.org>
parents:
diff
changeset
|
34 rm -f _temp_config.txt tracker_config.txt \ |
|
8096
ea1f377c87d6
docs: add roundup-admin interactive help output to admin_guide.txt
John Rouillard <rouilj@ieee.org>
parents:
8075
diff
changeset
|
35 html_extra/man_pages/*.1.html \ |
|
ea1f377c87d6
docs: add roundup-admin interactive help output to admin_guide.txt
John Rouillard <rouilj@ieee.org>
parents:
8075
diff
changeset
|
36 admin_help.py |
