From b58392ec5ae4103ac9750dc0f89949b3670b94b3 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Sat, 26 Sep 2020 19:20:53 +0200 Subject: [PATCH] print a more helpful error message when running plakativ without any arguments on non-Windows systems --- plakativ.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plakativ.py b/plakativ.py index d2d2288..2137864 100755 --- a/plakativ.py +++ b/plakativ.py @@ -2106,6 +2106,15 @@ def parse_pagesize_rectarg(string): def main(): + if len(sys.argv) == 1 and platform.system() != "Windows": + print(""" +You called plakativ without arguments. At least one of the options --size, +--factor or --maxpages is required for running plakativ on the command line. +But maybe you meant to run the plakativ GUI instead? On platforms other than +Windows, the default is to run the command line interface. To run the graphical +user interface, run plakativ with the --gui option instead. +""", file=sys.stderr) + rendered_papersizes = "" for k, v in sorted(papersizes.items()): rendered_papersizes += " %-8s %s\n" % (papernames[k], v)