# HG changeset patch # User gpiancastelli # Date 1250982854 -7200 # Node ID 600e7ab15c67a661d80be43c8bd48a83b14dad77 # Parent 84629ae2c99d9b578f8e47d3395b051d73dc567e Make references appear in the web TOC. diff -r 84629ae2c99d -r 600e7ab15c67 it/bibliography.xml --- a/it/bibliography.xml Sun Aug 23 00:51:45 2009 +0200 +++ b/it/bibliography.xml Sun Aug 23 01:14:14 2009 +0200 @@ -1,4 +1,5 @@ - + + Riferimenti diff -r 84629ae2c99d -r 600e7ab15c67 it/web/genindex.py --- a/it/web/genindex.py Sun Aug 23 00:51:45 2009 +0200 +++ b/it/web/genindex.py Sun Aug 23 01:14:14 2009 +0200 @@ -2,12 +2,13 @@ import glob, os, re -chapter_re = re.compile(r'<(chapter|appendix|preface)\s+id="([^"]+)">') +chapter_re = re.compile(r'<(chapter|appendix|preface|bibliography)\s+id="([^"]+)">') filename_re = re.compile(r'<\?dbhtml filename="([^"]+)"\?>') title_re = re.compile(r'(.*)') chapters = (sorted(glob.glob('../ch*.xml')) + - sorted(glob.glob('../app*.xml'))) + sorted(glob.glob('../app*.xml')) + + sorted(glob.glob('../biblio*.xml'))) fp = open('index-read.html.in', 'w', encoding='utf-8') @@ -34,11 +35,13 @@ if m: title = m.group(1) if filename and title and chapid: - if chaptype == 'appendix': - num = chr(ord('A') + app) + if chaptype == 'bibliography': + num = '' + elif chaptype == 'appendix': + num = str(chr(ord('A') + app)) + '. ' app += 1 else: - num = ch + num = str(ch) + '. ' ch += 1 if title.find('&') >= 0: title = title.replace('&', '\&') @@ -52,7 +55,7 @@ 'filename': filename, 'title': title, } - print('
  • %(date)s%(num)s. %(title)s
  • ' % args, file=fp) + print('
  • %(date)s%(num)s%(title)s
  • ' % args, file=fp) break print('', file=fp)