itunes-data icon indicating copy to clipboard operation
itunes-data copied to clipboard

itunes-data exports library into stdout despite file extension [Sierra]

Open alundiak opened this issue 9 years ago • 2 comments

I'm on iTunes v12.5.5.5, MacOS Sierra v10.12.3, node v7.5.0, npm v4.1.2

Command (s) - any of these fails:

itunes-data --library library.json ~/Music/iTunes/iTunes\ Music\ Library.xml 
itunes-data --library library.tsv ~/Music/iTunes/iTunes\ Music\ Library.xml
itunes-data --library library.csv ~/Music/iTunes/iTunes\ Music\ Library.xml

Files NOT created, and output goes to stdout.

сс/ @shawnbot

alundiak avatar Feb 20 '17 00:02 alundiak

@shawnbot up

alundiak avatar May 09 '18 19:05 alundiak

Issue still reproduced. Here is my latest commands setup:

"scripts": {
    "libJson": "itunes-data --library data/library.json ~/Music/iTunes/iTunes\\ Music\\ Library.xml",
    "libCsv": "itunes-data --library data/library.csv ~/Music/iTunes/iTunes\\ Music\\ Library.xml",
    "libTsv": "itunes-data --library data/library.tsv ~/Music/iTunes/iTunes\\ Music\\ Library.xml",
}

All commands throw content to stdout, instead of file.

Maybe I got wrong info from help?

Options:
  --tracks     Save tracks (songs) to this file                             
  --playlists  Save playlists to this file                                  
  --artists    Save artists to this file                                    
  --albums     Save albums to this file                                     
  --library    Save the library to this (JSON) file                         
  --format     Default output file format ('csv', 'tsv', 'json' or 'ldjson')  [default: "csv"]

Save the library to this (JSON) file - @shawnbot does it mean, I can ONLY export XML to JSON?

I also tried this version:

itunes-data --library ~/Music/iTunes/iTunes\\ Music\\ Library.xml > data/myLibrary.json

But it's not correct, as itunes-data says.

alundiak avatar Sep 23 '18 20:09 alundiak