]> git.r.bdr.sh - rbdr/r.bdr.sh/blob - jekyll/_posts/2013-03-12-introducing-lyricli.md
Adds recorderjs
[rbdr/r.bdr.sh] / jekyll / _posts / 2013-03-12-introducing-lyricli.md
1 ---
2 layout: post
3 title: "Introducing Lyricli — Command line lyrics."
4 category: posts
5 tags: english lyricli tools
6 header_image: lyricli.png
7 description: "Introducing lyricli, a lyrics client for your terminal written in ruby"
8 ---
9
10 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.
11
12 If you're into music with lyrics in the terminal, give it a spin. The easiest way to install is through rubygems
13
14 gem install lyricli
15
16 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:
17
18 lrc "Of Montreal" "An Eluardian Instance"
19
20 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:
21
22 lrc -e rdio
23
24 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.
25
26 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!) .
27
28 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.
29
30 [github]: http://github.com/benbeltran/lyricli
31 [twitter]: http://twitter.com/benbeltran