Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52085 - website/public_html/beta/feed
From: daniel_james_at_[hidden]
Date: 2009-03-31 15:44:30


Author: danieljames
Date: 2009-03-31 15:44:29 EDT (Tue, 31 Mar 2009)
New Revision: 52085
URL: http://svn.boost.org/trac/boost/changeset/52085

Log:
Fix bbook2rss for xml generated by the new version of quickbook.
Text files modified:
   website/public_html/beta/feed/bbook2rss.py | 25 +++++++++++++++----------
   1 files changed, 15 insertions(+), 10 deletions(-)

Modified: website/public_html/beta/feed/bbook2rss.py
==============================================================================
--- website/public_html/beta/feed/bbook2rss.py (original)
+++ website/public_html/beta/feed/bbook2rss.py 2009-03-31 15:44:29 EDT (Tue, 31 Mar 2009)
@@ -121,27 +121,32 @@
         return result
     
     def x_article(self,node):
- description_xhtml = self.new_node('div',klass='description')
         brief_xhtml = self.new_node('span',
             self.x(self.get_child(self.get_child(node,tag='articleinfo'),
                 tag='articlepurpose'
                 )),
             klass='brief'
             )
- body_item = self.get_child(node,tag='title').nextSibling
+
+ title_xhtml = self.new_node('title',
+ *self.x_children(self.get_child(node,tag='title')))
+
+ description_xhtml = self.new_node('div',klass='description')
         download_item = None
+ body_item = node.firstChild
         while body_item:
- item = self.x(body_item)
- if item:
- download_i = self.get_child(item,tag='boostbook:download')
- if download_i:
- download_item = download_i
- else:
- description_xhtml.appendChild(item)
+ if body_item.nodeName not in ['title', 'articleinfo']:
+ item = self.x(body_item)
+ if item:
+ download_i = self.get_child(item,tag='boostbook:download')
+ if download_i:
+ download_item = download_i
+ else:
+ description_xhtml.appendChild(item)
             body_item = body_item.nextSibling
         return self.new_node(
             'item',
- self.new_text('title',node.getAttribute('name')),
+ title_xhtml,
             self.new_text('pubDate',node.getAttribute('last-revision')),
             self.new_text('boostbook:purpose',brief_xhtml.toxml('utf-8')),
             download_item,


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk