stapler
stapler copied to clipboard
Add sele mode so that each input file has an even number of pages
Hello,
I find this tool very useful and I just added a new select/concat mode sele
to it in case people want to read the generated output in double-page layout or they want to print it out.
Basically it inserts an empty page after each input if that input ends with an odd page number. For example if input files have 3, 5, 7 pages, resp. then in sele
mode the output will be (3 + 1) + (5 + 1) + (7 + 1) = 18 pages.
The empty page is generated with reportlab and is set to have the same size as the page previous to it.
Thank you for consideration.
Oh, this is very clever. That's a great idea! I'm a little wary about adding another dependency, but this might be worth it. I'll have to think about it some more. Also, I don't really like the sele. I think it should be part of sel/cat, but maybe an option like "--add-empty-page" or "-e". Or maybe this is the moment where a .config/stapler/staplerrc configuration file should come in...
Ideas?
sorry for leaving you hanging for so long. I will tackle this over the weekend.
See https://github.com/cykerway/stapler/pull/1
So, I am back, developing this application. I have started rewriting the command parsing, to enable options to commands. After some consideration, I did not find adding a letter to a command to be very intuitive and I decided to make it possible to extend commands with some sort of arguments/options. At that point, your changes will become easy to incorporate, as you have structured your changes quite well. :+1: Stay tuned :) And sorry for dragging my feet. Life happened.