https://github.com/captn3m0/epub-metadata-generator
Generates a metadata.xml file for an EPUB from various online sources, can be used with pandoc
https://github.com/captn3m0/epub-metadata-generator
epub epub-generation metadata-management openlibrary opf pandoc
Last synced: 4 months ago
JSON representation
Generates a metadata.xml file for an EPUB from various online sources, can be used with pandoc
- Host: GitHub
- URL: https://github.com/captn3m0/epub-metadata-generator
- Owner: captn3m0
- License: mit
- Created: 2020-02-17T19:52:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-10-17T05:15:31.000Z (over 1 year ago)
- Last Synced: 2025-01-31T16:26:57.978Z (4 months ago)
- Topics: epub, epub-generation, metadata-management, openlibrary, opf, pandoc
- Language: JavaScript
- Homepage:
- Size: 905 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```sh
generate-epub-xml 9780596101190 /tmp/9780596101190.xml
cat /tmp/9780596101190.xml
``````xml
9780596101190
0596101198
Dan Woods
Gautam Guliani
Open Source for the Enterprise
Managing Risks, Reaping Rewards
subtitle
eng
O'Reilly Media, Inc.```
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:
```javascript
const E = require('epub-metadata-generator')
E.write(filepath, ISBN);
```## License
Licensed under the [MIT License](https://nemo.mit-license.org/). See LICENSE file for details.
## Credits
Some of the code in `openlibrary.js` is based on the [node-isbn-catalogue](https://www.npmjs.com/package/node-isbn-catalogue) package, which was based on [palmerabollo/node-isbn](https://github.com/palmerabollo/node-isbn). Both are under AGPL.