Create eBooks from Wikipedia
Directory to eBook
This Script takes an URL to a directory structure that can be accessed via a web server. The target directory is assumed to contain a series of directories each containing a single entry taken (in this instance) from Wikipedia.
I use the Firefox plugin Scrapbook to save entries from Wikipedia that I want to transform into an epub file. I use Scrapbook to clean up the entries to my liking then export them to a directory (Wikipedia) in my local filesystem that is accessible by my local webserver (the Sites directory on a Mac).
The script would need to be modified for how different web servers display directories in html for correct parsing.
You will notice that the script has some sections commented out. I use the script for making books of many different types of web content and extract and add additional elements to the articles dictionary structure. These elements can be used to call the catArticles procedure to structure a feed such that the table of contents is created from these additional elements.
|