From: <gr...@us...> - 2010-07-09 19:00:26
|
Author: grubert Date: 2010-07-09 21:00:18 +0200 (Fri, 09 Jul 2010) New Revision: 6366 Modified: trunk/docutils/tools/buildhtml.py Log: add option --dry-run for testing purpose Modified: trunk/docutils/tools/buildhtml.py =================================================================== --- trunk/docutils/tools/buildhtml.py 2010-07-07 14:59:03 UTC (rev 6365) +++ trunk/docutils/tools/buildhtml.py 2010-07-09 19:00:18 UTC (rev 6366) @@ -72,6 +72,9 @@ 'validator': frontend.validate_colon_separated_string_list}), ('Work silently (no progress messages). Independent of "--quiet".', ['--silent'], + {'action': 'store_true', 'validator': frontend.validate_boolean}), + ('Do not process files, show files that would be processed.', + ['--dry-run'], {'action': 'store_true', 'validator': frontend.validate_boolean}),)) relative_path_settings = ('prune',) @@ -229,7 +232,8 @@ print >>sys.stderr, ' ::: Processing:', name sys.stderr.flush() try: - core.publish_file(source_path=settings._source, + if not settings.dry_run: + core.publish_file(source_path=settings._source, destination_path=settings._destination, reader_name=pub_struct.reader_name, parser_name='restructuredtext', |