(c) 2015 David Teviotdale
A simple Extension for Firefox and Chrome that converts a story on Baka-Tsuki into an EPUB. Also works with
- ArchiveOfOurOwn.org
- blogspot (some)
- mugglenet.com
- FanFiction.net
- gravitytales.com
- hellping.org
- krytykal.org
- moonbunnycafe.com
- nanodesu (some of the *thetranslation.wordpress.com sites)
- readlightnovel.com
- royalroadl.com
- shikkakutranslations.org
- sonako.wikia.com
- wuxiaworld.com
- and many other sites
Credits
- Firefox mod by Markus Vieth
- Michael Fox (Belldandu)
- typhoon71
- toshiya44
- dreamer2908
- Browse to a Baka-Tsuki web page that has the full text of a story.
- Click on the WebToEpub icon on top right of the window.
- Check story details are correct.
- Select image to use for cover.
- Click the "Pack EPUB" button.
- Wait for progress bar to finish (indicating the images being downloaded) and the generated EPUB to be placed in your downloads directory.
- Browse to first chapter of story you want.
- Click on the WebToEpub icon on top right of the window.
- Check story details are correct.
- Click the "Pack EPUB" button.
- Wait for progress bar to finish (indicating the additional chapters are being downloaded) and the generated EPUB to be placed in your downloads directory.
- Examine the HTML of a chapter the web page and find the tag holding the content. Take note of:
- Type:
<div>
or<article>
- id (if present)
- class (if present and id not present)
- Type:
- Browse to page that has URLs for the chapters you want to fetch.
- Click on the WebToEpub icon on top right of the window.
- When warning "No parser found for this URL. Default parser will be used. You will need to specify how to obtain content for each chapter." appears, click "OK".
- Select the URLs to the chapters you want.
- Above the "Pack EPUB" button set
- the
<body>
drop down to type of the tag holding the content you found in the first step. Note, if it's neither<div>
or<article>
leave value as<body>
. - next drop down to one of
<Class Starts With>
,<Class is>
,<ID Starts With>
or<ID is>
- the text box to the value of the id or class
- the
- Click "Pack EPUB"
For details on how to extend, see http://www.codeproject.com/Articles/1060680/Web-to-EPUB-Extension-for-Chrome.
- Start Chrome
- Go to https://chrome.google.com/webstore/detail/webtoepub/akiljllkbielkidmammnifcnibaigelm
- Click on the "Add to Chrome" button.
- Start Firefox
- Go to https://addons.mozilla.org/en-US/firefox/addon/webtoepub-for-baka-tsuki
- Click on "Download anyway"
- Download the extension. Go to https://github.com/dteviot/WebToEpub and click on the "Download Zip" button.
- Unpack zip file and move the "plugin" directory to the location you want to keep it.
- In the "plugin" directory from the previous step there is a "jszip" directory. Create a "dist" directory inside this "jszip" directory.
- Download jszip library v3.0.0 from https://github.com/Stuk/jszip
- Extract jszip.min.js from the jszip library and copy to the "dist" directory you created in step 3.
- Open Chrome and type "chrome://extensions" into the browser.
- Make sure "Developer Mode" at the top of the page is checked.
- Press the "Load unpacked extension.." button and browse to the "plugin" directory from step 2.
- Make sure you can install unsigned addons (only possible in Nightly and Developer Edition).
- Download the extension. Go to https://github.com/dteviot/WebToEpub and click on the "Download Zip" button.
- Unpack zip file and move the "plugin" directory to the location you want to keep it.
- In the "plugin" directory from the previous step there is a "jszip" directory. Create a "dist" directory inside this "jszip" directory.
- Download jszip library v3.0.0 from https://github.com/Stuk/jszip
- Extract jszip.min.js from the jszip library and copy to the "dist" directory you created in step 4.
- Open Firefox and type "about:debugging" into the URL bar.
- Click "Load Temporary Add-on".
- Open the "plugin" directory from step 3 and select manifest.json.
Licenced under GPLv3.
WebToEpub uses the following libraries:
- JSZip library v3.0.0: https://github.com/Stuk/jszip, which is dual licensed with the MIT license or GPLv3.
- quint: http://qunitjs.com/, licensed under MIT license.
- Close all running copies of Chrome
- Start Chrome with command line argument --allow-file-access-from-files
- Load unitTest/Tests.html
- If you get Failed to read the 'localStorage' property from 'Window': Access is denied for this document errors
- Type chrome://settings/content into Chrome's search bar
- Uncheck Block third-party cookies and site data
- Click Finished
- Re-run unit tests
- When finished with unit tests.
- Restore original value of Block third-party cookies and site data (if you changed it).
- close all running copies of Chrome
- Start Firefox
- Go to about:config
- Find security.fileuri.strict_origin_policy parameter
- Set it to false
- Load unitTest/Tests.html
- (Remember to reset security.fileuri.strict_origin_policy to true when done.
- Install Node.js (if not already installed)
- Use node's package manager to download and install eslint and the "xmldom" https://www.npmjs.com/package/xmldom package. (Needed by pack.js)
- Use Node.js to run eslint/pack.js
- This will produce 3 files in the eslint directory.
- WebToEpub0.0.0.x.xpi (Firefox version of plug-in.)
- WebToEpub0.0.0.x.zip (Chrome version of plug-in.)
- packed.js (All JavaScript files packaged into single file, for eslint to examine.)
- Command line for eslint is "eslint packed.js > error.txt"