From: David G. <go...@us...> - 2002-08-02 03:30:25
|
Update of /cvsroot/docutils/docutils/tools In directory usw-pr-cvs1:/tmp/cvs-serv23040/docutils/tools Modified Files: buildhtml.py Log Message: Added "--silent" option. Index: buildhtml.py =================================================================== RCS file: /cvsroot/docutils/docutils/tools/buildhtml.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** buildhtml.py 31 Jul 2002 02:24:34 -0000 1.6 --- buildhtml.py 2 Aug 2002 03:30:22 -0000 1.7 *************** *** 44,48 **** ['--recurse'], {'action': 'store_true', 'default': 1}), ('Do not scan subdirectories for files to process.', ! ['--local'], {'dest': 'recurse', 'action': 'store_false'}),)) --- 44,50 ---- ['--recurse'], {'action': 'store_true', 'default': 1}), ('Do not scan subdirectories for files to process.', ! ['--local'], {'dest': 'recurse', 'action': 'store_false'}), ! ('Work silently (no progress messages). Independent of "--quiet".', ! ['--silent'], {'action': 'store_true'}),)) *************** *** 84,90 **** def visit(self, recurse, directory, names): - print >>sys.stderr, '/// Processing directory:', directory - sys.stderr.flush() options = self.get_options(directory) peps_found = 0 for name in names: --- 86,93 ---- def visit(self, recurse, directory, names): options = self.get_options(directory) + if not options.silent: + print >>sys.stderr, '/// Processing directory:', directory + sys.stderr.flush() peps_found = 0 for name in names: *************** *** 103,108 **** options._destination = options._source[:-4]+'.html' self.pub.options = options ! print >>sys.stderr, ' ::: Processing .txt:', name ! sys.stderr.flush() self.pub.source = io.FileIO(options, source_path=options._source) self.pub.destination = io.FileIO( --- 106,112 ---- options._destination = options._source[:-4]+'.html' self.pub.options = options ! if not options.silent: ! print >>sys.stderr, ' ::: Processing .txt:', name ! sys.stderr.flush() self.pub.source = io.FileIO(options, source_path=options._source) self.pub.destination = io.FileIO( *************** *** 113,120 **** old_directory = os.getcwd() os.chdir(directory) ! print >>sys.stderr, ' ::: Processing PEPs:' ! sys.stderr.flush() pep2html.docutils_options = options ! pep2html.main() os.chdir(old_directory) --- 117,128 ---- old_directory = os.getcwd() os.chdir(directory) ! if options.silent: ! argv = ['-q'] ! else: ! print >>sys.stderr, ' ::: Processing PEPs:' ! sys.stderr.flush() ! argv = [] pep2html.docutils_options = options ! pep2html.main(argv) os.chdir(old_directory) *************** *** 130,135 **** self.cmdline_options = option_parser.parse_args( values=frontend.Values()) # no defaults - # Clear out the command-line options so pep2html doesn't see them: - del sys.argv[1:] def get_options(self, directory=None): --- 138,141 ---- |