diff options
| author | goodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2002-10-03 22:17:55 +0000 |
|---|---|---|
| committer | goodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2002-10-03 22:17:55 +0000 |
| commit | fafe85c198aa1a50f629fda8f856ece40ccd1de6 (patch) | |
| tree | 7536d881053ad01c3a4daa0f4d50f297bbbf535b /docutils/tools/quicktest.py | |
| parent | 7040fb3e79ac21a7299b1c7f6940606a573e6473 (diff) | |
| download | docutils-fafe85c198aa1a50f629fda8f856ece40ccd1de6.tar.gz | |
Added ``-V``/``--version`` option.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@758 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/tools/quicktest.py')
| -rwxr-xr-x | docutils/tools/quicktest.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/docutils/tools/quicktest.py b/docutils/tools/quicktest.py index ccabf4ed6..200f46c20 100755 --- a/docutils/tools/quicktest.py +++ b/docutils/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']: |
