musixmatch-cli

Crates.iomusixmatch-cli
lib.rsmusixmatch-cli
version0.2.0
sourcesrc
created_at2024-08-18 22:31:26.283631
updated_at2024-08-18 22:31:26.283631
descriptionInofficial command line interface for the Musixmatch API
homepage
repositoryhttps://codeberg.org/ThetaDev/musixmatch-inofficial
max_upload_size
id1343099
size67,925
ThetaDev (Theta-Dev)

documentation

README

musixmatch-cli

Current crates.io version License CI status

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

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.

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

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
...
Commit count: 0

cargo fmt