X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=paperjam.cc;h=0d3bf12c57fe95452fcd8cb1ec5b626966ce2f6d;hb=refs%2Fheads%2Fmaster;hp=6419a7ef40e59bbc6859920530e177e592e89142;hpb=fb5c6a3936ad37051d3dd1f1d8612bfdae2ec9b0;p=paperjam.git diff --git a/paperjam.cc b/paperjam.cc index 6419a7e..0d3bf12 100644 --- a/paperjam.cc +++ b/paperjam.cc @@ -1,7 +1,7 @@ /* * PaperJam -- Main program * - * (c) 2018 Martin Mares + * (c) 2018--2022 Martin Mares */ #include @@ -17,6 +17,7 @@ const char *in_name; const char *out_name; bool recalc_bbox; +bool no_auto_transforms; int debug_level; int debug_indent; @@ -69,6 +70,7 @@ void err(const char *msg, ...) enum opt { OPT_HELP = 256, OPT_VERSION, + OPT_NO_AUTO, }; static const struct option long_opts[] = { @@ -88,16 +90,27 @@ static void usage() Options:\n\ -b, --bbox Recalculate bounding boxes\n\ -d, --debug Show debugging messages\n\ + --no-auto Disable automatic rotation of pages\n\ \n\ = (, [=], ...) []\n\ = { , , ... }\n\ = ... [: ]\n\ \n\ +Example:\n\ +paperjam 'book nup(2, paper=a4)' input.pdf output.pdf\n\ +\n\ Commands:\n\ "); parser_help(); } +static void show_version() +{ + printf("PaperJam " VERSION " -- a PDF processor\n"); + printf("(c) " YEAR " Martin Mares, distributed under GNU GPL 2+\n"); + printf("Built on " BUILD_DATE " from Git commit " BUILD_COMMIT "\n"); +} + int main(int argc, char **argv) { int c; @@ -111,11 +124,14 @@ int main(int argc, char **argv) debug_level++; break; case OPT_VERSION: - printf("This is paperjam with no version yet.\n"); // FIXME + show_version(); return 0; case OPT_HELP: usage(); return 0; + case OPT_NO_AUTO: + no_auto_transforms = true; + break; default: exit(1); }