node library for reading xmcd formatted file
JavaScript
Latest commit aa2c32c Aug 19, 2012 @atsuya remove node 0.6 support
Permalink
Failed to load latest commit information.
example version 0.1.0 Aug 19, 2012
lib make all tests pass Aug 19, 2012
test make some pass the tests Aug 17, 2012
.gitignore write test Aug 12, 2012
.travis.yml remove node 0.6 support Aug 19, 2012
LICENSE version 0.1.0 Aug 19, 2012
Makefile write test Aug 12, 2012
README.md version 0.1.0 Aug 19, 2012
package.json remove node 0.6 support Aug 19, 2012

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