COIN-OR::LEMON - Graph Library

Ticket #184: 184-1-420e33e37120.patch

File 184-1-420e33e37120.patch, 4.5 KB (added by Peter Kovacs, 15 years ago)
  • doc/references.bib

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1255056783 -7200
    # Node ID 420e33e371205619e1feff24f0c2725d31e09203
    # Parent  b7e3662faf02cb4a397373a6f97f2942a9193b33
    Handle url fields in bib2dox.py (#184)
    and modify the bibtex file using url fields.
    
    diff --git a/doc/references.bib b/doc/references.bib
    a b  
    11%%%%% Defining LEMON %%%%%
    22
    3 @misc{lemon,
    4   key =          {LEMON},
    5   title =        {{LEMON} -- {L}ibrary for {E}fficient {M}odeling and
    6                   {O}ptimization in {N}etworks},
    7   howpublished = {\url{http://lemon.cs.elte.hu/}},
    8   year =         2009
    9 }
    10 
    113@misc{egres,
    124  key =          {EGRES},
    135  title =        {{EGRES} -- {E}gerv{\'a}ry {R}esearch {G}roup on
    146                  {C}ombinatorial {O}ptimization},
    15   howpublished = {\url{http://www.cs.elte.hu/egres/}},
    16   year =         2009
     7  url =          {http://www.cs.elte.hu/egres/}
    178}
    189
    1910@misc{coinor,
    2011  key =          {COIN-OR},
    2112  title =        {{COIN-OR} -- {C}omputational {I}nfrastructure for
    2213                  {O}perations {R}esearch},
    23   howpublished = {\url{http://www.coin-or.org/}},
    24   year =         2009
     14  url =          {http://www.coin-or.org/}
    2515}
    2616
    2717
     
    3020@misc{boost,
    3121  key =          {Boost},
    3222  title =        {{B}oost {C++} {L}ibraries},
    33   howpublished = {\url{http://www.boost.org/}},
    34   year =         2009
     23  url =          {http://www.boost.org/}
    3524}
    3625
    3726@book{bglbook,
     
    4736  key =          {LEDA},
    4837  title =        {{LEDA} -- {L}ibrary of {E}fficient {D}ata {T}ypes and
    4938                  {A}lgorithms},
    50   howpublished = {\url{http://www.algorithmic-solutions.com/}},
    51   year =         2009
     39  url =          {http://www.algorithmic-solutions.com/}
    5240}
    5341
    5442@book{ledabook,
     
    6755@misc{cmake,
    6856  key =          {CMake},
    6957  title =        {{CMake} -- {C}ross {P}latform {M}ake},
    70   howpublished = {\url{http://www.cmake.org/}},
    71   year =         2009
     58  url =          {http://www.cmake.org/}
    7259}
    7360
    7461@misc{doxygen,
    7562  key =          {Doxygen},
    7663  title =        {{Doxygen} -- {S}ource code documentation generator
    7764                  tool},
    78   howpublished = {\url{http://www.doxygen.org/}},
    79   year =         2009
     65  url =          {http://www.doxygen.org/}
    8066}
    8167
    8268
     
    8571@misc{glpk,
    8672  key =          {GLPK},
    8773  title =        {{GLPK} -- {GNU} {L}inear {P}rogramming {K}it},
    88   howpublished = {\url{http://www.gnu.org/software/glpk/}},
    89   year =         2009
     74  url =          {http://www.gnu.org/software/glpk/}
    9075}
    9176
    9277@misc{clp,
    9378  key =          {Clp},
    9479  title =        {{Clp} -- {Coin-Or} {L}inear {P}rogramming},
    95   howpublished = {\url{http://projects.coin-or.org/Clp/}},
    96   year =         2009
     80  url =          {http://projects.coin-or.org/Clp/}
    9781}
    9882
    9983@misc{cbc,
    10084  key =          {Cbc},
    10185  title =        {{Cbc} -- {Coin-Or} {B}ranch and {C}ut},
    102   howpublished = {\url{http://projects.coin-or.org/Cbc/}},
    103   year =         2009
     86  url =          {http://projects.coin-or.org/Cbc/}
    10487}
    10588
    10689@misc{cplex,
    10790  key =          {CPLEX},
    10891  title =        {{ILOG} {CPLEX}},
    109   howpublished = {\url{http://www.ilog.com/}},
    110   year =         2009
     92  url =          {http://www.ilog.com/}
    11193}
    11294
    11395@misc{soplex,
    11496  key =          {SoPlex},
    11597  title =        {{SoPlex} -- {T}he {S}equential {O}bject-{O}riented
    11698                  {S}implex},
    117   howpublished = {\url{http://soplex.zib.de/}},
    118   year =         2009
     99  url =          {http://soplex.zib.de/}
    119100}
    120101
    121102
  • scripts/bib2dox.py

    diff --git a/scripts/bib2dox.py b/scripts/bib2dox.py
    a b  
    7070#
    7171author_rex = re.compile('\s+and\s+')
    7272rembraces_rex = re.compile('[{}]')
    73 capitalize_rex = re.compile('({\w*})')
     73capitalize_rex = re.compile('({[^}]*})')
    7474
    7575# used by bibtexkeywords(data)
    7676keywords_rex = re.compile('[,;]')
     
    363363                    entry.append(entrycont['year'] + '.')
    364364            if entrycont.has_key('note') and (entrycont['note'] != ''):
    365365                entry.append(entrycont['note'] + '.')
     366            if entrycont.has_key('url') and (entrycont['url'] != ''):
     367                entry.append(entrycont['url'] + '.')
    366368
    367369            # generate keys for sorting and for the output
    368370            sortkey = ''
     
    410412                field = field_rex.sub('\g<1>', line)
    411413                field = string.lower(field)
    412414                data =  data_rex.sub('\g<2>', line)
     415
     416            if field == 'url':
     417                data = '\\url{' + data.strip() + '}'
    413418           
    414419            if field in ('author', 'editor'):
    415420                entrycont[field] = bibtexauthor(data)