https://github.com/gitbookio/node-opds
Node.js library to parse/generate OPDS feed
https://github.com/gitbookio/node-opds
Last synced: 9 months ago
JSON representation
Node.js library to parse/generate OPDS feed
- Host: GitHub
- URL: https://github.com/gitbookio/node-opds
- Owner: GitbookIO
- License: apache-2.0
- Created: 2014-12-11T23:10:47.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-07-26T05:43:05.000Z (over 10 years ago)
- Last Synced: 2025-04-21T08:10:16.685Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 182 KB
- Stars: 21
- Watchers: 5
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-opds
This is a library to parse or generate OPDS feed. It makes it easy to generate a feed from a list of book., it also handles correctly BISAC subjects.
## How to install it?
```
$ npm install opds
```
## How to use it?
:warning: This example is incomplete to pass OPDS Validation (http://opds-validator.appspot.com).
```js
var opds = require("opds");
var xml = opds.create({
title: "My Catalog",
author: {
name: "Samy Pesse",
uri: "https://www.gitbook.com"
},
books: [
{
title: "A book",
summary: "This is a test book",
updated: new Date(),
author: {
name: "Aaron O'Mullan",
uri: "https://www.gitbook.com/@aaron"
},
links: [
{
rel: "image",
href: "/book/test.jpg",
type: "image/jpeg"
},
{
rel: "acquisition/buy",
href: "/book/test.epub",
type: "application/epub+zip"
}
],
categories: [
"FIC020000"
]
}
]
});
```
You can also parse an OPDS feed:
```js
var feed = opds.parse('...');
```