[identity profile] kannnichtfranz.livejournal.com posting in [community profile] fanfic_ebooks
Hi! I've written a PDF Service to go from the Print menu on the Mac to an ePub file. I'm not sure if this will be helpful to anyone, but I thought I'd share in case it is, or in case anyone can help me make it better.

I think it will only be useful to people who use Calibre and want to read fanfic from webpages in Stanza on an iPhone or iPod Touch. Note that this isn't going to be a professional-looking eBook, but I think it is much easier to read this way than on mobile Safari.

Download 'Save as ePub.dmg'


"Save as ePub" is a PDF Service script for the Mac. It converts a Readability-enhanced webpage to an ePub file on the desktop. It works via the "Print" menu's PDF dropdown menu. The ePub file can be input to Calibre and Stanza.

To install:
1. Drag the "Save as ePub" file onto the "PDF Services alias" folder.
2. Install calibre. You probably already have this. If not, you can use the link included in this package. Be sure to install in the default location, in the /Applications directory. A relatively recent version is advised – versions from before 1/2010 are unlikely to work.
3. Install pdftotext. It is a shell program for converting PDF documents into plain text. It is Open Source Software. There is an installer package towards the bottom of the pdftotext link included in this package. If you have already installed pdftotext from another source, you may need to modify the PDF Service slightly.
4. Install the Readability bookmarklet into your browser of choice. You can use the link included in this package.

To use:
1. Find a web page you want to read as an eBook.
2. Click the Readability bookmarklet.
3. Choose "File" -> "Print".
4. Under the "PDF" dropdown menu, choose "Save as ePub".
5. It will write ~/Desktop/TitleOfStory.ePub. This may take several seconds; you should see the calibre icon bounce in the dock. Locate the ePub file on your desktop.
6. Add that to Calibre and touch up the metadata, add tags as desired.
7. Sync to Stanza on the iPhone or iPod Touch.

Known Issues
1. The use of PDF simplifies the procedure, but transformations from PDF can be unreliable. The main thing that is often messed up is paragraph breaks. Some paragraphs may be mushed together, and some paragraph breaks may be inserted erroneously.

Someone handier with regular expressions might be able to change "Save as ePub" to mend the ePub file, but it would be tricky. The ideal solution would be to save the HTML that is the result of the Readability bookmarklet to a file in a particular folder, and then use a Folder Action to convert it to ePub. However, saving the Readability-formatted webpage doesn't result in clean and simple HTML.

2. Fanfic pages that don't have nice headers including "Title: xxx", "Author: xxx", and "Summary: xxx" won't capture that information.

3. It's possible that some special characters in those lines on the webpage could break the script. Hopefully the worst that should happen is that you won't get the ePub file.

4. I wish I could get it to put a live link back to the webpage at the end, so people could easily find their way back to leave comments.

Date: 2010-11-11 03:06 am (UTC)
From: [identity profile] taxiforhire.livejournal.com
This is pretty much the greatest thing I've ever seen. Thank you so much for sharing!

HELP!

Date: 2011-01-24 10:05 pm (UTC)
From: [identity profile] hamrensel.livejournal.com
I'm trying to use your system here. But I'm having problems.

First the PDF Services alias file didn't work. I found the folder on my computer Mactonish HD>Library>PDF Servies and drop the 'Save as ePub' file in the folder.

Next I went to the website you provided and downloaded the pdftotext 3.01pl2. I installed the package called pdftotext.pkg.

I put the Readability link on my bookmark bar next.

Now when I try to use it I run into problems. I find the page, click the readability and hit print. I select 'Save as ePub' in the drop down but the file never shows up on my desktop.

Can you help me?

Profile

fanfic_ebooks: (Default)
Fanfiction Ebooks

July 2017

S M T W T F S
      1
2345678
9 101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 8th, 2025 11:34 am
Powered by Dreamwidth Studios