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

Lack of .pdf extension breaks command #30

Open
jwhendy opened this issue May 1, 2017 · 0 comments
Open

Lack of .pdf extension breaks command #30

jwhendy opened this issue May 1, 2017 · 0 comments
Labels

Comments

@jwhendy
Copy link

jwhendy commented May 1, 2017

Greetings,

I've been a user of this for a long time now and haven't run into this before! I used wget to grab a bunch of pdfs with a script, which would also strip off the first page of each and write to a separate file. I absentmindely forgot to add .pdf in my bash script writing them out, and so my call looked like this, which failed (subbing names):

stapler cat file1 1 file2 1 ... fileN 1 out.pdf
Error: Invalid range: file1

To skip to the punch line, after re-reading the instructions 10 times I was pretty sure it wasn't my syntax. I renamed file1 to file1.pdf and it worked.

I'm guessing you parse up the command line call to figure out what are page numbers and what are file names using .pdf as a delimiter? In hindsight, I guess this makes sense, as how else would you know what to do with a file name like 1-4 (you rely/anticipate 1-4.pdf)!?

This is mostly for anyone else who stumbles on this, though I wondered if a note in the readme would be helpful. Thanks for taking a look.

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

No branches or pull requests

2 participants