https://github.com/transpect/epubtools-frontend
Converts XHTML to EPUB2/3
https://github.com/transpect/epubtools-frontend
epub epub2 epub3 xhtml
Last synced: 2 months ago
JSON representation
Converts XHTML to EPUB2/3
- Host: GitHub
- URL: https://github.com/transpect/epubtools-frontend
- Owner: transpect
- License: bsd-2-clause
- Created: 2015-11-13T13:10:26.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-05-27T17:34:51.000Z (about 1 year ago)
- Last Synced: 2024-05-28T02:45:08.157Z (about 1 year ago)
- Topics: epub, epub2, epub3, xhtml
- Language: Shell
- Size: 18.6 KB
- Stars: 3
- Watchers: 5
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# epubtools-frontend
Converts EPUB 2 and 3 (fixed/reflowable) from XHTMLThis project provides a convenient frontend to convert EPUBs with the transpect epubtools library.
The epubtools library takes an XHTML file as input and generates an EPUB. Referenced resources such as CSS,
JavaScript and images are automatically stored in the EPUB file. Layout, format and other parameters are
configured in an XML file.## Requirements
Java 1.7+
## Download
You can either download this repository as Zip file or use Git or SVN.
### Clone with Git
```
$ git clone [email protected]:transpect/epubtools-frontend.git --recursive
```
### Checkout with SVN```
$ svn co https://github.com/transpect/epubtools-frontend/trunk
```## Invocation
### MacOS/Linux
You can choose whether to invoke epubtools XProc pipeline with an Bash script or XML Calabash.
#### Bash script
```
./epubconvert [options ...] myInputFile.html
```Option | Description
------ | -------------
-o | path to custom output directory
-c | path to custom configuration file
-d | debug mode#### XML Calabash
```
./calabash/calabash.sh \
-i source=myInputFile.html \
-i meta=myConfiguration.xml \
$DIR/xpl/epubtools-frontend.xpl
```### Windows
```
./calabash/calabash.bat \
-i source=myInputFile.html \
-i meta=myConfiguration.xml \
$DIR/xpl/epubtools-frontend.xpl
```## Configuration
Here is an example for a basic configuration. If you open the oXygen project file, the file is
automatically validated (RelaxNG and Schematron). You can also find a commented version of this
file [here](https://github.com/transpect/epubtools/blob/13f250dd3dac3de7b72416cace4d14d56d255b1a/sample/epub-config.xml)Major parameters are configured with the `epub-config` attributes:
Location | Description
---------------------------------------------- | -------------
`epub-config/@format` | EPUB2 \| EPUB3 \| KF8
`epub-config/@layout` | reflowable \| fixed
`epub-config/@css-handling` | regenerated-per-split\|regenerated-per-split remove-comments\|unchanged (default: regenerated-per-split)
`epub-config/@html-subdir-name` | name of html subdirectory
`epub-config/@indent` | true|false|selective (If indent="selective", p:store will store non-indented, and the indent before paragraphs etc)
The element `metadata` includes additional metadata information which is later stored in the OPF file.
The `hierarchy` element is used to configure how the HTML is split into chunks.```xml
89392383923
89392383923
Mustertitel
Autoren
Verlag
de
```