fimfic2epub/README.md

69 lines
3.4 KiB
Markdown
Raw Normal View History

2016-08-19 21:38:07 +12:00
[![NPM](https://nodei.co/npm/fimfic2epub.png?compact=true)](https://www.npmjs.com/package/fimfic2epub)
2016-08-11 23:07:17 +12:00
fimfic2epub
===========
2018-03-13 10:02:09 +13:00
This is a tool to generate better EPUB ebooks from [fimfiction](https://fimfiction.net/) stories. It's also a Chrome/Firefox extension, replacing the default EPUB download option with this tool.
2016-08-11 23:07:17 +12:00
2018-03-14 05:45:26 +13:00
[Screenshot](http://i.imgbox.com/MalEBiuC.png) of the web extension
Features
--------
* The generated ebook is in modern EPUB3 format with fallbacks for older EPUB2 reading systems
* Improved styling and formatting of content compared to Fimfiction's export options
* Cover image can be changed from an image file or url
* Downloads and embeds artwork from the story inside the EPUB file, including YouTube thumbnails, for optimal offline reading and archiving (optional)
* Rating, tags, status, story description and more info are available on the title page
* The table of contents page includes chapter modification dates and word counts
* Option to put all author notes in an index at the end of the ebook
* Option to not add a title heading for chapters (in case the story has its own)
* Tweak paragraph style from double-spaced to indented (similar to book typesetting, may not look good on every story)
* Emoji, icon and webp support (webp images gets converted to png)
* Calculation the story's Flesch reading ease (disabled by default because it's a slow process)
* Customize metadata of the generated ebook, such as title, author, subjects and description
* Command line tool with same features as the web extension
2016-08-11 23:07:17 +12:00
2016-08-17 00:25:38 +12:00
Demo
----
2018-03-13 10:02:09 +13:00
You can have a look at what a generated EPUB looks like [here](http://books.djazz.se/?epub=epub_content%2Fsummer_island). It was generated from the story [Summer Island](https://fimfiction.net/story/289663/summer-island).
2016-08-17 00:25:38 +12:00
2016-08-11 23:07:17 +12:00
Usage (browser extension)
-----------------
2018-03-13 10:02:09 +13:00
You can download the Chome extension from [Chrome Web Store](https://chrome.google.com/webstore/detail/fimfic2epub/fiijkoniocipeemlflajmmaecfhfcand) and [Firefox Add-ons](https://addons.mozilla.org/firefox/addon/fimfic2epub/)
2016-08-11 23:07:17 +12:00
Installation & usage (command line)
-------------------
2016-08-16 01:12:20 +12:00
You can install the tool by running `npm install -g fimfic2epub`. You can then run it like this:
2016-08-11 23:07:17 +12:00
2016-08-16 01:12:20 +12:00
`$ fimfic2epub <story id/url> [<optional filename>]`
2018-03-14 02:01:18 +13:00
By default the EPUB will be saved in the current working directory with the filename `Title by Author.epub`. Run `fimfic2epub --help` to see a list of all flags.
2016-08-16 01:12:20 +12:00
Examples
--------
2016-08-11 23:09:00 +12:00
```
2016-08-15 21:11:20 +12:00
Download with automatic filename:
2018-03-14 04:39:30 +13:00
$ fimfic2epub --paragraphs indented --reading-ease 289663
$ fimfic2epub https://www.fimfiction.net/story/289663/summer-island
2016-08-15 21:11:20 +12:00
2018-03-14 04:39:30 +13:00
Download and save to a specified dir/filename:
$ fimfic2epub 289663 path/to/file.epub
$ fimfic2epub --dir path/to/my/dir 289663 ebook_%id%.epub # %id% gets replaced by the story id
2016-08-11 23:09:00 +12:00
```
2016-08-11 23:07:17 +12:00
Building
--------
2018-03-13 10:02:09 +13:00
Make sure [Node.js](https://nodejs.org) is installed. After you've cloned this repository, run `npm install` and `npm run build` to build it. This project uses [gulp](http://gulpjs.com/). Run `npm run dev` for a quicker development build. You can add `watch` to both for automatic rebuilding.
2016-08-11 23:07:17 +12:00
Development
-----------
Make sure [gulp is installed](https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md).
When working on the code and testing it in a web browser as an extension, you can run gulp in watch mode: `gulp watch`. This will lint code and build it when you save. To build, just run `gulp` or `npm run build`. To lint, run `gulp lint` and to clean, run `gulp clean`.