Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdfmerge -h #21

Closed
mbeffa opened this issue Jan 9, 2018 · 4 comments
Closed

pdfmerge -h #21

mbeffa opened this issue Jan 9, 2018 · 4 comments

Comments

@mbeffa
Copy link

mbeffa commented Jan 9, 2018

I have this outdated concept that any program should respond to the -h command with a full list of features. pdfmerge claims to be able to rotate, but there is zero mention of rotate in the -h output.

pdfmerge -h

usage: pdfmerge [-h] [--version] [-o FILE] [-p PASSWORD] PATH [PATH ...]

Then I see the example on github,

$ pdfmerge -o out.pdf file1.pdf file2.pdf[3,3] file2.pdf[1V,2..-1] "other*.pdf[<]" "/path/pdf[1..4>,5]"

Now this is really, really smart.
[3,3] is a well-known code for what? Am I the only person in the world who does not understand?
[1V,2..-1] ?!?!???
[1..4>,5] ?@!

Thanks a lot.

@metaist
Copy link
Owner

metaist commented Jan 10, 2018

Hi @mbeffa.

Fair point and I will update this or accept a PR that does this well. In general, it feels like dumping lots of text into -h is less preferable to having a man page with lots of explanation, but the benefit of keeping everything together rather than having to look stuff up on GitHub wins.

To be fair, the rest of the README does go on to explain what all those modifiers do with examples. To answer your specific questions:

Let me know if this still doesn't make sense.

@mbeffa
Copy link
Author

mbeffa commented Jan 10, 2018 via email

@metaist
Copy link
Owner

metaist commented Jan 10, 2018

I'm not trying to put you down or make you feel stupid. Good idea with --help, I could just dump the relevant parts of the README.

Is there a convention with which you are more familiar? I wanted something array-like so that I could specify parts of a file, but also wanted it to be 1-indexed so that I could think of page numbers.

What is it that you're trying to do? Sounds like you're looking for a way to rotate a page some amount other than 90 degrees. That might an interesting feature to consider down the road.

In the meantime, you could use ImageMagick like so:

$ convert original.pdf -rotate 37 output.pdf

@metaist
Copy link
Owner

metaist commented Jun 5, 2023

I've gone ahead an added the relevant bits to --help using a docopt like docstring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants