77 lines
2.5 KiB
Markdown
77 lines
2.5 KiB
Markdown
# musixmatch-cli
|
|
|
|
[![Current crates.io version](https://img.shields.io/crates/v/musixmatch-cli.svg)](https://crates.io/crates/musixmatch-cli)
|
|
[![License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](http://opensource.org/licenses/MIT)
|
|
[![CI status](https://codeberg.org/ThetaDev/musixmatch-inofficial/actions/workflows/ci.yaml/badge.svg?style=flat&label=CI)](https://codeberg.org/ThetaDev/musixmatch-inofficial/actions/?workflow=ci.yaml)
|
|
|
|
The Musixmatch CLI allows you to fetch lyrics, subtitles and track metadata from the
|
|
command line using the Musixmatch API.
|
|
|
|
The Musixmatch API used to require a free account on <https://www.musixmatch.com> to be
|
|
used. However, as of 2024, this requirement was removed and the API can be used
|
|
anonymously. The CLI still allows you to supply credentials if Musixmatch decides to
|
|
close the API down again.
|
|
|
|
### Get lyrics
|
|
|
|
```txt
|
|
musixmatch-cli lyrics -n shine -a spektrem
|
|
Lyrics ID: 34583240
|
|
Language: en
|
|
Copyright: Writer(s): Jesse Warren
|
|
Copyright: Ncs Music
|
|
|
|
Eyes in the sky gazing far into the night
|
|
I raise my hand to the fire, but it's no use
|
|
'Cause you can't stop it from shining through
|
|
It's true
|
|
...
|
|
```
|
|
|
|
### Get translated lyrics
|
|
|
|
Musixmatch also offers translated lyrics. You have to select a language using the
|
|
`--lang` flag. You can also set the `--bi` flag to output both the original and
|
|
translated lines.
|
|
|
|
```txt
|
|
musixmatch-cli lyrics -n shine -a spektrem --lang de --bi
|
|
Lyrics ID: 34583240
|
|
Language: en
|
|
Copyright: Writer(s): Jesse Warren
|
|
Copyright: Ncs Music
|
|
Translated to: de
|
|
|
|
Eyes in the sky gazing far into the night
|
|
> Augen starren in die weite Nacht
|
|
I raise my hand to the fire, but it's no use
|
|
> Ich hebe meine Hand in das Feuer, doch ihr geschieht nichts
|
|
'Cause you can't stop it from shining through
|
|
> Denn du kannst es nicht daran hindern, hindurch zu scheinen
|
|
It's true
|
|
> Es ist wahr
|
|
...
|
|
```
|
|
|
|
### Get subtitles (synchronized lyrics)
|
|
|
|
For most lyrics Musixmatch provides timestamps for the individual lines so you can
|
|
display them in sync during playback.
|
|
|
|
Musixmatch offers multiple subtitle formats you can select using the `--format` flag.
|
|
The available formats are: `lrc`, `ttml`, `ttml-structured`, `json`, `ebu-stl`
|
|
|
|
```txt
|
|
musixmatch-cli subtitles -n shine -a spektrem
|
|
Subtitle ID: 35340319
|
|
Language: en
|
|
Length: 316
|
|
Copyright: Writer(s): Jesse Warren
|
|
Copyright: Ncs Music
|
|
|
|
[00:59.84] Eyes in the sky gazing far into the night
|
|
[01:06.55] I raise my hand to the fire, but it's no use
|
|
[01:11.97] 'Cause you can't stop it from shining through
|
|
[01:16.07] It's true
|
|
...
|
|
```
|