stapler icon indicating copy to clipboard operation
stapler copied to clipboard

Add sele mode so that each input file has an even number of pages

Open cykerway opened this issue 8 years ago • 4 comments

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.

cykerway avatar Dec 07 '15 19:12 cykerway

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?

hellerbarde avatar Mar 18 '16 17:03 hellerbarde

sorry for leaving you hanging for so long. I will tackle this over the weekend.

hellerbarde avatar Apr 16 '19 14:04 hellerbarde

See https://github.com/cykerway/stapler/pull/1

corollari avatar Feb 05 '20 05:02 corollari

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.

hellerbarde avatar Feb 18 '20 23:02 hellerbarde