Changeset 59:5d9170b19285 in lemon-tutorial
- Timestamp:
- 04/08/10 09:20:19 (15 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
.hgignore
r17 r59 13 13 .dirstamp 14 14 Doxyfile 15 DoxyfilePdf 15 16 Makefile 16 17 … … 21 22 ^gen-images/.* 22 23 ^gen-dox/.* 24 ^gen-pdf-dox/.* 25 ^latex/.* 23 26 ^demo/build/.* -
Makefile.in
r52 r59 39 39 html: Doxyfile-gen $(PNG_IMAGES) 40 40 -mkdir -p gen-dox 41 -mkdir -p gen-pdf-dox 41 42 ./scripts/titlegen.py 42 43 doxygen Doxyfile 44 45 pdf: Doxyfile-gen $(PNG_IMAGES) 46 -mkdir -p gen-dox 47 -mkdir -p gen-pdf-dox 48 ./scripts/titlegen.py 49 doxygen DoxyfilePdf 50 make -C latex 43 51 44 52 demos: $(DEMOS) … … 48 56 -e 's/@lemon_doc_prefix@/@make_lemon_doc_prefix@/g' \ 49 57 < Doxyfile.in >Doxyfile 58 sed -e 's/@version@/'`./scripts/chg-len.py`'/g' \ 59 -e 's/@lemon_doc_prefix@/@make_lemon_doc_prefix@/g' \ 60 < DoxyfilePdf.in >DoxyfilePdf 50 61 51 62 clean: -
scripts/titlegen.py
r42 r59 1 1 #! /usr/bin/env python 2 # 3 # This file is a part of LEMON, a generic C++ optimization library. 4 # 5 # Copyright (C) 2003-2010 6 # Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 # (Egervary Research Group on Combinatorial Optimization, EGRES). 8 # 9 # Permission to use, modify and distribute this software is granted 10 # provided that this copyright notice appears in all copies. For 11 # precise terms see the accompanying LICENSE file. 12 # 13 # This software is provided "AS IS" with no warranty of any kind, 14 # express or implied, and with no claim as to its suitability for any 15 # purpose. 16 # 2 17 3 18 import sys … … 41 56 toc={} 42 57 ind={} 58 page_files={} 59 ordered_pages = [] 60 61 for doxfile in os.listdir('.'): 62 if doxfile[-4:]=='.dox': 63 for l in open(doxfile).readlines(): 64 gr = re.match(r"(^[[]PAGE[]].*[[]PAGE[]])?(.*)$", l).groups() 65 if gr[0]: 66 page=gr[0][6:-6] 67 page_files[page]=doxfile 43 68 44 69 prev_page='' … … 57 82 ind[prev_page][2]=t_link 58 83 prev_page=t_link 84 ordered_pages.append(t_link) 59 85 toc[format_sec(t_sec)]=t_link 60 86 … … 96 122 fo.write(gr[4]+'\n') 97 123 fo.close() 124 125 fpdf=open(os.path.join("gen-pdf-dox","full.dox"),"w") 126 for doxfile in [page_files[p] for p in ordered_pages]: 127 page='' 128 for l in open(doxfile).readlines(): 129 gr = re.match(r"(^[[]PAGE[]].*[[]PAGE[]])?(^[[]SEC[]].*[[]SEC[]])?(^[[]TRAILER[]])?(^[[]TOC[]])?(.*)$", l).groups() 130 if gr[0]: 131 page=gr[0][6:-6] 132 fpdf.write("\page %s %s\n"%(page,gr[4])) 133 elif gr[1]: 134 sec=gr[1][5:-5] 135 fpdf.write("\section %s %s\n"%(sec,gr[4])) 136 elif gr[2]: 137 pass 138 elif gr[3]: 139 pass 140 else: 141 fpdf.write(gr[4]+'\n') 142 fpdf.close()
Note: See TracChangeset
for help on using the changeset viewer.