convert BCTS stories in ePub format

Printer-friendly version

Author: 

Taxonomy upgrade extras: 

Hi,

A while ago, I created a tool that will convert the pages here in BCTS in ePub format. Just give the URL, and it gives you an epub version of the story.

I created it because I have an OLPC XO-1, and I wanted to read BCTS stories here without too much discomfort. To read the epub e-books, I use FBReader.

Now, I'm sorry but to make it work, you'll need some hacky tools. You'll need python, and beatifulsoup. It works using the command line but there is now a graphical interface.

I just wanted to tell you since for some of you it might be useful. If you can't make it work, I'll be glad to help you.

Now, you can get it here: http://github.com/mildred/TopShelf

* * *

Here are some example of use (command line):

python topshelf.py http://bigclosetr.us/topshelf/title-page/4575/healing-princess
python topshelf.py -m creator="Maggie Finson" -m title="Peace Bringer" -r -a "pbringer.*\.html" -s --replace '<p><dd>' '</p><p>' --replace '^<title>' '<html><head><title>' http://www.sapphireplace.com/stories/finson.html

(As you can see, it might work with some other website as well)

Comments

Mildred - Thanks for

KristineRead's picture

Mildred - Thanks for sharing. the ability to just provide the web url is a nice touch. There is a free tool called Calibre which can also be used to convert to ePub and a bunch of other formats. http://calibre-ebook.com/

That tool can be a bit cludgy as well, and I don't think you can just supply a web url to it, i think you have to copy it down then import it.

Hugs,

Kristy

At first, I just wrote a

At first, I just wrote a script using Calibre. Then, I thought the quality was not good enough for me.
This tool specifically understands BCTS, and can create a table of contents just line on the website.

I'm working on a graphical interface, but it's not ready yet.

The more I visit

BCTS and related sites the more awe is inspired in me by the assorted (I mean it in a GOOD way!!!) menagerie of geeks and the like who frequent here!

I mean, seriously, I am, according to the most recent IQ test I took (back in high school, more than 6 years ago) eligible to be in highest 5% of IQ score worldwide (I had a score of 125 IIRC), and I have met quite a lot of people here who I am certain have even higher score (and regardless of it are smarter than me).

Faraway

On rights of free advertisement:
Big Closet Top Shelf

Where you can fool around like you want to and most you get is some bemused good ribbing!

Faraway


On rights of free advertisement:
Big Closet Top Shelf

Where you can fool around like you want to and most you get is some bemused good ribbing!

Well, I'm just a

Well, I'm just a computer scientist, is all.

It's not my fault if I spent most of my teens away from people and myself, finding refuge in computers. Now I don't find computers so comforting any more, but I learned quite a bit along the way. I'm lucky, I can even apply that knowledge to get a job :)

Now, I finished the graphical interface. You'll just have to install python, beautifulSoup and double click on the topshelf.py file.

Error?

Mildred,

First of all thanks for writing this. I have a Sony E-Reader that loves epub files....

When I run topshelf.py (either by double clicking the file in the finder on my Mac or in the terminal) and supplying it the URL http://bigclosetr.us/topshelf/book/16650/kira I get this output

cd '/Users/ksmith/' && '/usr/bin/pythonw' '/Users/ksmith/topshelf.py' && echo Exit status: $? && exit 1
Kira:~ ksmith$ cd '/Users/ksmith/' && '/usr/bin/pythonw' '/Users/ksmith/topshelf.py' && echo Exit status: $? && exit 1
File "/Users/ksmith/topshelf.py", line 8
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
^
SyntaxError: invalid syntax
Kira:~ ksmith$

The space between the < and! on the DOCTYPE line does not exist. the BTCS site was thinking I was trying to do something else...

Both directories exist. BeautifulSoup is installed correctly according to beautifulsouptests.py...

Any Ideas?

Kayla

If you want to discuss this over email instead, my email is [email protected]