From 7c7f71224f1e1c6ae40c4cbfac54836907e561b4 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Thu, 27 Aug 2020 13:23:15 -0700 Subject: [PATCH] doc: wikiparser: Incorporate post processing fixes Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- doc/Makefile | 8 +-- doc/scripts/fixes.xslt | 92 ------------------------------ doc/scripts/manual-page-fixes.xslt | 84 --------------------------- doc/scripts/wikiparser.py | 26 +++++++-- 4 files changed, 26 insertions(+), 184 deletions(-) delete mode 100644 doc/scripts/fixes.xslt delete mode 100644 doc/scripts/manual-page-fixes.xslt diff --git a/doc/Makefile b/doc/Makefile index 12781c817..f1ec5d05f 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -113,15 +113,15 @@ $(manual-pages-part-html): %.part.html: %.html $(manual-raw-xmls): %.raw.xml: %.raw.wiki $(SCRIPTS_DIR)/wikiparser.py python3 $(SCRIPTS_DIR)/wikiparser.py $< > $@ -$(manual-xmls): %.xml: %.raw.xml $(SCRIPTS_DIR)/fixes.xslt - xsltproc --output $@ $(SCRIPTS_DIR)/fixes.xslt $< +$(manual-xmls): %.xml: %.raw.xml + xmllint --format $< > $@ $(manual-pages-raw-xml): %.raw.xml: %.raw.wiki $(SCRIPTS_DIR)/wikiparser.py python3 $(SCRIPTS_DIR)/wikiparser.py --begin-marker="## BEGIN_INCLUDE" \ --end-marker='## END_INCLUDE' $< > $@ -$(manual-pages-xml): %.xml: %.raw.xml $(SCRIPTS_DIR)/manual-page-fixes.xslt - xsltproc --output $@ $(SCRIPTS_DIR)/manual-page-fixes.xslt $< +$(manual-pages-xml): %.xml: %.raw.xml + xmllint --format $< > $@ $(manual-pages-html): %.html: %.xml xsltproc --output $@ /usr/share/xml/docbook/stylesheet/docbook-xsl/xhtml5/docbook.xsl $< diff --git a/doc/scripts/fixes.xslt b/doc/scripts/fixes.xslt deleted file mode 100644 index 752a3a637..000000000 --- a/doc/scripts/fixes.xslt +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - pt - - - - - - - images/ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/scripts/manual-page-fixes.xslt b/doc/scripts/manual-page-fixes.xslt deleted file mode 100644 index a9c713bb4..000000000 --- a/doc/scripts/manual-page-fixes.xslt +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - pt - - - - - - - images/ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/scripts/wikiparser.py b/doc/scripts/wikiparser.py index eae4831e3..fa630efb0 100644 --- a/doc/scripts/wikiparser.py +++ b/doc/scripts/wikiparser.py @@ -227,7 +227,7 @@ class EmbeddedAttachment(EmbeddedLink): xml = '' xml += '' >>> generate_inner_docbook([EmbeddedAttachment('cockpit-enable.png')]) '\ -\ +\ cockpit-enable.png\ ' >>> generate_inner_docbook([EmbeddedAttachment('Backups_Step1_v49.png', \ [PlainText('Backups: Step 1')], 'width=800')]) '\ -\ +\ Backups: Step 1\ '