Created
March 21, 2012 21:02
-
-
Save bdryanovski/2152807 to your computer and use it in GitHub Desktop.
Plaing with id3 and coffeescript.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| id3 = require('id3') | |
| walk = require('walk') | |
| fs = require('fs') | |
| files = [] | |
| directory = '/media/8A02D1CD02D1BE7F/Music' | |
| walker = walk.walk(directory, { followLinks: false}) | |
| walker.on('file', (root,stat,next) -> | |
| files.push(root + '/' + stat.name) | |
| next() | |
| ) | |
| walker.on('end', () -> | |
| for file in files | |
| rfile = fs.readFileSync(file); | |
| fileInfo = new id3(rfile) | |
| console.log '---------------------------------------------------------' | |
| console.log(fileInfo.getTags()) | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment