1.1 --- a/TO_DO.txt Mon Jun 10 13:20:27 2013 +0200
1.2 +++ b/TO_DO.txt Mon Jun 10 13:45:29 2013 +0200
1.3 @@ -4,15 +4,6 @@
1.4 that would cause conflicts in the generated Moin markup should be translated
1.5 with spaces separating them
1.6
1.7 -DOC/How do I turn off HTML messages/attachments? (4030675)
1.8 -
1.9 - Link targets need shortening for long page names:
1.10 - 4.22 Messages that are translated from HTML to plain text are empty or have a body like ""-root-8e8Ta4- Permission denied"
1.11 -
1.12 -DOC/Where do I go for help? (4816921)
1.13 -
1.14 - XHTML: need to combine ac:anchor with ri:content-title to produce a complete link
1.15 -
1.16 Handle page renaming (add redirects, perhaps support comments on old revisions):
1.17
1.18 DOC/Making Sure Your Lists Are Private (10715350) renamed from
2.1 --- a/wikiparser.py Mon Jun 10 13:20:27 2013 +0200
2.2 +++ b/wikiparser.py Mon Jun 10 13:45:29 2013 +0200
2.3 @@ -430,6 +430,7 @@
2.4 prefix = ""
2.5 space, rest = target.split(":", 1)
2.6 if space not in URL_SCHEMES:
2.7 + rest = get_page_title(rest)
2.8 target = "%s/%s" % (space, rest)
2.9
2.10 # Detect anchors.
2.11 @@ -452,6 +453,8 @@
2.12 if not label:
2.13 label = target
2.14
2.15 + target = get_page_title(target)
2.16 +
2.17 if not label and not title:
2.18 return "[[%s%s]]" % (prefix, target)
2.19 elif not title:
3.1 --- a/xmlparser.py Mon Jun 10 13:20:27 2013 +0200
3.2 +++ b/xmlparser.py Mon Jun 10 13:45:29 2013 +0200
3.3 @@ -282,12 +282,23 @@
3.4 for attrname in link_target_tags[name]:
3.5 attrvalue = self.attributes[-1].get(attrname)
3.6 if attrvalue:
3.7 +
3.8 + # Obtain a link label.
3.9 +
3.10 + if attrname in link_label_attributes and not self.label:
3.11 + self.label = attrvalue
3.12 +
3.13 + # Validate any page title.
3.14 +
3.15 + if attrname == "ri:content-title":
3.16 + attrvalue = get_page_title(attrvalue)
3.17 target_details.append(attrvalue)
3.18 +
3.19 + # Insert any prefix required for the link.
3.20 +
3.21 prefix = link_target_prefixes.get(attrname)
3.22 if prefix:
3.23 target_details.insert(0, prefix)
3.24 - if attrname in link_label_attributes and not self.label:
3.25 - self.label = attrvalue
3.26
3.27 # Make a link based on the details.
3.28