node library for reading xmcd formatted file
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
lib
test
.gitignore
.travis.yml
LICENSE
Makefile
README.md
package.json

README.md

xmcd-reader

Build Status

XMCD format file reader for node.

install

$ npm install xmcd-reader

examples

var XmcdReader = require('../lib/xmcd-reader');

var xmcdReader = new XmcdReader();
xmcdReader.parse('test/fixtures/example', function(error, xmcd) {
  console.log('Disc:');
  console.log('\tArtist: %s', xmcd.artist());
  console.log('\tTitle: %s', xmcd.discTitle());

  console.log('Tracks:');
  xmcd.tracks().forEach(function(track) {
    console.log('\t%d: %s', track.number(), track.title());
  });
});

Methods

XmcdReader

Constructor

Creates a new instance of XmcdReader.

#parse(pathToTheXmcdFile, callback)

Parses an xmcd file. callback takes error and xmcd parameters, which is an Error object and Xmcd object respectively.

Xmcd

#artist()

Returns a disc artist.

#discTitle()

Returns a disc title.

#year()

Returns a year.

#genre()

Returns a genre.

#tracks()

Returns a list of tracks. An element of the list is Track object.

#extendedData()

Returns a disc extended data.

#playOrder()

Returns a play order.

#revision()

Returns a revision.

Track

#number()

Returns a track number.

#title()

Returns a track title.

#extendedData()

Returns a track extended data.

License

MIT