FreedomBox/doc/scripts/test-wikiparser
Sunil Mohan Adapa 4c78bcf89c
doc: Update the test script for wikiparser
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:10:40 -04:00

10 lines
361 B
Bash
Executable File

#!/bin/bash
# SPDX-License-Identifier: AGPL-3.0-or-later
for var in "$@"
do
gen=$(python3 scripts/wikiparser.py "$var" --begin-marker='## BEGIN_INCLUDE' --end-marker='## END_INCLUDE' | xsltproc scripts/fixes.xslt - | xmllint --format -)
orig=$(xmllint --format "${var//.raw.wiki/.xml}" )
diff --ignore-all-space <(echo "$gen") <(echo "$orig")
done