Skip to content

Commit

Permalink
Updated README file.
Browse files Browse the repository at this point in the history
K Cartlidge committed Oct 27, 2016
1 parent 9ad613f commit 356b725
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Nodepub v1.0.7
# Nodepub v2.0.7
## Create valid EPUB (v2) ebooks with metadata, contents and cover image.

[By K Cartlidge](http://www.kcartlidge.com).
@@ -12,14 +12,20 @@ A copy of the licence is within the package source.

## About Nodepub

*This version introduces stability at the expense of minor breaking changes, consisting almost entirely of renames from chapter to section but with some of the pre-generated pages of earlier versions eliminated. The result is more abstracted but also more flexible, whilst also retaining most of it's simplicity.*

Nodepub is a **Node** module which can be used to create **EPUB (v2)** documents.

The resultant files are designed to pass the [IDPF online validator](http://validator.idpf.org) and Sigil's preflight checks. They also open fine in IBooks, Adobe Digital Editions and Calibre, plus the Kobo H20 ereader (a highly recommended *backlit* and *waterproof* e-ink device).

They also pass *KindleGen* - although Amazon's `.mobi` files do not support the cover page HTML file the KindleGen tool strips it out so there is no need to make special allowance.

#### Recent Changes

* v2.0.7 - Thanks to [Harold Treen](https://github.com/haroldtreen) the API has switched to being asynchronous. See the examples below for the usage of the callbacks.

* v1.0.7 - *This version introduces stability at the expense of minor breaking changes, consisting almost entirely of renames from chapter to section but with some of the pre-generated pages of earlier versions eliminated. The result is more abstracted but also more flexible, whilst also retaining most of it's simplicity.*

#### Notes on the EPUBs

Resultant EPUBs can be generated to one of three levels of completeness:

1. *Either* a complete .epub file ready for distribution
@@ -29,8 +35,6 @@ Resultant EPUBs can be generated to one of three levels of completeness:

The module has no concept of how the original content is obtained; it is passed a metadata object at creation after which content is added sequentially by the caller. There is no automatic pre-processing of content files such as Markdown as the module expects to be given *HTML* to work with and it is trivial for the caller to pre-process in advance by requiring a Markdown module, the Jade rendering engine or similar.

That said, I *am* currently considering adding Markdown rendering for my own needs.

## Current Status

* The generation of EPUBs to all three levels of completeness mentioned above is in place along with an example script to show the usage. The codebase also includes the resulting example EPUB.
@@ -55,10 +59,6 @@ That said, I *am* currently considering adding Markdown rendering for my own nee

*If* you use the raw generated files to write the EPUB yourself, bear in mind that the **mimetype** file MUST be the first file in the archive and also MUST NOT be compressed. In simple terms, an EPUB is a renamed ZIP file where compression is optional apart from the mimetype file which should be added first using the 'store' option.

ALL functions of the module are synchronous EXCEPT if you choose to use the option to create the complete EPUB (*writeEPUB*), which is internally synchronous whilst generating the file contents but for external purposes is asynchronous with a callback due to the nature of the *archiver* dependency used to create the final output.

As the use of this third output option is expected to be mutually exclusive of the other two, this latter one being asynchronous is not currently considered an issue.

## Upcoming

* *Other non-image assets*. You already have images so the base functionality is there, but I will be adding an option to include other assets (for example an embedded font).

0 comments on commit 356b725

Please sign in to comment.