GithubHelp home page GithubHelp logo

captn3m0 / epub-metadata-generator Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 1.0 927 KB

Generates a metadata.xml file for an EPUB from various online sources, can be used with pandoc

License: MIT License

JavaScript 100.00%
epub-generation metadata-management openlibrary pandoc opf epub

epub-metadata-generator's Introduction

epub-metadata-generator

Generates a metadata.xml file for an EPUB from various online sources, given a few identifiers.

Currently supports the following providers:

Provider Input
OpenLibrary ISBN

Installation

You can install it from NPM

npm i -g epub-metadata-generator

Usage

You can use the provided command-line-executable:

generate-epub-xml 9780596101190 /tmp/9780596101190.xml
cat /tmp/9780596101190.xml
<?xml version="1.0"?>
<metadata>
  <dc:identifier opf:scheme="ISBN-13">9780596101190</dc:identifier>
  <dc:identifier opf:scheme="ISBN-10">0596101198</dc:identifier>
  <dc:creator opf:role="aut">Dan Woods</dc:creator>
  <dc:creator opf:role="aut">Gautam Guliani</dc:creator>
  <dc:title id="title">Open Source for the Enterprise</dc:title>
  <dc:title id="subtitle">Managing Risks, Reaping Rewards</dc:title>
  <meta refines="#subtitle" property="title-type">subtitle</meta>
  <dc:language>eng</dc:language>
  <dc:publisher>O'Reilly Media, Inc.</dc:publisher>
</metadata>

You can use this file in pandoc directly:

pandoc input.html --epub-metadata=/tmp/9780596101190.xml file.epub

Alternatively, you can use the NPM package programatically as well:

const E = require('epub-metadata-generator')
E.write(filepath, ISBN);

License

Licensed under the MIT License. See LICENSE file for details.

Credits

Some of the code in openlibrary.js is based on the node-isbn-catalogue package, which was based on palmerabollo/node-isbn. Both are under AGPL.

epub-metadata-generator's People

Contributors

captn3m0 avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

lavoragine

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.