Skip to content

Commit

Permalink
Fixes thorstenb#20 - add optional --version argument
Browse files Browse the repository at this point in the history
  • Loading branch information
thorstenb authored and Thorsten Behrens committed Mar 26, 2015
1 parent bd436d1 commit 7a3009a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -43,7 +43,7 @@ Run `tox` to run the test suite.

## Usage

usage: odpdown [-h] [-p PAGE] [-n] [-s HIGHLIGHT_STYLE]
usage: odpdown [-h] [--version] [-p PAGE] [-n] [-s HIGHLIGHT_STYLE]
[--break-master [BREAK_MASTER]]
[--content-master [CONTENT_MASTER]]
input_md template_odp output_odp
Expand All @@ -57,6 +57,7 @@ Run `tox` to run the test suite.

optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
-p PAGE, --page PAGE Append markdown after given page. Negative numbers
count from the end of the slide stack. [Defaults to
-1]
Expand Down
2 changes: 2 additions & 0 deletions odpdown.py
Expand Up @@ -755,6 +755,8 @@ def main():
"""Command-line conversion tool"""
parser = argparse.ArgumentParser(
description='Convert markdown text into OpenDocument presentations')
parser.add_argument('--version', action='version',
version='%(prog)s ' + __version__)
parser.add_argument('input_md',
help='Input markdown file')
parser.add_argument('template_odp',
Expand Down

0 comments on commit 7a3009a

Please sign in to comment.