Help:Wiki-Lyrics Script

From Lyriki
Jump to navigation Jump to search

This guide intends to explain all steps necesaries to get Lyriki script working on Windows. Feel free to expand it if you manage to get it working by tweaking something not explained here. If you're having problems following any of the steps, don't hesitate to ask on the talk page, we'll try to give you an answer.

Install Ruby

Download and install the lastest version of the Ruby One-Click-Installer for Windows from RubyForge.

Install a GUI Toolkit

At least one of the supported GUI toolkits is needed to actually see the lyrics. Currently, only GTK and Tk are supported on Windows, but Qt might be supported too in the future.

Install Ruby/GTK

Download and install the GTK runtime libraries from Glade for Windows.

Download the Ruby/GTK Bindings for Windows. To install them decompress the zip contents in a folder and run the following command from a shell prompt:

C:\ruby-gtk2-0.15.0-1-i386-msvcrt-1.8> ruby.exe install.rb

Install Tcl/Tk

Download and install ActiveTcl from the ActiveState site.

Install Lyriki-Lyrics Script

Download and extract the Lyriki-Lyrics script to an empty folder on your computer, such as "C:\Lyriki" or "C:\Program Files\Lyriki".

Install and Configure AMIP

Install AMIP for the media player you're using.

Configure AMIP's "output string & preset" to be one of the suggested settings (explained below) and make sure the script is enabled (is that's configurable).

a. Fetch lyrics from Lyriki and other sites, prompt to submit missing lyrics:
/exec:(<full path to lyriki.bat>) -a "%1" -t "%2" -l "%4" -y "%5" -s -u <user> -p <pass> --persist session
b. Fetch lyrics from Lyriki and other sites, prompt to submit missing lyrics and review autogenerated pages:
/exec:(<full path to lyriki.bat>) -a "%1" -t "%2" -l "%4" -y "%5" -s -u <user> -p <pass> --persist session -g 
c. Fetch lyrics from Lyriki and other sites, do not prompt to submit missing lyrics:
/exec:(<full path to lyriki.bat>) -a "%1" -t "%2" -l "%4" -y "%5"
d. Fetch lyrics only from Lyriki, do not prompt to submit missing lyrics:
/exec:(<full path to lyriki.bat>) -a "%1" -t "%2" -l "%4" -y "%5" --no-meta
NOTE: these are only suggestions; you can customize AMIP's "output string & preset" option to do whatever you like (read the appendix on lyriki.bat options to find out what each switch does).

Try It Out

Play a song to test it, if everything goes well you should see a dialog popup with the lyrics for the playing song (it should take from 5 to 20 seconds, depending on the song and your settings). If nothing happens it might be one of the following reasons:

  1. The lyrics were not found: how likely this is depends on AMIP's "output string & preset" option and on the song playing. To rule this out try with other songs and, if it's not the case already, change AMIP's "output string & preset" option to search the lyrics on other sites as well (remove the --no-meta switch).
  2. There is a problem with the GTK or Ruby/GTK instalation: there seems to be an incompatibility between the iconv version installed with Ruby and the one needed by GTK. Try executing the file gtk_fix.bat provided with the Lyriki script.
  3. There is a problem with the Tcl/Tk instalation: you may need to copy the tcl lib directory to the root of the drive you have Lyriki's plugin installed to.

Appendix A: lyriki.bat options

Usage: lyriki.bat [OPTIONS]

Options:
    -a, --artist [ARTIST]            Song artist (mandatory).
    -t, --title [TITLE]              Song title (mandatory).
    -l, --album [ALBUM]              Song album.
    -y, --year [YEAR]                Song album year.

    -c, --[no-]cleanup               Cleanup fetched lyrics (true by default).

    -m, --[no-]meta                  Search missing lyrics in other sites (true by default).
        --meta-sites [S1,S2...]      Specify sites to query for missing lyrics, order included (defaults to all
                                     available sites if -m given).
                                     Available sites:
                                      - AZ Lyrics (www.azlyrics.com)
                                      - Jamendo (www.jamendo.com)
                                      - Leos Lyrics (www.leoslyrics.com)
                                      - Lyrc (lyrc.com.ar)
                                      - LyricWiki (www.lyricwiki.org)
                                      - Lyrix.at (www.lyrix.at)
                                      - Sing365 (www.sing365.com)
                                      - Terra Letras (letras.terra.com.br)

    -s, --[no-]submit                Submit lyrics to Lyriki (false by default).
    -u, --user [USERNAME]            Username to login with (mandatory when -s specified).
    -p, --pass [PASSWORD]            Password to login with (mandatory when -s specified).
        --persist [SESSIONFILE]      Restore session from file and save it before exiting (needs -u & -p).

                                     NOTE: it is extremely recommended to specify this option if -s is specified.
                                           Otherwise, the script will attempt to (re)login to the site for every
                                           song (wasting a few seconds every time!).

    -r, --[no-]review                Prompt for review before submitting content (requires -s, true by default).
    -g, --[no-]prompt-autogen        Prompt for review of autogenerated pages (requires -r, false by default).
    -n, --[no-]prompt-new            Prompt for submission even when there are no lyrics to submit (requires -r,
                                     false by default).

    -x, --proxy [PROXY]              Proxy server URL (defaults to no proxy).

    -k, --toolkits [gtk,tk]          Specify UI toolkit priority (falling back to the next one when loading fails).
                                     An empty list will cause no dialog to be shown and lyrics to be dumped to
                                     stdout (defaults to qt,gtk,tk).

                                     NOTE: it is extremely recommended to specify only one toolkit (the one that
                                           will be used). This will reduce the time taken to display the lyrics
                                           by a few seconds (for every song!).

Appendix B: Screenshots

No, seriously... it works:

  • Lyriki-Lyrics running from Winamp (GTK toolkit)

Lyriki-Lyrics running from Winamp (GTK toolkit)

  • Lyriki-Lyrics running from Winamp (Tk toolkit)

Lyriki-Lyrics running from Winamp (Tk toolkit)