Skip to content

Commit

Permalink
Add the --fill-area CLI option, update README
Browse files Browse the repository at this point in the history
Close #8
  • Loading branch information
mportesdev committed Apr 4, 2023
1 parent b0d3c8a commit 4bc6145
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ Installation
pip install pictureshow
Third-party dependencies:

- `Pillow <https://pypi.org/project/Pillow/>`__
- `reportlab <https://pypi.org/project/reportlab/>`__

Usage
=====
Expand All @@ -38,6 +33,8 @@ As a command line tool
options:
-h, --help show this help message and exit
-a, --fill-area fill drawing area with picture, ignoring the picture's
aspect ratio
-f, --force-overwrite
save to output filename even if file exists
-L, --landscape set landscape orientation of page; default is portrait
Expand Down Expand Up @@ -119,6 +116,7 @@ correspond to the above shown command line options:
margin=72,
layout=(1, 1),
stretch_small=False,
fill_area=False,
force_overwrite=False
)
Expand Down Expand Up @@ -151,6 +149,7 @@ default values correspond to the above shown command line options:
margin=72,
layout=(1, 1),
stretch_small=False,
fill_area=False,
force_overwrite=False
)
Expand Down
4 changes: 4 additions & 0 deletions pictureshow/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
def get_args(parser):
parser.add_argument('pictures', nargs='+', metavar='PICTURE',
help='one or more picture paths or URLs')
parser.add_argument('-a', '--fill-area', action='store_true',
help="fill drawing area with picture, ignoring the picture's"
" aspect ratio")
parser.add_argument('-f', '--force-overwrite', action='store_true',
help='save to output filename even if file exists')
parser.add_argument('-L', '--landscape', action='store_true',
Expand Down Expand Up @@ -92,6 +95,7 @@ def main():
margin=args.margin,
layout=args.layout,
stretch_small=args.stretch_small,
fill_area=args.fill_area,
force_overwrite=args.force_overwrite
)
except Exception as err:
Expand Down

0 comments on commit 4bc6145

Please sign in to comment.