Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Move lyrics from Sing that iTunes to pearLyrics Apps
Tiger only hintI used to use the Sing that iTune! widget to insert lyrics into iTunes, but moved to using pearLyrics to avoid a bug. (The bug was that occasionally the lyrics for one song would be put into the iTunes lyrics for a different song).

However, Sing that iTune! also saves lyrics as text files, but names them differently from pearLyrics. So I wrote a UNIX shell script to copy the files and rename them in pearLyrics format. This allows all the lyrics files to be kept together the same way. I thought someone who is learning about shell scripts might want to see it.

The script is:

# 
# copy all "Sing that iTune!" song files to a directory with
# the song filename in pearLyrics format
#
# a directory called sing2pearfiles is created on the desktop 
# to hold the output files, if required.
#

mkdir -p ~/Desktop/sing2pearfiles;

cd ~/Documents/Sing that iTune!/

find . -type f -name *.txt -exec sh -c 'oldname="{}"; newname=$(echo "${oldname#./}" | tr "[:upper:]" "[:lower:]" | tr "/" " "); cp "$oldname" ~/Desktop/sing2pearfiles/"$newname"' ;                                                                               

To use it, paste it into a file and open a Terminal. Then run sh filename. This will create a folder called sing2pearfiles on your desktop. Use the Finder to move the files in that folder to where pearLyrics stores your files (on my Mac, it's ~/Library -> Application Support -> pearLyrics -> lyrics). The Sing that iTunes! files are not removed, so you may want to tidy them yourself.

The script works like this...
  1. mkdir -p ~/Desktop/sing2pearfiles
    Firstly the sing2pearfiles folder is created if it doesn't already exist.
  2. cd ~/Documents/Sing that iTune!/
    find . -type f -name *.txt 
    Then the "Sing that iTune!" lyrics folder is searched for files with names that end with ".txt" using.
  3. -exec sh -c 
    For each of the files a shell script is run.
  4. oldname="{}"; newname=$(echo "${oldname#./}" 
    The names of these files are manipulated to remove "./" from the start.
  5. tr "[:upper:]" "[:lower:]" 
    Any uppercase letters are turned into lowercase.
  6. tr "/" " "
    The directory separator character "/" is turned into a space.
  7. cp "$oldname" ~/Desktop/sing2pearfiles/"$newname"'
    Finally the file is copied.
I hope this explanation helps!

[robg adds: I haven't tested this one...]
    •    
  • Currently 3.25 / 5
  You rated: 5 / 5 (4 votes cast)
 
[14,575 views]  

10.4: Move lyrics from Sing that iTunes to pearLyrics | 4 comments | Create New Account
Click here to return to the '10.4: Move lyrics from Sing that iTunes to pearLyrics' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Move lyrics from Sing that iTunes to pearLyrics
Authored by: ij00mini on Dec 05, '05 08:12:30PM

Am i the only one for whom Sing that iTune! does not transfer lyrics to iTunes at all (even when the option to do so is checked)? I've since gone back to pearLyrics due to it's functionality, but the appearance is a bit lacking.



[ Reply to This | # ]
10.4: Move lyrics from Sing that iTunes to pearLyrics
Authored by: elpablo on Dec 05, '05 10:07:50PM

nope, same happens to me with sing that itune



[ Reply to This | # ]
10.4: Move lyrics from Sing that iTunes to pearLyrics
Authored by: jrispin on Dec 06, '05 10:16:52AM

Unfortunately, pearLyrics is no longer available. The developer received a "cease and desist" letter from Warner/Chappell Music Limited.



[ Reply to This | # ]
10.4: Move lyrics from Sing that iTunes to pearLyrics
Authored by: dave1212 on Dec 11, '05 10:47:48PM
yeah, what dicks, eh...

use the RIAA Radar before buying, and keep up with Recording Industry vs. The People for the latest in the continuing attacks by the major labels on their own customers, or would-be customers.

[ Reply to This | # ]