iTRANS Amarok Script

Amarok 1.x Scripts

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
Score 50.0%
Description:

Here is an Amarok script to get the lyrics of hindi songs using the services provided at http://www.giitaayan.com and later TFSA for tamil songs. For regular songs it uses Lyrc and Astraweb services if other fails. It uses the GENRE tag to identify the website to query for lyrics.

Idea is to get the iTRANS encoded lyrics in the ISB files and then convert them into UTF-8 to display in the context -> lyrics window. If more than one hit then give the user an option to select the best hit among them.
Last changelog:

12 years ago

Version 0.4.4
On x86_64 systems it calls itrans64 else itrans.
Version 0.4
Refactored the script to make it fault tolerant. In case of Hindi/Tamil etc genres, it uses scripts for those languages else calls lyrc and if it fails then astraweb. Going to work on getting Tamil lyrics from TFSA website.
Version 0.3
Did a workaround on getting title, artist, album, genre etc from command argument. Instead using dcop calls to get them. Now the script calls iTRANS if genre=hindi else calls lyrc script. Will try to extend it to other indian languages.
Version 0.2.1
Song meta data in bold, more options and some cleanups. Looking at option to enable lookup by Genre. See wish/bug 139453 @ http://bugs.kde.org/show_bug.cgi?id=139453
Version 0.1.1
Corrected a bug when no artist name is provided, in which case title is passed in args[1]
Updated version 0.1
Well, I got it to where it can display the lyrics in hindi using UTF-8. From now on it will be more refinement and versatile.
Updated version 0.0.2
Added ability to select if multiple hits.
First version 0.0.1

C

cyrus007

12 years ago

I have created a version integrated into wiki-lyrics which can be checked out from http://www.swapsphoto.com/swapscomp.html The caveat is that the script can not use the genre tag so it will fetch lyrics based on priority and if earlier ones fail then it will call this one.

Report

attendant

12 years ago

I made some changes to it, such as adding a (not very good) Devanagari to ITRANS conversion to allow searching lyrics even if the user tags aren't ITRANS encoded. I've done it myself since I could not found any tool to do this for me (for what I see itrans program translates from ITRANS to Hindi scripts, but not the other way around...). If you know any tool to do that conversion, please let me know.
Anyway, I've already included this script in Wiki-Lyrics and will release it with the next version.

Thanks.

Report

C

cyrus007

12 years ago

This got me thinking, why not replace the itrans executable with Ruby code the other way from what you have done. You will just need the .ifm file and peek into the itrans source to find out how it works. That way we don't have to worry about platform issues.

Report

C

cyrus007

12 years ago

Sorry, didn't realise this earlier. The itrans executable bundled with the script was created on my machine which is Kubuntu running on AMD64 so it is x86_64 specific. On other platforms it has to be downloaded from http://www.aczoom.com/itrans/#download

Meanwhile I will look into making it platform independent.

Report

kapat

12 years ago

will be eagerly waiting for the update!

Report

kapat

12 years ago

just changed the itrans binary to the x386 binary from the above download link. seems to work! didn't need any "installation" procedures.

Report

C

cyrus007

12 years ago

Updated the script with both architecture version of itrans. Let me know if there is any problem with the script, out of the box.

Report

kapat

12 years ago

works gr8!

Report

kapat

12 years ago

Firstly kudos for this script, have been looking for something like this for a while now.
Ok now the issues:
Installed the .tar.gz file from the install script dialog, and ran it using the Run script button. But upon a successful search of a song, the Lyrics tab tries to "Fetch" lyrics and ends with displaying just the following line:
Powered by iTRANS (http://www.giitayaan.com/)

Upon clicking the "Open in external browser" icon under the Lyrics tab,it opens up the right .isb file from giitayaan website, but not able to display the lyrics. I'm using Debian/unstable and I do have ruby1.8 installed. I have two specific UTF-8 hindi fonts too. What else am I missing?

Report

C

cyrus007

12 years ago

Check the temporary file /tmp/lyrics.itx , is it present ? If not then there might be some permission related issue. If so then let me know, I will update the script to take care of it.

Report

C

cyrus007

12 years ago

I have fixed it so that lyrics.itx file is created in $KDE-AMAROK/scripts-data directory instead of /tmp directory, so permissions problem should be fixed now.

Report

kapat

12 years ago

nope. doesn't work. it just displays..

Powered by ()

I tried setting all options of Amarok to "Default", but that did not help. Is this any font related issue? Do I need to have any particular font(s)?

Report

kapat

12 years ago

Forgot to add this info:

$KDE-AMAROK/scripts-data/lyrics.itx does have the correct lyrics with 444 permission but it is not able to display in the context browser of amarok.

Report

C

cyrus007

12 years ago

Most probably then it is a font related issue. Basically one needs unicode encoded font files for hindi script. To test if you have the fonts installed, run the following command in the scripts directory.
itrans -U -i $scripts-data/lyrics.itx
and see if you get any output. If not then you will need to install the unicode fonts for hindi language. Lot of them are available for free. Here is a start http://www.aczoom.com/itrans/ex_utf8.html

Report

kapat

12 years ago

well i can read sites like http://www.bbc.co.uk/hindi/ comfotably. a simple find gives the presence of
/usr/local/share/fonts/mangal.ttf which is a unicode compliant true type font for the devnagri script. of course i can see and read other hindi sites too...

running $ ./itrans -U -i ../../scripts-data/lyrics.itx
from the directory
~/.kde/share/apps/amarok/scripts/lyrics_itrans
gives the following error:
bash: ./itrans: cannot execute binary file

but lyrics.itx is not a binary file, i can view it. something else is bugging it.

Report

12 years ago

Version 0.4.4
On x86_64 systems it calls itrans64 else itrans.
Version 0.4
Refactored the script to make it fault tolerant. In case of Hindi/Tamil etc genres, it uses scripts for those languages else calls lyrc and if it fails then astraweb. Going to work on getting Tamil lyrics from TFSA website.
Version 0.3
Did a workaround on getting title, artist, album, genre etc from command argument. Instead using dcop calls to get them. Now the script calls iTRANS if genre=hindi else calls lyrc script. Will try to extend it to other indian languages.
Version 0.2.1
Song meta data in bold, more options and some cleanups. Looking at option to enable lookup by Genre. See wish/bug 139453 @ http://bugs.kde.org/show_bug.cgi?id=139453
Version 0.1.1
Corrected a bug when no artist name is provided, in which case title is passed in args[1]
Updated version 0.1
Well, I got it to where it can display the lyrics in hindi using UTF-8. From now on it will be more refinement and versatile.
Updated version 0.0.2
Added ability to select if multiple hits.
First version 0.0.1

12345678910
product-maker Base: 4 x 5.0 Ratings
Be the first to comment
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.4.4
updated Jan 25 2007
added Dec 30 2006
downloads 24h
0
mediaviews 24h 0
pageviews 24h 2
System Tags addon