annotate doc/build_html.py @ 689:456a1ed04650

Here's a cron-job reminder script... ...that we're going to be using here at ekit. Might be useful for other people. Could use some work making it more general and easier to customise.
author Richard Jones <richard@users.sourceforge.net>
date Mon, 15 Apr 2002 06:37:31 +0000
parents 1dcbee29faa7
children f5e387cfb825
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
653
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
1 #!/usr/bin/env python
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
2
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
3 """
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
4 :Author: David Goodger
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
5 :Contact: goodger@users.sourceforge.net
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
6 :Revision: $Revision: 1.1 $
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
7 :Date: $Date: 2002-03-08 23:41:46 $
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
8 :Copyright: This module has been placed in the public domain.
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
9
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
10 A minimal front-end to the Docutils Publisher.
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
11
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
12 This module takes advantage of the default values defined in `publish()`.
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
13 """
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
14
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
15 import sys, os.path
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
16 from dps.core import publish
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
17 from dps import utils
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
18
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
19 if len(sys.argv) < 2:
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
20 print >>sys.stderr, 'I need at least one filename'
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
21 sys.exit(1)
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
22
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
23 reporter = utils.Reporter(2, 4)
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
24
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
25 for file in sys.argv[1:]:
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
26 name, ext = os.path.splitext(file)
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
27 dest = '%s.html'%name
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
28 print >>sys.stderr, '%s -> %s'%(file, dest)
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
29 publish(writername='html', source=file, destination=dest,
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
30 reporter=reporter)
1dcbee29faa7 More work on the documentation - rolled in the work done by Jeff Blaine.
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
31

Roundup Issue Tracker: http://roundup-tracker.org/