From 101671ae44e1686680c80cd07b452aabeb88fb63 Mon Sep 17 00:00:00 2001 From: goodger Date: Sat, 20 Apr 2002 03:01:52 +0000 Subject: Initial revision git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@18 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- tools/quicktest.py | 185 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100755 tools/quicktest.py (limited to 'tools/quicktest.py') diff --git a/tools/quicktest.py b/tools/quicktest.py new file mode 100755 index 000000000..df295f66a --- /dev/null +++ b/tools/quicktest.py @@ -0,0 +1,185 @@ +#!/usr/bin/env python + +""" +:Author: Garth Kidd +:Contact: garth@deadlybloodyserious.com +:Author: David Goodger +:Contact: goodger@users.sourceforge.net +:Revision: $Revision$ +:Date: $Date$ +:Copyright: This module has been placed in the public domain. +""" + +import sys, os, getopt +import docutils.utils +from docutils.parsers.rst import Parser + + +usage_header = """\ +quicktest.py: quickly test the restructuredtext parser. + +Usage:: + + quicktest.py [options] [filename] + +``filename`` is the name of the file to use as input (default is stdin). + +Options: +""" + +options = [('pretty', 'p', + 'output pretty pseudo-xml: no "&abc;" entities (default)'), + ('test', 't', 'output test-ready data (input & expected output, ' + 'ready to be copied to a parser test module)'), + ('rawxml', 'r', 'output raw XML'), + ('styledxml=', 's', 'output raw XML with XSL style sheet reference ' + '(filename supplied in the option argument)'), + ('xml', 'x', 'output pretty XML (indented)'), + ('debug', 'd', 'debug mode (lots of output)'), + ('help', 'h', 'show help text')] +"""See distutils.fancy_getopt.FancyGetopt.__init__ for a description of the +data structure: (long option, short option, description).""" + +def usage(): + print usage_header + for longopt, shortopt, description in options: + if longopt[-1:] == '=': + opts = '-%s arg, --%sarg' % (shortopt, longopt) + else: + opts = '-%s, --%s' % (shortopt, longopt), + print '%-15s' % opts, + if len(opts) > 14: + print '%-16s' % '\n', + while len(description) > 60: + limit = description.rindex(' ', 0, 60) + print description[:limit].strip() + description = description[limit + 1:] + print '%-15s' % ' ', + print description + +def _pretty(input, document, optargs): + return document.pformat() + +def _rawxml(input, document, optargs): + return document.asdom().toxml() + +def _styledxml(input, document, optargs): + docnode = document.asdom().childNodes[0] + return '%s\n%s\n%s' % ( + '', + '' % optargs['styledxml'], + docnode.toxml()) + +def _prettyxml(input, document, optargs): + return document.asdom().toprettyxml(' ', '\n') + +def _test(input, document, optargs): + tq = '"""' + output = document.pformat() # same as _pretty() + return """\ + totest['change_this_test_name'] = [ +[%s\\ +%s +%s, +%s\\ +%s +%s], +] +""" % ( tq, escape(input.rstrip()), tq, tq, escape(output.rstrip()), tq ) + +def escape(text): + """ + Return `text` in a form compatible with triple-double-quoted Python strings. + """ + text = text.replace('\\', '\\\\') # escape backslashes + text = text.replace('"""', '""\\"') # break up triple-double-quotes + text = text.replace(' \n', ' \\n\\\n') # protect trailing whitespace + return text + +_outputFormatters = { + 'rawxml': _rawxml, + 'styledxml': _styledxml, + 'xml': _prettyxml, + 'pretty' : _pretty, + 'test': _test + } + +def format(outputFormat, input, document, optargs): + formatter = _outputFormatters[outputFormat] + return formatter(input, document, optargs) + +def getArgs(): + if os.name == 'mac' and len(sys.argv) <= 1: + return macGetArgs() + else: + return posixGetArgs(sys.argv[1:]) + +def posixGetArgs(argv): + outputFormat = 'pretty' + # convert fancy_getopt style option list to getopt.getopt() arguments + shortopts = ''.join([option[1] + ':' * (option[0][-1:] == '=') + for option in options if option[1]]) + longopts = [option[0] for option in options if option[0]] + try: + opts, args = getopt.getopt(argv, shortopts, longopts) + except getopt.GetoptError: + usage() + sys.exit(2) + optargs = {'debug': 0} + for o, a in opts: + if o in ['-h', '--help']: + usage() + sys.exit() + elif o in ['-r', '--rawxml']: + outputFormat = 'rawxml' + elif o in ['-s', '--styledxml']: + outputFormat = 'styledxml' + optargs['styledxml'] = a + elif o in ['-x', '--xml']: + outputFormat = 'xml' + elif o in ['-p', '--pretty']: + outputFormat = 'pretty' + elif o in ['-t', '--test']: + outputFormat = 'test' + elif o in ['-d', '--debug']: + optargs['debug'] = 1 + else: + raise getopt.GetoptError, "getopt should have saved us!" + if len(args) > 1: + print "Only one file at a time, thanks." + usage() + sys.exit(1) + if len(args) == 1: + inputFile = open(args[0]) + else: + inputFile = sys.stdin + return inputFile, outputFormat, optargs + +def macGetArgs(): + import EasyDialogs + EasyDialogs.Message("""\ +In the following window, please: + +1. Choose an output format from the "Option" list. +2. Click "Add" (if you don't, the default format will + be "pretty"). +3. Click "Add existing file..." and choose an input file. +4. Click "OK".""") + optionlist = [(longopt, description) + for (longopt, shortopt, description) in options] + argv = EasyDialogs.GetArgv(optionlist=optionlist, addnewfile=0, addfolder=0) + return posixGetArgs(argv) + +def main(): + inputFile, outputFormat, optargs = getArgs() # process cmdline arguments + parser = Parser() + input = inputFile.read() + document = docutils.utils.newdocument(debug=optargs['debug']) + parser.parse(input, document) + output = format(outputFormat, input, document, optargs) + print output, + + +if __name__ == '__main__': + sys.stderr = sys.stdout + main() -- cgit v1.2.1 From 34f7a6d1ac6f52cf920a933aba804f54c7be5525 Mon Sep 17 00:00:00 2001 From: goodger Date: Sun, 5 May 2002 15:49:41 +0000 Subject: updated git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@91 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- tools/quicktest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/quicktest.py') diff --git a/tools/quicktest.py b/tools/quicktest.py index df295f66a..fab25adce 100755 --- a/tools/quicktest.py +++ b/tools/quicktest.py @@ -174,7 +174,7 @@ def main(): inputFile, outputFormat, optargs = getArgs() # process cmdline arguments parser = Parser() input = inputFile.read() - document = docutils.utils.newdocument(debug=optargs['debug']) + document = docutils.utils.new_document(debug=optargs['debug']) parser.parse(input, document) output = format(outputFormat, input, document, optargs) print output, -- cgit v1.2.1 From 1be17ead1d6e210c5a8d76cd44a283879f932d69 Mon Sep 17 00:00:00 2001 From: goodger Date: Thu, 30 May 2002 02:29:07 +0000 Subject: updated git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@158 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- tools/quicktest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools/quicktest.py') diff --git a/tools/quicktest.py b/tools/quicktest.py index fab25adce..d76845023 100755 --- a/tools/quicktest.py +++ b/tools/quicktest.py @@ -10,7 +10,9 @@ :Copyright: This module has been placed in the public domain. """ -import sys, os, getopt +import sys +import os +import getopt import docutils.utils from docutils.parsers.rst import Parser -- cgit v1.2.1 From a9913f6dfaab8d568b019f4d700c966c44bb1032 Mon Sep 17 00:00:00 2001 From: goodger Date: Thu, 27 Jun 2002 01:24:56 +0000 Subject: Added the "--attributes" option, hacked a bit. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@213 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- tools/quicktest.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'tools/quicktest.py') diff --git a/tools/quicktest.py b/tools/quicktest.py index d76845023..cf3884875 100755 --- a/tools/quicktest.py +++ b/tools/quicktest.py @@ -13,7 +13,8 @@ import sys import os import getopt -import docutils.utils +from docutils.frontend import OptionParser +from docutils.utils import new_document from docutils.parsers.rst import Parser @@ -37,6 +38,7 @@ options = [('pretty', 'p', ('styledxml=', 's', 'output raw XML with XSL style sheet reference ' '(filename supplied in the option argument)'), ('xml', 'x', 'output pretty XML (indented)'), + ('attributes', '', 'dump document attributes after processing'), ('debug', 'd', 'debug mode (lots of output)'), ('help', 'h', 'show help text')] """See distutils.fancy_getopt.FancyGetopt.__init__ for a description of the @@ -127,7 +129,7 @@ def posixGetArgs(argv): except getopt.GetoptError: usage() sys.exit(2) - optargs = {'debug': 0} + optargs = {'debug': 0, 'attributes': 0} for o, a in opts: if o in ['-h', '--help']: usage() @@ -143,6 +145,8 @@ def posixGetArgs(argv): outputFormat = 'pretty' elif o in ['-t', '--test']: outputFormat = 'test' + elif o == '--attributes': + optargs['attributes'] = 1 elif o in ['-d', '--debug']: optargs['debug'] = 1 else: @@ -174,12 +178,17 @@ In the following window, please: def main(): inputFile, outputFormat, optargs = getArgs() # process cmdline arguments + options = OptionParser().get_default_values() + options.debug = optargs['debug'] parser = Parser() input = inputFile.read() - document = docutils.utils.new_document(debug=optargs['debug']) + document = new_document(options) parser.parse(input, document) output = format(outputFormat, input, document, optargs) print output, + if optargs['attributes']: + import pprint + pprint.pprint(document.__dict__) if __name__ == '__main__': -- cgit v1.2.1 From 02b1f1efbb561ab4e396cd44f4edb4fa5f671863 Mon Sep 17 00:00:00 2001 From: goodger Date: Thu, 4 Jul 2002 01:29:40 +0000 Subject: - Added ``locale.setlocale()`` calls to front-ends. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@246 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- tools/quicktest.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/quicktest.py') diff --git a/tools/quicktest.py b/tools/quicktest.py index cf3884875..9517b95cc 100755 --- a/tools/quicktest.py +++ b/tools/quicktest.py @@ -10,6 +10,9 @@ :Copyright: This module has been placed in the public domain. """ +import locale +locale.setlocale(locale.LC_ALL, '') + import sys import os import getopt -- cgit v1.2.1 From f03140adb17f496124ff185331d2ab204eccb4fa Mon Sep 17 00:00:00 2001 From: goodger Date: Sat, 27 Jul 2002 03:52:46 +0000 Subject: Added a second command-line argument (output file); cleaned up. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@380 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- tools/quicktest.py | 51 ++++++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 23 deletions(-) (limited to 'tools/quicktest.py') diff --git a/tools/quicktest.py b/tools/quicktest.py index 9517b95cc..133cfc815 100755 --- a/tools/quicktest.py +++ b/tools/quicktest.py @@ -26,9 +26,11 @@ quicktest.py: quickly test the restructuredtext parser. Usage:: - quicktest.py [options] [filename] + quicktest.py [options] [ []] -``filename`` is the name of the file to use as input (default is stdin). +``source`` is the name of the file to use as input (default is stdin). +``destination`` is the name of the file to create as output (default is +stdout). Options: """ @@ -38,8 +40,8 @@ options = [('pretty', 'p', ('test', 't', 'output test-ready data (input & expected output, ' 'ready to be copied to a parser test module)'), ('rawxml', 'r', 'output raw XML'), - ('styledxml=', 's', 'output raw XML with XSL style sheet reference ' - '(filename supplied in the option argument)'), + ('styledxml=', 's', 'output raw XML with XSL style sheet ' + 'reference (filename supplied in the option argument)'), ('xml', 'x', 'output pretty XML (indented)'), ('attributes', '', 'dump document attributes after processing'), ('debug', 'd', 'debug mode (lots of output)'), @@ -74,8 +76,8 @@ def _styledxml(input, document, optargs): docnode = document.asdom().childNodes[0] return '%s\n%s\n%s' % ( '', - '' % optargs['styledxml'], - docnode.toxml()) + '' + % optargs['styledxml'], docnode.toxml()) def _prettyxml(input, document, optargs): return document.asdom().toprettyxml(' ', '\n') @@ -96,7 +98,7 @@ def _test(input, document, optargs): def escape(text): """ - Return `text` in a form compatible with triple-double-quoted Python strings. + Return `text` in triple-double-quoted Python string form. """ text = text.replace('\\', '\\\\') # escape backslashes text = text.replace('"""', '""\\"') # break up triple-double-quotes @@ -154,33 +156,36 @@ def posixGetArgs(argv): optargs['debug'] = 1 else: raise getopt.GetoptError, "getopt should have saved us!" - if len(args) > 1: - print "Only one file at a time, thanks." + if len(args) > 2: + print 'Maximum 2 arguments allowed.' usage() sys.exit(1) - if len(args) == 1: - inputFile = open(args[0]) - else: - inputFile = sys.stdin - return inputFile, outputFormat, optargs + inputFile = sys.stdin + outputFile = sys.stdout + if args: + inputFile = open(args.pop(0)) + if args: + outputFile = open(args.pop(0), 'w') + return inputFile, outputFile, outputFormat, optargs def macGetArgs(): import EasyDialogs EasyDialogs.Message("""\ -In the following window, please: +Use the next dialog to build a command line: -1. Choose an output format from the "Option" list. -2. Click "Add" (if you don't, the default format will - be "pretty"). -3. Click "Add existing file..." and choose an input file. -4. Click "OK".""") +1. Choose an output format from the [Option] list +2. Click [Add] +3. Choose an input file: [Add existing file...] +4. Save the output: [Add new file...] +5. [OK]""") optionlist = [(longopt, description) for (longopt, shortopt, description) in options] - argv = EasyDialogs.GetArgv(optionlist=optionlist, addnewfile=0, addfolder=0) + argv = EasyDialogs.GetArgv(optionlist=optionlist, addfolder=0) return posixGetArgs(argv) def main(): - inputFile, outputFormat, optargs = getArgs() # process cmdline arguments + # process cmdline arguments: + inputFile, outputFile, outputFormat, optargs = getArgs() options = OptionParser().get_default_values() options.debug = optargs['debug'] parser = Parser() @@ -188,7 +193,7 @@ def main(): document = new_document(options) parser.parse(input, document) output = format(outputFormat, input, document, optargs) - print output, + outputFile.write(output) if optargs['attributes']: import pprint pprint.pprint(document.__dict__) -- cgit v1.2.1 From 13ed20d392cc6c5e727344dad0c3aca8cea125f1 Mon Sep 17 00:00:00 2001 From: goodger Date: Wed, 21 Aug 2002 03:00:07 +0000 Subject: updated git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@572 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- tools/quicktest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/quicktest.py') diff --git a/tools/quicktest.py b/tools/quicktest.py index 133cfc815..2f0c46454 100755 --- a/tools/quicktest.py +++ b/tools/quicktest.py @@ -190,7 +190,7 @@ def main(): options.debug = optargs['debug'] parser = Parser() input = inputFile.read() - document = new_document(options) + document = new_document(inputFile.name, options) parser.parse(input, document) output = format(outputFormat, input, document, optargs) outputFile.write(output) -- cgit v1.2.1 From c2291595af5c117f10061fd9bf68fa0ff69d74fa Mon Sep 17 00:00:00 2001 From: goodger Date: Thu, 19 Sep 2002 00:51:03 +0000 Subject: updated git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@695 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- tools/quicktest.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'tools/quicktest.py') diff --git a/tools/quicktest.py b/tools/quicktest.py index 2f0c46454..fc74d5121 100755 --- a/tools/quicktest.py +++ b/tools/quicktest.py @@ -1,14 +1,12 @@ #!/usr/bin/env python -""" -:Author: Garth Kidd -:Contact: garth@deadlybloodyserious.com -:Author: David Goodger -:Contact: goodger@users.sourceforge.net -:Revision: $Revision$ -:Date: $Date$ -:Copyright: This module has been placed in the public domain. -""" +# Author: Garth Kidd +# Contact: garth@deadlybloodyserious.com +# Author: David Goodger +# Contact: goodger@users.sourceforge.net +# Revision: $Revision$ +# Date: $Date$ +# Copyright: This module has been placed in the public domain. import locale locale.setlocale(locale.LC_ALL, '') @@ -46,8 +44,8 @@ options = [('pretty', 'p', ('attributes', '', 'dump document attributes after processing'), ('debug', 'd', 'debug mode (lots of output)'), ('help', 'h', 'show help text')] -"""See distutils.fancy_getopt.FancyGetopt.__init__ for a description of the -data structure: (long option, short option, description).""" +"""See ``distutils.fancy_getopt.FancyGetopt.__init__`` for a description of +the data structure: (long option, short option, description).""" def usage(): print usage_header @@ -186,7 +184,7 @@ Use the next dialog to build a command line: def main(): # process cmdline arguments: inputFile, outputFile, outputFormat, optargs = getArgs() - options = OptionParser().get_default_values() + options = OptionParser(components=(Parser,)).get_default_values() options.debug = optargs['debug'] parser = Parser() input = inputFile.read() -- cgit v1.2.1 From fe1222623a8f8eae5552984bb8186e69e735cbed Mon Sep 17 00:00:00 2001 From: goodger Date: Fri, 20 Sep 2002 02:49:01 +0000 Subject: Made the ``locale.setlocale()`` calls in front ends fault-tolerant. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@697 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- tools/quicktest.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools/quicktest.py') diff --git a/tools/quicktest.py b/tools/quicktest.py index fc74d5121..ccabf4ed6 100755 --- a/tools/quicktest.py +++ b/tools/quicktest.py @@ -9,7 +9,10 @@ # Copyright: This module has been placed in the public domain. import locale -locale.setlocale(locale.LC_ALL, '') +try: + locale.setlocale(locale.LC_ALL, '') +except: + pass import sys import os -- cgit v1.2.1 From b53fe4bfc549c05db10526da6555fbd1ed73a57e Mon Sep 17 00:00:00 2001 From: goodger Date: Thu, 3 Oct 2002 22:17:55 +0000 Subject: Added ``-V``/``--version`` option. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@758 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- tools/quicktest.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tools/quicktest.py') diff --git a/tools/quicktest.py b/tools/quicktest.py index ccabf4ed6..200f46c20 100755 --- a/tools/quicktest.py +++ b/tools/quicktest.py @@ -17,6 +17,7 @@ except: import sys import os import getopt +import docutils from docutils.frontend import OptionParser from docutils.utils import new_document from docutils.parsers.rst import Parser @@ -46,7 +47,8 @@ options = [('pretty', 'p', ('xml', 'x', 'output pretty XML (indented)'), ('attributes', '', 'dump document attributes after processing'), ('debug', 'd', 'debug mode (lots of output)'), - ('help', 'h', 'show help text')] + ('version', 'V', 'show Docutils version then exit'), + ('help', 'h', 'show help text then exit')] """See ``distutils.fancy_getopt.FancyGetopt.__init__`` for a description of the data structure: (long option, short option, description).""" @@ -140,6 +142,10 @@ def posixGetArgs(argv): if o in ['-h', '--help']: usage() sys.exit() + elif o in ['-V', '--version']: + print >>sys.stderr, ('quicktest.py (Docutils %s)' + % docutils.__version) + sys.exit() elif o in ['-r', '--rawxml']: outputFormat = 'rawxml' elif o in ['-s', '--styledxml']: -- cgit v1.2.1 From 0590bfaf42788314fb22491b5497079843713f2e Mon Sep 17 00:00:00 2001 From: goodger Date: Tue, 8 Oct 2002 01:28:42 +0000 Subject: Added "-A" option. Fixed typo. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@773 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- tools/quicktest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/quicktest.py') diff --git a/tools/quicktest.py b/tools/quicktest.py index 200f46c20..1ee77b3c4 100755 --- a/tools/quicktest.py +++ b/tools/quicktest.py @@ -45,7 +45,7 @@ options = [('pretty', 'p', ('styledxml=', 's', 'output raw XML with XSL style sheet ' 'reference (filename supplied in the option argument)'), ('xml', 'x', 'output pretty XML (indented)'), - ('attributes', '', 'dump document attributes after processing'), + ('attributes', 'A', 'dump document attributes after processing'), ('debug', 'd', 'debug mode (lots of output)'), ('version', 'V', 'show Docutils version then exit'), ('help', 'h', 'show help text then exit')] @@ -58,7 +58,7 @@ def usage(): if longopt[-1:] == '=': opts = '-%s arg, --%sarg' % (shortopt, longopt) else: - opts = '-%s, --%s' % (shortopt, longopt), + opts = '-%s, --%s' % (shortopt, longopt) print '%-15s' % opts, if len(opts) > 14: print '%-16s' % '\n', -- cgit v1.2.1 From afeedfb343c2904e9357997d2a50f8f3cabb2568 Mon Sep 17 00:00:00 2001 From: goodger Date: Fri, 18 Oct 2002 04:55:21 +0000 Subject: Refactored names (options -> settings; .transform() -> .apply(); etc.); updated. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@825 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- tools/quicktest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/quicktest.py') diff --git a/tools/quicktest.py b/tools/quicktest.py index 1ee77b3c4..83b5a622b 100755 --- a/tools/quicktest.py +++ b/tools/quicktest.py @@ -193,11 +193,11 @@ Use the next dialog to build a command line: def main(): # process cmdline arguments: inputFile, outputFile, outputFormat, optargs = getArgs() - options = OptionParser(components=(Parser,)).get_default_values() - options.debug = optargs['debug'] + settings = OptionParser(components=(Parser,)).get_default_values() + settings.debug = optargs['debug'] parser = Parser() input = inputFile.read() - document = new_document(inputFile.name, options) + document = new_document(inputFile.name, settings) parser.parse(input, document) output = format(outputFormat, input, document, optargs) outputFile.write(output) -- cgit v1.2.1 From 1f393658c70d96fdad22e213721531c2e1553bc5 Mon Sep 17 00:00:00 2001 From: goodger Date: Fri, 10 Jan 2003 02:21:09 +0000 Subject: typo git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@1088 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- tools/quicktest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/quicktest.py') diff --git a/tools/quicktest.py b/tools/quicktest.py index 83b5a622b..04e3209fa 100755 --- a/tools/quicktest.py +++ b/tools/quicktest.py @@ -144,7 +144,7 @@ def posixGetArgs(argv): sys.exit() elif o in ['-V', '--version']: print >>sys.stderr, ('quicktest.py (Docutils %s)' - % docutils.__version) + % docutils.__version__) sys.exit() elif o in ['-r', '--rawxml']: outputFormat = 'rawxml' -- cgit v1.2.1 From f877afc0916de9f9177df646b34f4d6157808693 Mon Sep 17 00:00:00 2001 From: orutherfurd Date: Sun, 28 Mar 2004 15:39:27 +0000 Subject: moved locale imports into try blocks, for Jython compatibility git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@1896 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- tools/quicktest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/quicktest.py') diff --git a/tools/quicktest.py b/tools/quicktest.py index 04e3209fa..0cdff9549 100755 --- a/tools/quicktest.py +++ b/tools/quicktest.py @@ -8,8 +8,8 @@ # Date: $Date$ # Copyright: This module has been placed in the public domain. -import locale try: + import locale locale.setlocale(locale.LC_ALL, '') except: pass -- cgit v1.2.1 From 41903bd35c69157b432fb2284257707b3756c03c Mon Sep 17 00:00:00 2001 From: wiemann Date: Wed, 23 Mar 2005 22:21:20 +0000 Subject: added -A option to quicktest.py (as listed by quicktest.py -h) git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3103 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- tools/quicktest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/quicktest.py') diff --git a/tools/quicktest.py b/tools/quicktest.py index 0cdff9549..fbccb1aaa 100755 --- a/tools/quicktest.py +++ b/tools/quicktest.py @@ -157,7 +157,7 @@ def posixGetArgs(argv): outputFormat = 'pretty' elif o in ['-t', '--test']: outputFormat = 'test' - elif o == '--attributes': + elif o in ['--attributes', '-A']: optargs['attributes'] = 1 elif o in ['-d', '--debug']: optargs['debug'] = 1 -- cgit v1.2.1