ipod transfers between libraries

several macs, several itunes libraries, some ipods. once in a while, it is simpler to copy a tune off of my ipod than to rsync from my main music repository. here is what i do.
  • get at the ipod filesystem one way or another. eg:
    $ df
    /dev/disk1s1 2028600 2021400 7200 100% /Volumes/MAXI
  • copy content to someplace else:
    $ cp -rp /Volumes/MAXI/iPod_Control/Music ~/ipod
  • fix content cleverly marked with the "invisible" attribute
    $ cd ~/ipod
    $ ls
    F00 F01 F02
    $ /Developer/Tools/GetFileInfo -a F00
    # V for invisible on
    $ /Developer/Tools/SetFile
    Usage: SetFile [option...] file...
    -a attributes # attributes (lowercase = 0, uppercase = 1)*
    -c creator # file creator
    -d date # creation date (mm/dd/[yy]yy [hh:mm[:ss] [AM | PM]])*
    -m date # modification date (mm/dd/[yy]yy [hh:mm[:ss] [AM | PM]])*
    -P # perform action on symlink instead of following it
    -t type # file type

    Note: The following attributes may be used with the -a option:
    A Alias file
    B Bundle
    C Custom icon*
    D Desktop*
    E Hidden extension*
    I Inited*
    M Shared (can run multiple times)
    N No INIT resources
    L Locked
    S System (name locked)
    T Stationery
    V Invisible*
    Z Busy*

    $ /Developer/Tools/SetFile -a v F00
    $ /Developer/Tools/GetFileInfo -a F00
    $ cd F00
    $ /Developer/Tools/SetFile -a v *
  • incorporate now visible music into laptop itunes library.
[it may be simpler use a bit of python to read the mp3 tags, construct the artist/album/track.mp3 hierarchy and copy..]

No comments: