The only change since mycopycover.pl v1.00 is the ability to specify keys on the command line, that will be used to filter the cover copy.
Thus, mycopycover.pl v1.10 usage is now :
This script copies album covers found in Amarok's cache to the album directories.
Usage: mycopycover.pl [-dfhrtv] [-c <scheme>] [-s <string>] [<key>... <key>]
-c <scheme> : use <scheme> as cover filename scheme (default: '%a - %t.png')
recognized jokers in <scheme> are :
'%a', which will be expanded to artist name
'%t', which will be expanded to album's title
-d : do not create .directory entries
-f : force replacement of existing covers / .directory entries
-h : this (help) message
-r : remove covers from Amarok's cache once copied into albums' directories
-s <string> : use <string> as artist name for sampler albums (default: 'Various Artists')
-t : test mode, won't perform any action
-v : verbose output
-w : don't warn about possible problems with locale
<key> : (perl) regular expression used to match a particular album. album keys are in ''artist - title'' format. search is case insensitive.
Default behaviour is to scan your whole collection.
If you only want to copy cover for all your DJ Shadow albums, use "dj shadow.*" as a key.
If you only want to copy cover for an album named The outsider, use ".*the outsider" as a key.
If you only want to copy cover for DJ Shadow's The Outsider album, use "dj shadow - the outsider" as a key.
1 De Luis Guillermo -
How can i install this in amarok, i want to do this, so i don't miss all the covers.
Could you please send me a guide or something? i search the web.
No clues yet.
Please give me a hand.
2 De mattack -
Okay, this is great. I understand Perl a lot more than Python, and the latest version of the Python script seems to be broken. Thanks for all your work.
I've got a problem with the regex on line 273: if( grep(/\s+$data\s+/,@filesystems) )
or rather I have a problem with the name of one of my devices.
I have a thumb drive named with my name and phone number formatted like this:
my_name_[123-456-7890]
The regex hangs on the first "-" with this error:
Invalid [] range "3-4" in regex; marked by <-- HERE in m/\s+/media/my_name[123-4 <-- HERE 56-7890]\s+/ at Desktop/mycopycover.pl line 273.
How can I either fix the regex or have Amarok "forget" that it's a known device?
For now, my workaround is changing line 262 to $my data ="/";
3 De mattack -
got it... changed line 262 to
my $data = quotemeta $_;
4 De JWilly -
$ perl mycopycover.pl -tfv
...
You need AmaroK >= 1.4.2 to run this script. Please update.
$ dcop amarok player version
1.4.10
I'm no perl expert, but it seems that line 241 is referencing version 1.4.2 as a text string? So I changed it from:
unless( $results[0] ge "1.4.2" )
to:
unless( $results[0] ge 1.4.2 )
and it works for my version (1.4.10).
Maybe this should be verified that it actually fails on <1.4.2 (I don't have time to install that version right now)?