Mercurial > p > roundup > code
comparison doc/build_html.py @ 707:f5e387cfb825
update for (dps+restructuretext) -> docutils
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 06 May 2002 23:38:07 +0000 |
| parents | 1dcbee29faa7 |
| children |
comparison
equal
deleted
inserted
replaced
| 706:7ba403bffed5 | 707:f5e387cfb825 |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 """ | 3 """ |
| 4 :Author: David Goodger | 4 :Author: David Goodger |
| 5 :Contact: goodger@users.sourceforge.net | 5 :Contact: goodger@users.sourceforge.net |
| 6 :Revision: $Revision: 1.1 $ | 6 :Revision: $Revision: 1.2 $ |
| 7 :Date: $Date: 2002-03-08 23:41:46 $ | 7 :Date: $Date: 2002-05-06 23:38:07 $ |
| 8 :Copyright: This module has been placed in the public domain. | 8 :Copyright: This module has been placed in the public domain. |
| 9 | 9 |
| 10 A minimal front-end to the Docutils Publisher. | 10 A minimal front-end to the Docutils Publisher. |
| 11 | 11 |
| 12 This module takes advantage of the default values defined in `publish()`. | 12 This module takes advantage of the default values defined in `publish()`. |
| 13 """ | 13 """ |
| 14 | 14 |
| 15 import sys, os.path | 15 import sys, os.path |
| 16 from dps.core import publish | 16 from docutils.core import publish |
| 17 from dps import utils | 17 from docutils import utils |
| 18 | 18 |
| 19 if len(sys.argv) < 2: | 19 if len(sys.argv) < 2: |
| 20 print >>sys.stderr, 'I need at least one filename' | 20 print >>sys.stderr, 'I need at least one filename' |
| 21 sys.exit(1) | 21 sys.exit(1) |
| 22 | 22 |
| 24 | 24 |
| 25 for file in sys.argv[1:]: | 25 for file in sys.argv[1:]: |
| 26 name, ext = os.path.splitext(file) | 26 name, ext = os.path.splitext(file) |
| 27 dest = '%s.html'%name | 27 dest = '%s.html'%name |
| 28 print >>sys.stderr, '%s -> %s'%(file, dest) | 28 print >>sys.stderr, '%s -> %s'%(file, dest) |
| 29 publish(writername='html', source=file, destination=dest, | 29 publish(writer_name='html', source=file, destination=dest, |
| 30 reporter=reporter) | 30 reporter=reporter) |
| 31 | 31 |
