Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A command-line tool for converting web-based fiction into ebooks

License

NotificationsYou must be signed in to change notification settings

denny/Webkin

Repository files navigation

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 (CircleCI)Travis CI (Travis CI)CodeClimate (Code Climate)

About

A command-line tool for converting web-based fiction into ebooks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp