# 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
|
|
1 | 1 | %%%%% Defining LEMON %%%%% |
2 | 2 | |
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 | | |
11 | 3 | @misc{egres, |
12 | 4 | key = {EGRES}, |
13 | 5 | title = {{EGRES} -- {E}gerv{\'a}ry {R}esearch {G}roup on |
14 | 6 | {C}ombinatorial {O}ptimization}, |
15 | | howpublished = {\url{http://www.cs.elte.hu/egres/}}, |
16 | | year = 2009 |
| 7 | url = {http://www.cs.elte.hu/egres/} |
17 | 8 | } |
18 | 9 | |
19 | 10 | @misc{coinor, |
20 | 11 | key = {COIN-OR}, |
21 | 12 | title = {{COIN-OR} -- {C}omputational {I}nfrastructure for |
22 | 13 | {O}perations {R}esearch}, |
23 | | howpublished = {\url{http://www.coin-or.org/}}, |
24 | | year = 2009 |
| 14 | url = {http://www.coin-or.org/} |
25 | 15 | } |
26 | 16 | |
27 | 17 | |
… |
… |
|
30 | 20 | @misc{boost, |
31 | 21 | key = {Boost}, |
32 | 22 | title = {{B}oost {C++} {L}ibraries}, |
33 | | howpublished = {\url{http://www.boost.org/}}, |
34 | | year = 2009 |
| 23 | url = {http://www.boost.org/} |
35 | 24 | } |
36 | 25 | |
37 | 26 | @book{bglbook, |
… |
… |
|
47 | 36 | key = {LEDA}, |
48 | 37 | title = {{LEDA} -- {L}ibrary of {E}fficient {D}ata {T}ypes and |
49 | 38 | {A}lgorithms}, |
50 | | howpublished = {\url{http://www.algorithmic-solutions.com/}}, |
51 | | year = 2009 |
| 39 | url = {http://www.algorithmic-solutions.com/} |
52 | 40 | } |
53 | 41 | |
54 | 42 | @book{ledabook, |
… |
… |
|
67 | 55 | @misc{cmake, |
68 | 56 | key = {CMake}, |
69 | 57 | title = {{CMake} -- {C}ross {P}latform {M}ake}, |
70 | | howpublished = {\url{http://www.cmake.org/}}, |
71 | | year = 2009 |
| 58 | url = {http://www.cmake.org/} |
72 | 59 | } |
73 | 60 | |
74 | 61 | @misc{doxygen, |
75 | 62 | key = {Doxygen}, |
76 | 63 | title = {{Doxygen} -- {S}ource code documentation generator |
77 | 64 | tool}, |
78 | | howpublished = {\url{http://www.doxygen.org/}}, |
79 | | year = 2009 |
| 65 | url = {http://www.doxygen.org/} |
80 | 66 | } |
81 | 67 | |
82 | 68 | |
… |
… |
|
85 | 71 | @misc{glpk, |
86 | 72 | key = {GLPK}, |
87 | 73 | 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/} |
90 | 75 | } |
91 | 76 | |
92 | 77 | @misc{clp, |
93 | 78 | key = {Clp}, |
94 | 79 | 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/} |
97 | 81 | } |
98 | 82 | |
99 | 83 | @misc{cbc, |
100 | 84 | key = {Cbc}, |
101 | 85 | 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/} |
104 | 87 | } |
105 | 88 | |
106 | 89 | @misc{cplex, |
107 | 90 | key = {CPLEX}, |
108 | 91 | title = {{ILOG} {CPLEX}}, |
109 | | howpublished = {\url{http://www.ilog.com/}}, |
110 | | year = 2009 |
| 92 | url = {http://www.ilog.com/} |
111 | 93 | } |
112 | 94 | |
113 | 95 | @misc{soplex, |
114 | 96 | key = {SoPlex}, |
115 | 97 | title = {{SoPlex} -- {T}he {S}equential {O}bject-{O}riented |
116 | 98 | {S}implex}, |
117 | | howpublished = {\url{http://soplex.zib.de/}}, |
118 | | year = 2009 |
| 99 | url = {http://soplex.zib.de/} |
119 | 100 | } |
120 | 101 | |
121 | 102 | |
diff --git a/scripts/bib2dox.py b/scripts/bib2dox.py
a
|
b
|
|
70 | 70 | # |
71 | 71 | author_rex = re.compile('\s+and\s+') |
72 | 72 | rembraces_rex = re.compile('[{}]') |
73 | | capitalize_rex = re.compile('({\w*})') |
| 73 | capitalize_rex = re.compile('({[^}]*})') |
74 | 74 | |
75 | 75 | # used by bibtexkeywords(data) |
76 | 76 | keywords_rex = re.compile('[,;]') |
… |
… |
|
363 | 363 | entry.append(entrycont['year'] + '.') |
364 | 364 | if entrycont.has_key('note') and (entrycont['note'] != ''): |
365 | 365 | entry.append(entrycont['note'] + '.') |
| 366 | if entrycont.has_key('url') and (entrycont['url'] != ''): |
| 367 | entry.append(entrycont['url'] + '.') |
366 | 368 | |
367 | 369 | # generate keys for sorting and for the output |
368 | 370 | sortkey = '' |
… |
… |
|
410 | 412 | field = field_rex.sub('\g<1>', line) |
411 | 413 | field = string.lower(field) |
412 | 414 | data = data_rex.sub('\g<2>', line) |
| 415 | |
| 416 | if field == 'url': |
| 417 | data = '\\url{' + data.strip() + '}' |
413 | 418 | |
414 | 419 | if field in ('author', 'editor'): |
415 | 420 | entrycont[field] = bibtexauthor(data) |