diff --git a/docs/Makefile b/docs/Makefile
index 168caee69..514ef1719 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -49,7 +49,7 @@ all: $(online-dirs) $(sdk-de-dirs) $(online-extra-files) $(online-sdk-files)
online-en: $(addprefix online/en/, $(sdk-dirs) images $(htmlfiles) sdk/content.html $(extra-files))
-chm: $(chm-dirs) chm/en/Developer.chm chm/de/Entwickler.chm
+chm: $(chm-dirs) $(sdk-de-dirs) chm/en/Developer.chm chm/de/Entwickler.chm
install: all
$(MKDIR_P) $(prefix)
@@ -62,13 +62,16 @@ clean:
rm -f *.mo Entwickler.chm Developer.chm doku.pot
rm -rf online sdk-de chm
-chm/en/Output.hhp chm/en/Output.hhk chm/de/Output.hhp chm/de/Output.hhk: sdk/content.xml
-#update timestamp
- touch $@
-sdk/content.xml: $(xmlfiles) chm/en/. chm/de/. build_chm_files.py experimental.py \
- sdk/content.xml.in Template.hhk Template.de.hhk Template.hhp Template.de.hhp de.mo
- @echo generate chm files
- @python build_chm_files.py $(xmlfiles)
+sdk/content.xml: sdk/content.xml.in $(xmlfiles) build_contents.py experimental.py
+ @echo generate $@
+ @python build_contents.py $(xmlfiles)
+
+chm/en/Output.hhp: $(xmlfiles) chm/en/. build_hhp.py Template.hhp
+ @echo generate $@
+ @python build_hhp.py $@ Template.hhp $(xmlfiles)
+chm/de/Output.hhp: $(xmlfiles) chm/de/. build_hhp.py Template.de.hhp
+ @echo generate $@
+ @python build_hhp.py $@ Template.de.hhp $(xmlfiles)
$(sdk-de-dirs) $(online-dirs) $(chm-dirs):
mkdir -p $@
@@ -79,7 +82,7 @@ doku.pot: $(xmlfiles) extra-strings.xml sdk/content.xml.in xml2po.py clonk.py
%.po: doku.pot
@echo update $@
- #@msgmerge --no-wrap -w 1 -U $@ $<
+# @msgmerge --no-wrap -w 1 -U $@ $<
@msgmerge --no-wrap -w 1 -o $@ $@ $<
%.mo: %.po
@@ -104,6 +107,10 @@ chm/en/Output.hhc: stylesheet=hhc.xsl
chm/de/Output.hhc: stylesheet=hhc.xsl
chm/en/Output.hhc: sdk/content.xml hhc.xsl ; $(run-xslt)
chm/de/Output.hhc: sdk-de/content.xml hhc.xsl ; $(run-xslt)
+chm/en/Output.hhk: stylesheet=hhk.xsl
+chm/de/Output.hhk: stylesheet=hhk.xsl
+chm/en/Output.hhk: sdk/content.xml hhk.xsl ; $(run-xslt)
+chm/de/Output.hhk: sdk-de/content.xml hhk.xsl ; $(run-xslt)
$(filter online/en/%, $(online-extra-files)): online/en/%: %
$(CP) $< $@
diff --git a/docs/Template.de.hhk b/docs/Template.de.hhk
deleted file mode 100644
index 2a94c2e2d..000000000
--- a/docs/Template.de.hhk
+++ /dev/null
@@ -1,210 +0,0 @@
-
-
-
-
-
-
-
- - s
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/Template.hhk b/docs/Template.hhk
deleted file mode 100644
index 976d41c68..000000000
--- a/docs/Template.hhk
+++ /dev/null
@@ -1,210 +0,0 @@
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/build_chm_files.py b/docs/build_contents.py
old mode 100755
new mode 100644
similarity index 80%
rename from docs/build_chm_files.py
rename to docs/build_contents.py
index b95bf092a..6ed6110bf
--- a/docs/build_chm_files.py
+++ b/docs/build_contents.py
@@ -1,9 +1,8 @@
#!/usr/bin/env python
-# -*- coding: iso-8859-15 -*-
+# -*- coding: utf-8 -*-
import sys
import xml.sax
import experimental
-import gettext
class ClonkEntityResolver(xml.sax.handler.EntityResolver):
def resolveEntity(self, publicId, systemId):
@@ -154,7 +153,7 @@ def printfunctions(f, _):
def printindex(f, _):
def folder(name):
- f.write("" + name + "\n\n")
+ f.write("- " + name + "\n
\n")
def sheet(url, name):
f.write("- " + name.replace('&', '&').replace('<', '<').replace('>', '>') + "
\n")
folder("Index")
@@ -186,23 +185,6 @@ if 0:
reader.parse(filename)
experimental.Result()
-mofile = open("de.mo", "rb")
-gt = gettext.GNUTranslations(mofile)
-
-#_ = lambda s: s.encode('iso-8859-1')
-#for f, fin in ((file("chm/de/Output.hhc", "w"), file("Template.hhc", "r")),
-# (file("chm/en/Output.hhc", "w"), file("Template.en.hhc", "r"))):
-# for line in fin:
-# if line.find("") != -1:
-# printcontents1(f, _)
-# elif line.find("") != -1:
-# printcontents2(f, _)
-# else:
-# f.write(line)
-# f.close()
-# fin.close()
-# _ = lambda s: gt.ugettext(s).encode('iso-8859-1')
-
_ = lambda s: s.encode('utf-8')
f, fin = (file("sdk/content.xml", "w"), file("sdk/content.xml.in", "r"))
for line in fin:
@@ -214,30 +196,3 @@ for line in fin:
f.write(line)
f.close()
fin.close()
-
-for f, fin in ((file("chm/en/Output.hhp", "w"), file("Template.hhp", "r")),
- (file("chm/de/Output.hhp", "w"), file("Template.de.hhp", "r"))):
- for line in fin:
- if line.find("[INFOTYPES]") != -1:
- for filename in sys.argv[1:]:
- f.write(filename[:-3].replace("/", "\\") + 'html\r\n')
- f.write(line)
- f.close()
- fin.close()
-
-_ = lambda s: s.encode('iso-8859-1')
-for f, fin in ((file("chm/en/Output.hhk", "w"), file("Template.hhk", "r")),
- (file("chm/de/Output.hhk", "w"), file("Template.de.hhk", "r"))):
- for line in fin:
- if line.find("
") != -1:
- for title, filenames in parser.files.iteritems():
- for ctitle, filename in filenames.iteritems():
- f.write(" - \n")
- f.write(line)
- f.close()
- fin.close()
- _ = lambda s: gt.ugettext(s).encode('iso-8859-1')
-
diff --git a/docs/build_hhp.py b/docs/build_hhp.py
new file mode 100644
index 000000000..d65b8cb79
--- /dev/null
+++ b/docs/build_hhp.py
@@ -0,0 +1,13 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import sys
+
+f = file(sys.argv[1], "w")
+fin = file(sys.argv[2], "r")
+for line in fin:
+ if line.find("[INFOTYPES]") != -1:
+ for filename in sys.argv[3:]:
+ f.write(filename[:-3].replace("/", "\\") + 'html\r\n')
+ f.write(line)
+f.close()
+fin.close()
diff --git a/docs/clonk.xsl b/docs/clonk.xsl
index 58b1f00ec..13109bdef 100644
--- a/docs/clonk.xsl
+++ b/docs/clonk.xsl
@@ -227,6 +227,9 @@
+
+
+
invisi
@@ -247,9 +250,6 @@
-
-
-
diff --git a/docs/experimental.py b/docs/experimental.py
index 696c0b7c2..a66c80db7 100644
--- a/docs/experimental.py
+++ b/docs/experimental.py
@@ -10,9 +10,10 @@ import xml.sax
codeparents = {}
allcode = {}
-c4scripter = file("Functions.txt", 'w')
+c4scripter = None
class ExperimentParser(xml.sax.handler.ContentHandler):
def __init__(self):
+ global c4scripter
self.statestack = []
self.parameter = ""
self.type = ""
@@ -21,6 +22,7 @@ class ExperimentParser(xml.sax.handler.ContentHandler):
self.title = ""
self.cur = ""
self.desc = ""
+ c4scripter = file("Functions.txt", 'w')
def startElement(self, name, attr):
self.statestack.append(name)
if name == 'params':
diff --git a/docs/hhc.xsl b/docs/hhc.xsl
index dbc226745..bbf172cd2 100644
--- a/docs/hhc.xsl
+++ b/docs/hhc.xsl
@@ -7,7 +7,7 @@
-
+
@@ -27,6 +27,9 @@ and needs at least some of the whitespace added with xsl:text below, and perhaps
+
+
+