README
@sequencemedia/itunes-library-parser
JavaScript functions and XSL stylesheets to parse an iTunes Library.xml
file and transform it to m3u
files, JSON, or JavaScript.
Library
Transforms the entire library.
const { toM3U } = require('./lib/js/library')
const {
toJSON,
toJS,
toES
} = require('./lib/js/library/transform')
toM3U
Requires the arguments jar
, xml
, and destination
.
jar
- the path to the Saxon binary on your devicexml
- the path to theiTunes Library.xml
filedestination
- the path for them3u
files to be written
Returns a Promise
resolving when all m3u
files are written.
toJSON
Requires the arguments jar
, and xml
.
jar
- the path to the Saxon binary on your devicexml
- the path to theiTunes Library.xml
file
Returns a Promise
resolving to a JSON
string.
toJS
Requires the arguments jar
, and xml
.
jar
- the path to the Saxon binary on your devicexml
- the path to theiTunes Library.xml
file
Returns a Promise
resolving to a JavaScript object.
toES
Requires the arguments jar
, and xml
.
jar
- the path to the Saxon binary on your devicexml
- the path to theiTunes Library.xml
file
Returns a Promise
resolving to a collection of JavaScript Map
and Set
instances.
Playlists
Transforms the playlists.
const { toM3U } = require('./lib/js/library/playlists')
const {
toJSON,
toJS,
toES
} = require('./lib/js/library/playlists/transform')
See Library.
Tracks
Transforms the tracks.
const { toM3U } = require('./lib/js/library/tracks')
const {
toJSON,
toJS,
toES
} = require('./lib/js/library/tracks/transform')
See Library.