Created
March 7, 2009 10:08
-
-
Save frioux/75294 to your computer and use it in GitHub Desktop.
This file contains 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
#!/home/frew/personal/rakudo/perl6 | |
use Ghetto; | |
for =$*IN -> $track,$artist,$album,$sep { | |
my $cmd = qq{dcop amarok collection query "SELECT url FROM tags JOIN artist ON artist.id = artist JOIN album ON album.id = album WHERE artist.name = \\"$artist\\" and album.name = \\"$album\\" and title = \\"$track\\""}; | |
# this insanity is to take the first character off because amaroK adds a | |
# . to the front of all the file names. There's probably a better way | |
# to do this. | |
say Ghetto::run($cmd).split("\n")[0].reverse.chop.reverse; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment