scripts/bib2dox.py
changeset 754 2de0fc630899
parent 745 68792fb2870f
child 836 c841ae1aca29
     1.1 --- a/scripts/bib2dox.py	Mon Oct 05 20:21:54 2009 +0200
     1.2 +++ b/scripts/bib2dox.py	Sat Oct 10 08:15:07 2009 +0200
     1.3 @@ -70,7 +70,7 @@
     1.4  #
     1.5  author_rex = re.compile('\s+and\s+')
     1.6  rembraces_rex = re.compile('[{}]')
     1.7 -capitalize_rex = re.compile('({\w*})')
     1.8 +capitalize_rex = re.compile('({[^}]*})')
     1.9  
    1.10  # used by bibtexkeywords(data)
    1.11  keywords_rex = re.compile('[,;]')
    1.12 @@ -363,6 +363,8 @@
    1.13                      entry.append(entrycont['year'] + '.')
    1.14              if entrycont.has_key('note') and (entrycont['note'] != ''):
    1.15                  entry.append(entrycont['note'] + '.')
    1.16 +            if entrycont.has_key('url') and (entrycont['url'] != ''):
    1.17 +                entry.append(entrycont['url'] + '.')
    1.18  
    1.19              # generate keys for sorting and for the output
    1.20              sortkey = ''
    1.21 @@ -410,6 +412,9 @@
    1.22                  field = field_rex.sub('\g<1>', line)
    1.23                  field = string.lower(field)
    1.24                  data =  data_rex.sub('\g<2>', line)
    1.25 +
    1.26 +            if field == 'url':
    1.27 +                data = '\\url{' + data.strip() + '}'
    1.28              
    1.29              if field in ('author', 'editor'):
    1.30                  entrycont[field] = bibtexauthor(data)