summaryrefslogtreecommitdiffstats
path: root/scripts/bupa
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/bupa')
-rwxr-xr-xscripts/bupa7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/bupa b/scripts/bupa
index 0676432..1208263 100755
--- a/scripts/bupa
+++ b/scripts/bupa
@@ -26,9 +26,10 @@ class Page(object):
self.meta_keywords = page_dict['keywords']
self.body = page_dict['body'][0]
-def reST_to_html(s):
+def reST_to_html(s, id_prefix='id'):
formated = core.publish_parts(s, writer_name='html4css1',
- settings_overrides={'footnote_references': 'superscript'})
+ settings_overrides={'footnote_references': 'superscript',
+ 'auto_id_prefix': str(id_prefix) + '-',})
return formated['fragment']
def filename_to_id(file_name):
@@ -63,7 +64,7 @@ def build_entry(filename, atom_feed):
entry.id = filename_to_id(filename)
entry.page = filename_to_extless(filename) + '.html'
entry.srcpage = filename_to_extless(filename) + '.rst'
- entry.body = reST_to_html(entry.body)
+ entry.body = reST_to_html(entry.body, entry.id)
atom_feed.add(
title=entry.title,
content=entry.body,