mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-27 11:19:40 +00:00
26 lines
945 B
Python
26 lines
945 B
Python
# vi: syntax=python:et:ts=4
|
|
from glob import glob
|
|
|
|
Import("env")
|
|
|
|
#
|
|
# Making the manual
|
|
#
|
|
if "manual" in COMMAND_LINE_TARGETS or "update-po4a" in COMMAND_LINE_TARGETS or "pot-update" in COMMAND_LINE_TARGETS:
|
|
env.Command("manual.en.xml", "manual.txt",
|
|
"asciidoc -b docbook -d book -n -a toc -o $TARGET $SOURCE && dos2unix $TARGET")
|
|
manuals = glob("*.xml")
|
|
if "manual.en.xml" not in manuals: manuals.append("manual.en.xml")
|
|
for manual in manuals:
|
|
html = env.Command(manual.replace(".xml", ".html"), manual,
|
|
"""xsltproc --nonet \
|
|
--stringparam callout.graphics 0 \
|
|
--stringparam navig.graphics 0 \
|
|
--stringparam admon.textlabel 1 \
|
|
--stringparam admon.graphics 0 \
|
|
--stringparam html.stylesheet ./styles/manual.css \
|
|
/etc/asciidoc/docbook-xsl/xhtml.xsl \
|
|
$SOURCE > $TARGET \
|
|
""")
|
|
env.Alias("manual", html)
|