From 7d40569aa12eb45562bb56a4e603c11f8d5619ee Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Sun, 28 May 2023 15:24:52 +0200 Subject: [PATCH] Inform the user what is happening when running without any arguments and suggest using --help to get the help text (closes: #156) --- src/img2pdf.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/img2pdf.py b/src/img2pdf.py index 348b843..3a4f8c6 100755 --- a/src/img2pdf.py +++ b/src/img2pdf.py @@ -2459,7 +2459,6 @@ def find_scale(pagewidth, pageheight): # as a binary string representing the image content or as filenames to the # images. def convert(*images, **kwargs): - _default_kwargs = dict( engine=None, title=None, @@ -4246,7 +4245,11 @@ and left/right, respectively. It is not possible to specify asymmetric borders. elif len(args.images) == 0 and len(args.from_file) == 0: # if no positional arguments were supplied, read a single image from # standard input - logger.info("reading image from standard input") + print( + "Reading image from standard input...\n" + "Re-run with -h or --help for usage information.", + file=sys.stderr + ) try: images = [sys.stdin.buffer.read()] except KeyboardInterrupt: