adasilva / journal2ebook

optimize academic pdfs for e-readers
Other
107 stars 12 forks source link

if files don't get cleaned up after journal2ebook closes, the next ebook can be loaded off the old temp files #11

Closed jasongullifer closed 11 years ago

adasilva commented 11 years ago

Do extra pages show up in the pdf image b/c the first file was longer than the 2nd? Maybe cleanup() should be run at the launch of the program as well as at close?

adasilva commented 11 years ago

Also, we might want to use this function to make a temp directory: http://docs.python.org/2/library/tempfile.html#tempfile.mkdtemp

jasongullifer commented 11 years ago

This might not be a bug at all. I closed before completion on a multi-page pdf, then opened a 1 page pdf which made temp.png instead of temp-0.png. So It read the old pdf.

Now, 1-page pdfs are handled, and I fixed the cleanup a bit to remove even temp.png. Probably this issue shouldn't happen again.