itunes-library-stream
Streaming parser for the contents of iTunes Library XML files
Last updated 6 years ago by hughsk .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install itunes-library-stream 
SYNC missed versions from official npm registry.

itunes-library-stream Flattr this!experimental

Streaming parser for the contents of iTunes Library XML files. Supports retrieving the complete library track listing, but playlist listings aren't complete yet.

Should be useful for either ditching iTunes programatically or at least mucking around with its data.

Usage

itunes-library-stream

itunes.createTrackStream()

Creates a transform stream which takes raw XML data and spits out JSON objects for each discovered track.

var itunes = require('itunes-library-stream')
var userhome = require('userhome')
var path = require('path')
var fs = require('fs')

// If you're not running OSX, update this
// to point to the correct file in your
// iTunes Library folder.
var location = path.resolve(userhome()
  , 'Music/iTunes/iTunes Music Library.xml'
)

fs.createReadStream(location)
  .pipe(itunes.createTrackStream())
  .on('data', function(data) {
    console.log('[' + data.Artist + '] ' + data.Name)
  })

License

MIT. See LICENSE.md for details.

Current Tags

  • 0.0.0                                ...           latest (6 years ago)

1 Versions

  • 0.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (1)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |