LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-13-2010, 02:07 PM   #1
genderbender
Member
 
Registered: Jan 2005
Location: US
Distribution: Centos, Ubuntu, Solaris, Redhat
Posts: 396

Rep: Reputation: 31
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
 
Old 11-14-2010, 04:31 AM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
"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

Last edited by Simon Bridge; 11-15-2010 at 02:00 AM.
 
Old 11-14-2010, 06:19 AM   #3
genderbender
Member
 
Registered: Jan 2005
Location: US
Distribution: Centos, Ubuntu, Solaris, Redhat
Posts: 396

Original Poster
Rep: Reputation: 31
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.

Last edited by genderbender; 11-14-2010 at 06:22 AM.
 
Old 11-14-2010, 06:27 AM   #4
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
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.

Last edited by Simon Bridge; 11-15-2010 at 01:59 AM. Reason: make the post more useful
 
0 members found this post helpful.
Old 11-14-2010, 11:45 AM   #5
genderbender
Member
 
Registered: Jan 2005
Location: US
Distribution: Centos, Ubuntu, Solaris, Redhat
Posts: 396

Original Poster
Rep: Reputation: 31
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.
 
Old 11-15-2010, 02:43 AM   #6
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
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.]
 
1 members found this post helpful.
Old 11-15-2010, 04:27 AM   #7
genderbender
Member
 
Registered: Jan 2005
Location: US
Distribution: Centos, Ubuntu, Solaris, Redhat
Posts: 396

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by Simon Bridge View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Special Characters SimeonV Suse/Novell 14 07-07-2006 02:29 PM
special characters greenbox Linux - Software 9 12-23-2005 08:33 PM
Special characters consty Programming 3 08-07-2005 06:53 AM
using special characters one_ro Mandriva 5 11-04-2004 09:52 AM
Dialup and Special Characters ottbr Linux - General 7 01-16-2003 04:31 PM


All times are GMT -5. The time now is 08:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration