LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   abcde and special characters (https://www.linuxquestions.org/questions/linux-software-2/abcde-and-special-characters-844080/)

genderbender 11-13-2010 01:07 PM

abcde and special characters
 
I'm running abcde on an ubuntu machine using a default config, but all my music and albums seem to have numbers at the end (one would assume from special characters).

Anyone got any advice or solutions to this?

Thanks

Simon Bridge 11-14-2010 03:31 AM

"Abcde is a frontend command-line utility (actually, a shell script) that grabs tracks off a CD, encodes them to ogg or mp3 format, and tags them, all in one go."

However, abcde has a problem with utf8 filenames
http://code.google.com/p/abcde/issues/detail?id=22

possible approach - set the file encoding to utf8
http://ubuntuforums.org/showthread.php?t=534603

genderbender 11-14-2010 05:19 AM

So the solutions rename them all by hand, lol...

I put in a bunch of tr and sed statements which (almost) got rid of the problem. There's still the occasional randm number, the code they've got to strip the album title from cddb isn't great; it's funny the tagging works perfectly and displays special characters but the file and folder names are massively inconsistent across each os. For example in windows the folder name is just a set of numbers, in everything else it's the correct folder name.

There's also problems with the playlist which needs yet another mass sed replace statement. Because the playlist expects the audio to be two folders back - each track has ../../ at the start, now in the config file there's a setting to make it one folder back (which I've done) however because the playlist is incapable of reading the config file, or the settings are statically assigned, it keeps the original ../../ Whilst this program is good 9 times out of 10, there are so many problems with it, lol. I might raise a bug with em or something.

Thanks anyway.

Simon Bridge 11-14-2010 05:27 AM

Since the script is just a front end, you have to learn to use each of the backend programs to do anything non-standard and otherwise get the most out of it. I think the utf8 problem is in cddbread.

genderbender 11-14-2010 10:45 AM

abcde doesn't contain cddbread; also specifically the issue isn't with the tagging it's with processes within the 'script which is a front end' (as you've said numerous times before as if i wasn't aware of that already). The problems specifically within the filemunge function which does some basic filename replacement (e.g gets rid of specific special characters such as \/,?$#) - however this is not inclusive of foreign characters which remain present. The script basically takes the tag name and names the track after it, now the tag is fine - however the filename is not and thus the filemunge function within the "script which is a front end" needs to have some additional values put into it (for example tr "ö" "o"). As far as I know umlouts are present in UTF8 encoding.

Simon Bridge 11-15-2010 01:43 AM

Of course you have also realized: if you are just getting unwanted characters at the end of the filename, you can always just change the line that does this to truncate the name.

umlauts are, indeed, in utf8, yep - called a "diaeresis" they are also in the ascii extended character set. For instance, lower-case latin "o" with diaeresis is ascii 148 and unicode (195, 182).

You can probably borrow from the perl module:
text::unidecode
... it may just be enough to call one of the various perl scripts instead of the sed etc calls, at the expense of adding a perl dependency naturally. ref.
http://efreedom.com/Question/1-36428...ing-ASCII-Perl

Don't forget to share your solutions. People can find the abcde project hosted on google code.

[aside: thanks for letting me know about the annoying parts of my replies - I've modified those bits so it's not so bad without altering things too much. Please be patient, I am not just writing for you but also for those who read this after you.]

genderbender 11-15-2010 03:27 AM

Quote:

Originally Posted by Simon Bridge (Post 4159109)
Of course you have also realized: if you are just getting unwanted characters at the end of the filename, you can always just change the line that does this to truncate the name.

umlauts are, indeed, in utf8, yep - called a "diaeresis" they are also in the ascii extended character set. For instance, lower-case latin "o" with diaeresis is ascii 148 and unicode (195, 182).

You can probably borrow from the perl module:
text::unidecode
... it may just be enough to call one of the various perl scripts instead of the sed etc calls, at the expense of adding a perl dependency naturally. ref.
http://efreedom.com/Question/1-36428...ing-ASCII-Perl

Don't forget to share your solutions. People can find the abcde project hosted on google code.

[aside: thanks for letting me know about the annoying parts of my replies - I've modified those bits so it's not so bad without altering things too much. Please be patient, I am not just writing for you but also for those who read this after you.]

Will post the changes I made when I get back :).

Don't worry about the 'annoying replies' it's just because I'm being pathetic, haha.

Thanks for your help


All times are GMT -5. The time now is 09:21 PM.