You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
A command-line tool for converting web-based fiction into ebooks
I started writing Webkin so that I could download stories from the web and readthem on my Kindle when I'm not online. I originally intended to make it output.mobi or .epub files, but it turned out that plain text files look nice enoughon the Kindle (at least on my Kindle Voyage), so that's what it outputs fornow. I may add other output formats at some point in the future.
Given that online fiction is spread around a LOT of websites, Webkin has aplugin system, hopefully allowing support to be added for any website. I willbe adding more plugins myself, but I hope other people will contribute pluginsfor their favourite websites too.
Writing Webkin Plugins
Webkin plugins are very simple; they're just a single file Ruby module, whichextends the main Story class with the following two methods:
self.url_regex This returns a regex which will match a story page on the website. Webkinuses this to find the right plugin for a URL which has been passed to it.
fetch This is the main method in a Webkin plugin; it downloads the story page(or pages, if your site has multi-page stories) and strips off any headerand footer HTML, leaving just the story section in thehtml attribute.It should also populate thetitle and (if possible)author attributes.
The plugin's filename and Module name must match, with the Module namecapitalised.
If you've downloaded Webkin from Github then you should have at least oneexample plugin to look at.
Please support your favourite websites
Webkin is free, but if you'd like to show your appreciation for it then pleasemake a donation towards the running costs of your favourite free fiction site,if they offer ways to do that and you can afford to do so.
Current Status
(CircleCI) (Travis CI) (Code Climate)
About
A command-line tool for converting web-based fiction into ebooks