Knulp79 twisted the bytes to say: I have a bunch of options that I created long time ago that I haven't had time to merge to the git version of xournal:
Usage: xournal [OPTION...] [FILE] Help Options: -h, --help Show help options --help-all Show all help options --help-gtk Show GTK+ Options Application Options: -p, --page=N Jump to Page -A, --export-pdf=FILENAME Export document to a PDF file --no-interface Show interface --no-interface-fullscreen Do not show interface in fullscreen mode. --fullscreen Run xournal in full screen --display=DISPLAY X display to use I used the g_lib parse features. eg: // parse command line options context = g_option_context_new (""); g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE); g_option_context_add_group (context, gtk_get_option_group (TRUE)); if (!g_option_context_parse (context, &argc, &argv, &error)) { printf(_("option parsing failed: %s\n"), error->message); exit (1); } that makes the parsing cleaner and more generic. I think it is a better way to support options in xournal. My code is in github under dmgerman/scholiar but needs to be extracted from many other features in there. --dmg Knulp79> Hello, Knulp79> first of all, thank you for developing and maintaining xournal. Knulp79> Sometimes I need to batch export a few xoj files to pdf and I would like to save Knulp79> some time by doing so from a bash script without having to open xournal Knulp79> and use the menus. Knulp79> I attach a small patch file that allows exporting using the following syntax: Knulp79> xournal filname.xoj -e filename.pdf Knulp79> If others find it useful, it might be worth including it into the next version of xournal. Knulp79> Best, Knulp79> Luca Knulp79> ------------------------------------------------------------------------------ Knulp79> CenturyLink Cloud: The Leader in Enterprise Cloud Services. Knulp79> Learn Why More Businesses Are Choosing CenturyLink Cloud For Knulp79> Critical Workloads, Development Environments & Everything In Between. Knulp79> Get a Quote or Start a Free Trial Today. Knulp79> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk Knulp79> _______________________________________________ Knulp79> Xournal-devel mailing list Knulp79> Xournal-devel@lists.sourceforge.net Knulp79> https://lists.sourceforge.net/lists/listinfo/xournal-devel -- Daniel M. German "I come out of traditional mathematics where we prove things, but we don't charge people Donald Knuth -> for using what we prove. " http://turingmachine.org/ http://silvernegative.com/ dmg (at) uvic (dot) ca replace (at) with @ and (dot) with . ------------------------------------------------------------------------------ WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk _______________________________________________ Xournal-devel mailing list Xournal-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xournal-devel