fimfic2epub/README.md

105 lines
5.6 KiB
Markdown
Raw Permalink 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)
2018-03-14 22:50:55 +13:00
![fimfic2epub logo](https://github.com/daniel-j/fimfic2epub/raw/master/assets/fimfic2epub-logo.png)
2018-03-14 22:02:24 +13:00
2016-08-11 23:07:17 +12:00
fimfic2epub
===========
2018-03-15 11:05:08 +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. If you're on an Arch Linux-based system you can install it from the [Arch User Repository](https://aur.archlinux.org/packages/fimfic2epub/).
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
2018-03-14 22:02:24 +13:00
2018-03-14 05:45:26 +13:00
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)
2018-03-14 22:02:24 +13:00
* Calculate the [Flesch reading ease](https://en.wikipedia.org/wiki/Flesch%E2%80%93Kincaid_readability_tests#Flesch_reading_ease) value of the story
2018-03-14 05:45:26 +13:00
* 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
2018-03-14 22:02:24 +13: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
2018-03-14 22:02:24 +13:00
Usage (web extension)
2016-08-11 23:07:17 +12:00
-----------------
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)
-------------------
2018-03-15 11:05:08 +13:00
You can install the tool by running `npm install -g fimfic2epub`. On Arch Linux-based systems you can install it from the AUR like this: `yay -S fimfic2epub` (replace `yay` with your favorite AUR-helper)
You can then run the tool 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>]`
By default the EPUB will be saved in the current working directory with the filename `Author - Title.epub`. Run `fimfic2epub -h` to see a list of all flags.
2018-03-14 02:01:18 +13:00
2018-03-14 21:45:27 +13:00
```
Usage: fimfic2epub [options] <story> [filename]
Tool to generate improved EPUB ebooks from Fimfiction stories
Options:
-V, --version output the version number
-d, --dir <path> Directory to store ebook in. Is prepended to filename
-t, --title <value> Set the title of the story
-a, --author <value> Set the author of the story
-T, --typogrify Enable typographic fixes (smart quotes, dashes, ellipsis, ordinal)
-c, --no-comments-link Don't add link to online comments
-H, --no-headings Don't add headings to chapters (includes chapter title, duration and word count)
-W, --no-chapter-word-count Don't add word count to chapter headings
-D, --no-chapter-duration Don't add time to read to chapter headings
-b, --no-bars Don't add chapter bars to show reading progress
-r, --no-reading-ease Don't calculate Flesch reading ease
-e, --no-external Don't embed external resources, such as images (breaks EPUB spec)
-n, --no-notes Don't include author notes
-i, --notes-index Create an index with all author notes at the end of the ebook
-p, --paragraphs <style> Select a paragraph style <spaced|indented|indentedall|both> (default: spaced)
-k, --kepubify Add extra <span> elements for Kobo EPUB (KEPUB) format
-j, --join-subjects Join dc:subjects to a single value
-w, --wpm <number> Words per minute. Set to 0 to disable reading time estimations (default: 200)
-C, --cover <url> Set cover image url
-h, --help output usage information
2018-03-14 21:45:27 +13:00
```
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:
$ fimfic2epub 289663
2018-03-14 04:39:30 +13:00
$ 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-14 22:02:24 +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/).
2016-08-11 23:07:17 +12:00
Development
-----------
2018-03-14 22:02:24 +13:00
When developing the code, you can run `npm run dev watch`. This will rebuild the code quickly and lint it when you save. To just lint, run `npm run dev lint` and to clean, run `npm run dev clean`. To build for production, just run `npm run build`.
2016-08-11 23:07:17 +12:00
2018-03-14 22:02:24 +13:00
To test the Chrome extension, click Load Unpacked and pick the `extension/` directory. To test the Firefox extension, go to Add-ons and Debug Add-ons. Then Load Temporary Add-on and pick the `extension.xpi` file. To reload them after a rebuild, click the Reload button in Chrome and/or Firefox.
2018-03-14 22:50:55 +13:00
License
-------
[MIT](LICENSE)