View Single Post
Old 10-20-2010, 06:24 PM   #30
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
Quote:
Originally Posted by kidblue View Post
Seriously, it is amazing to see this kind of help from a fellow forum-member. Thanks don't begin to describe it.
No problem. This is my perverse idea of fun. And if you learned something, I learned more. Besides, my Sony 505 screen happens to have the same dimensions as your Kindle screen, so I can use the script too.

Quote:
It has been leaving "tmppdf3to4dirkk" with various PDF files (each page's "crop", "out" and "skew") - Should it be doing that or should it automatically be trashing that folder of what's obviously temporary files when done with the conversion?
D'Oh. No, you can definitely delete that folder. In fact, you should, or it might mess up future runs.

I commented out the line that is responsible for deleting the temporary folder when I was testing the script (so I could see where things went wrong when they did), but then I forgot to restore the line. I'll put an update to the script above, and you can download that if you want. Or if you prefer, you can edit the script directly in a text editor. You just need to change line 136 (about 8 lines from the bottom of the file) from:

Code:
# rm -rf "$wd"
to

Code:
rm -rf "$wd"
(I.e., removing the "#".) Of course, if mktemp had worked properly on mac, this wouldn't be an issue...

Oh, and don't name any folders you want to keep "tmppdf3to4dirkk", no matter how cool it seems, or they'll get gobbled.
frabjous is offline   Reply With Quote