|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r76759 - in website/public_html/beta: generated/state site-tools/boost_site
From: dnljms_at_[hidden]
Date: 2012-01-28 13:58:37
Author: danieljames
Date: 2012-01-28 13:58:36 EST (Sat, 28 Jan 2012)
New Revision: 76759
URL: http://svn.boost.org/trac/boost/changeset/76759
Log:
Website: Use the id from the boostbook file.
Text files modified:
website/public_html/beta/generated/state/feed-pages.txt | 2 +-
website/public_html/beta/site-tools/boost_site/boostbook_parser.py | 5 +++++
website/public_html/beta/site-tools/boost_site/pages.py | 4 +++-
3 files changed, 9 insertions(+), 2 deletions(-)
Modified: website/public_html/beta/generated/state/feed-pages.txt
==============================================================================
--- website/public_html/beta/generated/state/feed-pages.txt (original)
+++ website/public_html/beta/generated/state/feed-pages.txt 2012-01-28 13:58:36 EST (Sat, 28 Jan 2012)
@@ -1837,7 +1837,7 @@
-id
"version_1_49_0
-last_modified
-.1327766238.22
+.1327766618.64
-location
"users/history/version_1_49_0.html
-page_state
Modified: website/public_html/beta/site-tools/boost_site/boostbook_parser.py
==============================================================================
--- website/public_html/beta/site-tools/boost_site/boostbook_parser.py (original)
+++ website/public_html/beta/site-tools/boost_site/boostbook_parser.py 2012-01-28 13:58:36 EST (Sat, 28 Jan 2012)
@@ -22,6 +22,10 @@
print "Boostbook file not article:", filename
return
+ id = ''
+ if article_node.hasAttribute('id'):
+ id = article_node.getAttribute('id')
+
brief_xhtml = self.new_fragment(
*self.x_children(article_node.getElementsByTagName('articlepurpose')[0])
)
@@ -56,6 +60,7 @@
description_xhtml = self.x(article_node)
return {
+ 'id' : id,
'title_fragment' : title_xhtml,
'purpose_fragment' : brief_xhtml,
'description_fragment' : description_xhtml,
Modified: website/public_html/beta/site-tools/boost_site/pages.py
==============================================================================
--- website/public_html/beta/site-tools/boost_site/pages.py (original)
+++ website/public_html/beta/site-tools/boost_site/pages.py 2012-01-28 13:58:36 EST (Sat, 28 Jan 2012)
@@ -215,7 +215,9 @@
self.last_modified = values['last_modified']
self.download_item = values['download_item']
self.documentation = values['documentation']
- self.id = re.sub('[\W]', '_', self.title_xml).lower()
+ self.id = values['id']
+ if not self.id:
+ self.id = re.sub('[\W]', '_', self.title_xml).lower()
if self.dir_location:
self.location = self.dir_location + self.id + '.html'
self.dir_location = None
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