#!/bin/zsh
# ls -l $*
# exit
osascript \
-e 'on run argv' \
-e 'set this_items to {}' \
-e 'repeat with i from 1 to the count of argv' \
-e '	set a_path to item i of argv' \
-e '	set this_item to POSIX file a_path' \
-e '	set end of this_items to this_item as alias' \
-e 'end repeat' \
-e 'tell application "iTunes"' \
-e '	launch' \
-e '	set pdfs to add this_items to playlist 1 of source 1' \
-e '	repeat with pdf in pdfs' \
-e '		set genre of pdf to "Pdf-new"' \
-e '	end repeat' \
-e 'end tell' \
-e 'end run' \
$*
