stlehmann / pdftools

small collection of python scripts for pdf manipulation
MIT License
93 stars 19 forks source link

Consider use a universal endline: Unix #4

Closed ryukinix closed 6 years ago

ryukinix commented 6 years ago

I installed from pip install pdftools and pdfmerge.py has ^M endlines (dos). Would be nice if this works without I need to fix that. Version used: 1.1.0.

stlehmann commented 6 years ago

Try the new release 1.1.1. Line-Endings should fit now.

ChristianRinn commented 6 years ago

Version 1.1.3 from pip has ^M endlines again, so I can not run it directly from the command line as I get

pdfadd.py --help
/usr/bin/env: ‘python\r’: No such file or directory
stlehmann commented 6 years ago

Hm, this is annoying. I use Windows for work but Mac at home. So it seems like it sometimes mixes things up.

stlehmann commented 6 years ago

OK, I uploaded the package from my Mac now and double-checked the line-endings. Should work now. Please give a short feedback if I'm right :)

ChristianRinn commented 6 years ago

It works like a charm. Thank you for the quick fix. I assume you published the repo to pypi from your Windows machine where git (unfortunately) converts all line endings to CRLF by default (you can choose the default behaviour during installation). There are several ways to work around this issue. You could either set the line endings on checkout in the .gitattributes file of this repository or change to global unix-style line endings with your windows machine which would be my choice but ymmv.

stlehmann commented 6 years ago

Glad it works now. I normally check out unix-style on my Windows machine but it's possible that I mistakenly chose the wrong option for this repository. Thanks for the feedback.