1 unstable release
0.2.0 | Aug 18, 2024 |
---|
#754 in Command line utilities
29 downloads per month
140KB
2.5K
SLoC
musixmatch-cli
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
...
Dependencies
~8–24MB
~375K SLoC