]> git.r.bdr.sh - rbdr/lyricli/blame_incremental - README.md
Use a dummy token for the client
[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`.
8
9```
10$ lrc [-t]
11```
12
13When you run it without arguments, it will look in the available source
14to try to find a playing song and extract the lyrics. If you include the
15`-t` flag, it will show the song and artist names before the lyrics.
16
17```
18$ lrc [-t] <artist_name> <song_name>
19```
20
21When you run it with arguments, it will use them to search for the
22lyrics. This won't work if you manually disable the arguments source in
23your configuration file. If you include the `-t` flag, it will show the
24song and artist names before the lyrics.
25
26### Commands
27
28In order to configure sources, lyricli provides a few commands:
29
30* `lrc -l` or `lrc --list-sources` lists the available sources. Enabled
31 sourcess will have a `*`
32* `lrc -e` or `lrc --enable-source <source>` enables a source
33* `lrc -d` or `lrc --disable-source <source>` disables a source without
34 resetting its configuration.
35* `lrc -r` or `lrc --reset-source <source>` resets the configuration
36 for a source and disables it.
37
38And you can print the help or the version:
39
40* `lrc -v` or `lrc --version` prints the version
41* `lrc -h` or `lrc --help` display built-in help
42
43## Building
44
45The build has only been tested on OSX using Swift 5.8 Building defaults
46to the debug configuration.
47
48```
49make
50```
51
52### Configuration
53
54To avoid storing the API key in source control, clientToken in the
55lyrics_engine is using a placeholder value. You'll need to replace this
56before building
57
58* `GENIUS_CLIENT_TOKEN`: The Client token for your genius API client
59
60## Installing from source
61
62Builds lyricli in release configuration and copies the executable as
63`lrc` to `/usr/local/bin`
64
65```
66make install
67```
68
69### Installing to a custom directory
70
71This can be done by overriding the `install_path` variable
72
73```
74make install install_path=/opt/bin
75```
76
77## Linting and Generating Documentation
78
79We use [swiftlint][swiftlint] to lint, and `make lint` to run it.
80We use [jazzy][jazzy] and [SourceKitten][sourcekitten] to document, and
81`make document` to generate it.
82
83## Running tests
84
85No tests at the moment 😬... but the makefile is mapped to run the swift
86tests.
87
88```
89make test
90```
91
92[swiftlint]: https://github.com/realm/SwiftLint
93[jazzy]: https://github.com/realm/jazzy
94[sourcekitten]: https://github.com/jpsim/SourceKitten