So, the other day I was digging into my copy of the Baen library, and was reminded why I wrote this in the first place. I decided to try to extend this to other formats, so that I can have a nice, pretty Baen library to go with my Tor ebooks. While I haven't gotten to actually adding any of these other formats yet, preparing to add them led to numerous bug fixes, several new feature, and major refactoring for better code quality and error handling. This has been a big enough improvement that I've decided to upload my new and improved version now.
Major changes:
Format support is modularised. Only PDF is currently included, but I will hopefully be releasing ePub and possibly others in the not to distant future.
Problems with spaces/special characters in the file name are no more.
New options:
(-f, --fullscreen): Open in fullscreen mode by default. You will need a copy of ipdf with the fullscreen patch installed for this to have any effect.
(-a, --archive): Place a copy of the original file in the specified location.
All known bugs are fixed and error handling is greatly improved. While I cannot guarrenty that there are not bugs remaining, the script should at least fail gracefully. Most of the commandline hacker is removed, thanks to the PyPDF module, which should make things more robust.
Default options can be set via settings file.
Code is much less ugly. Feedback from more experience python programmers is still welcome.
Installation:
1. Install python with the standard libraries, python imaging libraries (PIL), and PyPDF (from
http://pybrary.net/pyPdf/)
2. Place 'sendtoiliad.py' in your path, or wherever else you want it.
3. Place 'pdf.py' in one of /usr/share/sendtoiliad, /usr/local/share/sendtoiliad, ~/.sendtoiliad/modules
4. Optionally place 'settings' in ~/.sendtoiliad, and edit to your liking. Note that 'True' and 'False' are case-sensitive.