Reads a Serato crate file and returns columns and songs.
$ npm install serato-crater
const seratoCrater = require("serato-crater");
seratoCrater(path.join(__dirname, "example.crate")).then(crate => {
console.log(crate);
//=> { columns: [ 'song', 'artist', 'bpm', 'key', 'length', 'genre', 'track' ],
// songs:
// [ 'Users/rick/Music/Antonio Giacca - Birdland (Radio Mix).mp3',
// 'Users/rick/Music/Bounce (Extended Mix) - Calvin Harris feat. Kelis.m4a' ] }
});
var crate = seratoCrater.sync(path.join(__dirname, "example.crate"));
console.log(crate);
//=> { columns: [ 'song', 'artist', 'bpm', 'key', 'length', 'genre', 'track' ],
// songs:
// [ 'Users/rick/Music/Antonio Giacca - Birdland (Radio Mix).mp3',
// 'Users/rick/Music/Bounce (Extended Mix) - Calvin Harris feat. Kelis.m4a' ] }
Returns a Promise
for the parsed crate.
Returns the parsed crate.
Type: string
Path to a Serato .crate
.