]> git.r.bdr.sh - rbdr/r.bdr.sh/blob - jekyll/lyricli/index.md
Typo fix
[rbdr/r.bdr.sh] / jekyll / lyricli / index.md
1 ---
2 layout: post
3 title: "Introducing Lyricli — Command line lyrics."
4 category: posts
5 tags: lyricli
6 date: 2013-01-19
7 url: /2013/03/12/introducing-lyricli/
8 description: "Introducing lyricli, a lyrics client for your terminal
9 written in ruby"
10 ---
11
12 I'm the kind of person that enjoys reading lyrics of some songs while I listen to music. I'm also the kind of person that enjoys listening to music with lyrics while working. Also, the kind of person that spends a lot of time inside a terminal. So I decided to do a little lyrics client to use inside a pane of my tmux sessions. I've been using it for a while, but hadn't released it because I never got to writing tests for it.
13
14 If you're into music with lyrics in the terminal, give it a spin. The easiest way to install is through rubygems
15
16 gem install lyricli
17
18 Lyricli uses an engine system that allows it to extract your current song from different places. Since I'm an iTunes+Rdio kind of guy, those are the included ones. Lyricli is usable in the form of the `lrc` command. To get lyrics for a song you can do it in several ways. The most basic is to call it with the artist and the song as the arguments. For example:
19
20 lrc "Of Montreal" "An Eluardian Instance"
21
22 The easiest and most useful way though, is by using the included sources. To see what engines are available, call lyricli with the `-l` or `--list-sources`. For now it should just display itunes and rdio. You can enable a source by calling lyricli with the `-e` or `--enable` flags. For example:
23
24 lrc -e rdio
25
26 Depending on the source, this will give you certain instructions to enable the source. For example, rdio asks you to authorize the app, displays the URL and an input for the authorization code. Once your engine is set up, you can just call `lrc` while listening to music, and it will automatically find the lyrics for your current song. (You could just use `watch -n 10 lrc` and have an auto-updating lyric pane inside tmux or screen.) If you want to disable a source you can call lyricli with the `-d` or `--disable` flags, with the source name as parameter. Additionally you can use `-r` or `--reset` flags, again with the name of the source to clean up all the stored settings.
27
28 That's about it. I hope it's as useful to you as it has been to me. In my laptop I usually have a vim window with a small sidebar where I run lyricli, while at work I use it as a narrow column that sits between vim and two regular zsh windows (yay! screen real estate!) .
29
30 Check out the code on [github][github] and [let me know what you think][twitter]. If you need a new source, feel free to let me know, if I have a way to I'll do my best to; or you can try creating one yourself. It's really easy, and you can check the included rdio and itunes files to check how it's done.
31
32 [github]: http://github.com/benbeltran/lyricli
33 [twitter]: http://twitter.com/benbeltran