[library-web] [mallard] get title from mallard index page
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [library-web] [mallard] get title from mallard index page
- Date: Fri, 3 Dec 2010 21:25:54 +0000 (UTC)
commit 91e3e3c636830fdffbb4ab5120ee9e2491ce27c1
Author: Frédéric Péters <fpeters 0d be>
Date: Fri Dec 3 22:25:23 2010 +0100
[mallard] get title from mallard index page
src/modtypes/mallard.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/modtypes/mallard.py b/src/modtypes/mallard.py
index 2871262..6909f3a 100644
--- a/src/modtypes/mallard.py
+++ b/src/modtypes/mallard.py
@@ -115,6 +115,7 @@ class MallardCache:
if page.id is None:
return
self.all_pages.append(page)
+ return page
def toxml(self):
mallard_cache = ET.Element('{%s}cache' % MAL_NS)
@@ -230,7 +231,9 @@ class MallardModule(DocModule):
if not os.path.exists(xml_file):
doc.languages.remove(lang)
continue
- mallard_cache.add_page(xml_file)
+ page = mallard_cache.add_page(xml_file)
+ if doc_page == 'index.page':
+ doc.title[lang] = page.link_title.text
temporary = tempfile.NamedTemporaryFile()
mallard_cache.dump(temporary.name)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]