doc: wikiparser: Reduce build verbosity

- Make begin and end markers the default values in the wikiparser arguments so
that they don't have to passed in every time.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Sunil Mohan Adapa 2020-09-09 01:47:02 -07:00
parent 099d877b8f
commit 95c99bf3ce
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2
2 changed files with 4 additions and 5 deletions

View File

@ -107,11 +107,10 @@ $(manual-pdfs): %.pdf: %.xml
$(manual-pages-part-html): %.part.html: %.xml
xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/xhtml5/docbook.xsl $< | \
perl -pe 'BEGIN {undef $$/} s/.*<body[^>]*>(.*)<\/body\s*>.*/$$1/si' > $@
rm -f $(dir $@)docbook.css
@rm -f $(dir $@)docbook.css
$(manual-xmls) $(manual-pages-xml): %.xml: %.raw.wiki $(SCRIPTS_DIR)/wikiparser.py
$(SCRIPTS_DIR)/wikiparser.py --begin-marker="## BEGIN_INCLUDE" \
--end-marker='## END_INCLUDE' $< | xmllint --format - > $@
$(SCRIPTS_DIR)/wikiparser.py $< | xmllint --format - > $@
%.1: %.xml
xmlto man $<

View File

@ -2047,9 +2047,9 @@ if __name__ == '__main__':
help='Skip module doctests')
parser.add_argument('--debug', action='store_true',
help='Show parser output')
parser.add_argument('--begin-marker', default=None,
parser.add_argument('--begin-marker', default='## BEGIN_INCLUDE',
help='Start parsing at this line')
parser.add_argument('--end-marker', default=None,
parser.add_argument('--end-marker', default='## END_INCLUDE',
help='Stop parsing at this line')
parser.add_argument('input', type=Path, nargs='*',
help='input file path(s)')