0.0.11 • Published 6 years ago

open-packaging-format v0.0.11

Weekly downloads
62
License
ISC
Repository
github
Last release
6 years ago

Open Packaging Format

npm version Build Status dependencies Status Coverage Status Code Climate

An simple parser for opf metadata files. This is an incomplete implementation of the OPF specification.

Install

npm install open-packaging-format;

Simple Use:

import { readOPF } from 'open-packaging-format';

readOPF('some/dir/to/metadata.opf')
  .then((opf) => {
    console.log(opf.title);
    console.log(opf.description);
    for (const id of opf.identifiers) {
      console.log(id);
    }
  })
  .catch(console.error);

demonstrating writing data to an OPF and then that data to a file:

import OPF, { writeOPF } from 'open-packaging-format';

const opf = new OPF();
opf.title = 'This is a good title';
o.writeOPF('/path/to/your.xml', opf)
  .catch(console.error);
0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago