Neighbourhood Party Manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

podcast-chapter-parser-psc

1.2.1 • Public • Published

Podcast Chapter Parser for psc

Podcast Chapter Parser for Podlove Simple Chapters.

Installation

npm install podcast-chapter-parser-psc

Example

// for node, use xmldom; in a browser, pass window.DOMParser
var DOMParser = require('xmldom').DOMParser; 
var psc = require('podcast-chapter-parser-psc').parser(DOMParser);
 
var chapters = psc.parse('<psc:chapters xmlns:psc="http://podlove.org/simple-chapters" version="1.2">' 
  + '<psc:chapter title="Intro" start="00:00:01.200"/>'
  + '<psc:chapter title="Say Hello" start="00:00:02.000" href="http://example.com"/>' 
  + '</psc:chapters>');
// =>
// [
//     { start: 1200, title: "Intro" },
//     { start: 2000, title: "Say Hello", href: "http://example.com" }
// ]

Development

npm install
npm test

Keywords

none

install

npm i podcast-chapter-parser-psc

Downloadsweekly downloads

13

version

1.2.1

license

MIT

last publish

collaborators

  • avatar