]> git.r.bdr.sh - rbdr/lyricli/blame_incremental - README.md
Remove async lock even if track not found
[rbdr/lyricli] / README.md
... / ...
CommitLineData
1# Lyricli (lrc)
2
3A command line tool to show the lyrics of your current song.
4
5## Usage
6
7Lyricli can be invoked with the command `lrc`. It can be invoked without
8arguments, with an artist and song or with a special command:
9
10```
11$ lrc [-t]
12```
13
14When you run it without arguments, it will look in the available source
15to try to find a playing song and extract the lyrics. If you include the
16`-t` flag, it will show the song and artist names before the lyrics.
17
18```
19$ lrc [-t] <artist_name> <song_name>
20```
21
22When you run it with arguments, it will use them to search for the
23lyrics. This won't work if you manually disable the arguments source in
24your configuration file. If you include the `-t` flag, it will show the
25song and artist names before the lyrics.
26
27### Commands
28
29In order to configure
30
31* `lrc -l` or `lrc --list-sources` lists the available sources. Enabled
32 sourcess will have a `*`
33* `lrc -e` or `lrc --enable <source>` enables a source
34* `lrc -d` or `lrc --disable <source>` disables a source
35* `lrc -r` or `lrc --reset-source <source>` resets the configuration for
36 a source and disables it.
37* `lrc -v` or `lrc --version` prints the version
38* `lrc -h` or `lrc --help` display built-in help
39
40## Building
41
42The build has only been tested on OSX using Swift 3.1. Building defaults
43to the debug configuration.
44
45```
46make
47```
48
49## Installing from source
50
51Builds lyricli in release configuration and copies the executable as
52`lrc` to `/usr/local/bin`
53
54```
55make install
56```
57
58### Installing to a custom directory
59
60This can be done by overriding the `install_path` variable
61
62```
63make install install_path=/opt/bin
64```
65
66## Linting and Generating Documentation
67
68We use [swiftlint][swiftlint] to lint, and `make lint` to run it.
69We use [jazzy][jazzy] and [SourceKitten][sourcekitten] to document, and
70`make document` to generate it.
71
72## Running tests
73
74No tests at the moment 😬... but the makefile is mapped to run the swift
75tests.
76
77```
78make test
79```
80
81[![Build Status](https://travis-ci.org/lyricli-app/lyricli.svg?branch=master)](https://travis-ci.org/lyricli-app/lyricli)
82
83[swiftlint]: https://github.com/realm/SwiftLint
84[jazzy]: https://github.com/realm/jazzy
85[sourcekitten]: https://github.com/jpsim/SourceKitten