Mercurial > evolve
comparison docs/test2rst.py @ 525:a0327c78a5d3 stable
doc: remove spurious print in test2rest.py
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Mon, 27 Aug 2012 15:17:13 +0200 |
parents | 8469ccb9550f |
children | 94fe2cc9cd41 |
comparison
equal
deleted
inserted
replaced
524:ba0a3d0f942f | 525:a0327c78a5d3 |
---|---|
25 | 25 |
26 def main(base): | 26 def main(base): |
27 if os.path.isdir(base): | 27 if os.path.isdir(base): |
28 one_dir(base) | 28 one_dir(base) |
29 else: | 29 else: |
30 print one_file(base) | 30 one_file(base) |
31 | 31 |
32 | 32 |
33 def one_dir(base): | 33 def one_dir(base): |
34 index = INDEX | 34 index = INDEX |
35 #doc = lambda x: op.join(op.dirname(__file__), 'docs', x) | 35 #doc = lambda x: op.join(op.dirname(__file__), 'docs', x) |
36 | 36 |
37 for fn in sorted(os.listdir(base)): | 37 for fn in sorted(os.listdir(base)): |
38 if not fn.endswith('.t'): | 38 if not fn.endswith('.t'): |
39 continue | 39 continue |
40 print fn | |
41 name = os.path.splitext(fn)[0] | 40 name = os.path.splitext(fn)[0] |
42 content = one_file(op.join(base, fn)) | 41 content = one_file(op.join(base, fn)) |
43 target = op.join(base, name + '.rst') | 42 target = op.join(base, name + '.rst') |
44 #with file(doc(name + '.rst'), 'w') as f: | 43 #with file(doc(name + '.rst'), 'w') as f: |
45 with file(target, 'w') as f: | 44 with file(target, 'w') as f: |
46 f.write(content) | 45 f.write(content) |
47 print f | |
48 | 46 |
49 index += '\n ' + name | 47 index += '\n ' + name |
50 | 48 |
51 #with file(doc('index.rst'), 'w') as f: | 49 #with file(doc('index.rst'), 'w') as f: |
52 # f.write(index) | 50 # f.write(index) |