Socket
Socket
Sign inDemoInstall

pe-epub-fs

Package Overview
Dependencies
14
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pe-epub-fs

Filesystem Module for pe-epub


Version published
Weekly downloads
5
Maintainers
1
Created
Weekly downloads
 

Readme

Source

pe-epub-fs

Extends pe-epub so you can import local assets from your filesystem rather than from the web

<img src="file:///path/to/image.jpg" />

Import local HTML files for the body of a page

{
	"title" : "The Peoples E-Book",
	"cover" : "file:///path/to/local/image.jpg",
	"pages" : [{
		"title" : "My Local Page",
		"body" : "file:///path/to/local/page.html"
	}]
}

Install

npm install pe-pub pe-epub-fs

Usage

var Peepub   = require('pe-epub-fs')(require('pe-epub'));
var epubJson = require('your-epub.json'); // see examples/example.json for the specs
var myPeepub = new Peepub(epubJson);

myPeepub.create('/path/to/epub/and/fileName.epub')
	.then(function(filePath){
		console.log(filePath); // the same path to your epub file!
	});

Testing

npm install -g jasmine-node
jasmine-node spec

FAQs

Last updated on 14 Jan 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc