Mercurial > p > roundup > code
annotate doc/Makefile @ 8180:d02ce1d14acd
feat: issue2551068 - Provide way to retrieve file/msg data via rest endpoint.
Use Allow header to change format of /binary_content endpoint. If
Allow header for endpoint is not application/json, it will be matched
against the mime type for the file. */*, text/* are supported and will
return the native mime type if present.
Changes:
move */* mime type from static dict of supported types. It was
hardcoded to return json only. Now it can return a matching
non-json mime type for the /binary_content endpoint.
Edited some errors to explicitly add */* mime type.
Cleanups to use ', ' separation in lists of valid mime types rather
than just space separated.
Remove ETag header when sending raw content. See issue 2551375 for
background.
Doc added to rest.txt.
Small format fix up (add dash) in CHANGES.txt.
Make passing an unset/None/False accept_mime_type to
format_dispatch_output a 500 error. This used to be the fallback
to produce a 406 error after all processing had happened. It
should no longer be possible to take that code path as all 406
errors (with valid accept_mime_types) are generated before
processing takes place.
Make format_dispatch_output handle output other than json/xml so it
can send back binary_content data.
Removed a spurious client.response_code = 400 that seems to not be
used.
Tests added for all code paths.
Database setup for tests msg and file entry. This required a file
upload test to change so it doesn't look for file1 as the link
returned by the upload. Download the link and verify the data
rather than verifying the link.
Multiple formatting changes to error messages to make all lists of
valid mime types ', ' an not just space separated.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 08 Dec 2024 17:22:33 -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 |
