Skip to content

Commit

Permalink
Update CLI usage message
Browse files Browse the repository at this point in the history
  • Loading branch information
mportesdev committed Dec 15, 2020
1 parent afd2f06 commit c52a4e9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 8 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Usage:

.. code::
usage: pictureshow [-h] [-v] [-q] [-f] [-L] [-m MARGIN] [-l LAYOUT] [-s]
usage: pictureshow [-h] [-v] [-q] [-f] [-p SIZE] [-L] [-m MARGIN] [-l LAYOUT]
[-s]
PIC [PIC ...] PDF
positional arguments:
Expand All @@ -20,12 +21,15 @@ Usage:
-q, --quiet suppress printing to stdout
-f, --force-overwrite
save output file even if filename exists
-p SIZE, --page-size SIZE
specify page size; default is A4
-L, --landscape force landscape orientation of page
-m MARGIN, --margin MARGIN
width of empty margin on page; default is 72 points (1
inch)
set width of empty space around pictures; default is
72 points (1 inch)
-l LAYOUT, --layout LAYOUT
grid layout of pictures on page; default is 1x1
specify grid layout of pictures on page; default is
1x1
-s, --stretch-small scale small pictures up to fit drawing area
Simple example — saving a single picture to PDF:
Expand Down
6 changes: 3 additions & 3 deletions pictureshow/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ def get_args(parser):
help='suppress printing to stdout')
parser.add_argument('-f', '--force-overwrite', action='store_true',
help='save output file even if filename exists')
parser.add_argument('-p', '--page-size', default='A4',
parser.add_argument('-p', '--page-size', default='A4', metavar='SIZE',
help='specify page size; default is A4')
parser.add_argument('-L', '--landscape', action='store_true',
help='force landscape orientation of page')
parser.add_argument('-m', '--margin', type=float, default=72,
help='width of empty margin on page;'
help='set width of empty space around pictures;'
' default is 72 points (1 inch)')
parser.add_argument('-l', '--layout', default='1x1',
help='grid layout of pictures on page; default is 1x1')
help='specify grid layout of pictures on page; default is 1x1')
parser.add_argument('-s', '--stretch-small', action='store_true',
help='scale small pictures up to fit drawing area')

Expand Down

0 comments on commit c52a4e9

Please # to comment.