Giter VIP home page Giter VIP logo

gen-epub's Introduction

gen-epub

用于生成 EPUB 的小工具。

安装

通过 npm(推荐):

npm install gen-epub

从源码安装:

npm install git+https://github.com/apachecn/gen-epub

导入

const genEpub = require('gen-epub')

函数参考

genEpub(articles, imgs, name, path)
  • articles: [{title: String, content: String}]

    文章列表,每个文章以对象表示,title属性为标题(纯文本),content属性为正文(HTML)。

    在正文中引用图片时,将<img>src属性设为../Images/{文件名}

  • imgs: Map{String: Buffer}

    图片字典,键为文件名,值为图片二进制数据。

  • name: String

    在书籍元信息中显示的书名,默认为articles[0].title

  • path: String

    保存文件的路径名,默认为当前工作目录下的name + '.epub'

协议

本项目基于 SATA 协议发布。

您有义务为此开源项目点赞,并考虑额外给予作者适当的奖励。

赞助我们

另见

gen-epub's People

Contributors

wizardforcel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.