https://github.com/dackmin/angular-epub2
Epub2 service for Angular
https://github.com/dackmin/angular-epub2
Last synced: 8 months ago
JSON representation
Epub2 service for Angular
- Host: GitHub
- URL: https://github.com/dackmin/angular-epub2
- Owner: dackmin
- License: gpl-2.0
- Created: 2015-11-02T14:27:41.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-02T16:04:56.000Z (over 10 years ago)
- Last Synced: 2024-10-12T10:26:04.221Z (over 1 year ago)
- Language: CoffeeScript
- Size: 168 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Angular ePub2
Epub2 service for Angular
## Installation
- Npm : `npm i angular-epub2`
- Bower : `bower i angular-epub2`
## Usage
- Add `script` tag :
```html
```
- Include module :
```coffeescript
angular
.module "myApp", [
...
"epub2"
]
```
- Include service in controller :
```coffeescript
angular
.module "myApp"
.controller "TestCtrl", ($scope, $epub2)
```
- Create a book object with these exact properties (yup, to be enhanced in future versions) :
```coffeescript
book =
title: "My Wonderful Book"
author: "Eric Cantona"
ean: "2345345456346"
locale: "fr_FR"
publisher: "Stade Francais"
description: "This is a description"
date: new Date()
cover: [{ }]
chapters: [
{ name: "Chapter 1", slug: "chapter-1", content: "This is the first chapter" }
{ name: "Chapter 2", slug: "chapter-2", content: "Well, this is the second chapter" }
]
```
- Then publish/download it :
```coffeescript
$epub2.publish book, "test.epub"
```
## Re-Build
This project is written in CoffeeScript and is compiled & minified using Grunt tasks.
In order to make a pull request, you will need to build your code by doing two easy steps :
- Install dependencies : `npm i`
- (Optional) Build project to check temporary compiled files : `grunt build`
- Release project : `grunt release`
## License
This project is under a GNU GPL v2 license.
See attached `LICENSE` file for more informations.