summaryrefslogtreecommitdiff
path: root/main/misc/genFAQ.py
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2015-03-16 23:40:14 +0100
committerArne Schwabe <arne@rfc2549.org>2015-03-16 23:40:14 +0100
commitf7058a378d9831821d319c07aac4f5034555fb71 (patch)
tree39221423c6fe726c49f68965500eda99934b13ed /main/misc/genFAQ.py
parenta2c989301f36be28ffa2ca2991076171afba1a77 (diff)
Fix FAQ generation script
--HG-- extra : rebase_source : b8456211ee7b39e1be473d8c9fdb2c173b91e31a
Diffstat (limited to 'main/misc/genFAQ.py')
-rwxr-xr-xmain/misc/genFAQ.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/main/misc/genFAQ.py b/main/misc/genFAQ.py
index ef19a9d1..d4ddf032 100755
--- a/main/misc/genFAQ.py
+++ b/main/misc/genFAQ.py
@@ -33,10 +33,16 @@ def getString(strid,lang):
def genPage(javafile, lang):
#{R.string.faq_howto_title, R.string.faq_howto},
out =""
- out+= header
+
+ notmatched = None
for l in javafile:
- m = re.search("FAQEntry.*\((.*),(.*), R.string.([a-z_]+),.*R.string.([a-z_]+)\)", l)
+
+ m = re.search("FAQEntry.*\((.*),(.*), R.string.([a-z0-9_]+),.*R.string.([a-z0-9_]+)\)", l)
if m:
+ if notmatched and notmatched.strip():
+ print "Line did not match: %s" % notmatched
+
+ notmatched = None
(ver1, ver2, title, body) = m.groups()
verHeader = getVerHeader(ver1.strip(), ver2.strip(), lang)
@@ -48,7 +54,11 @@ def genPage(javafile, lang):
if body == "faq_system_dialogs_title":
out += "%s\n" % getString("faq_system_dialog_xposed",lang)
- return out
+ elif header:
+ notmatched = l
+
+
+ return header + out
def getVerHeader(startVersion, endVersion, lang):
if startVersion == "Build.VERSION_CODES.ICE_CREAM_SANDWICH":