Skip to content

paradise-ballad/paradise-lyrics-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lyrics From Paradise

References

Description

Get synchronized lyrics .lrc file content from command line interface (CLI).

  • Features

    1. Check if synchronized lyrics is available.
    2. Generate the lyrics from Spotify API values.
    3. Personalize the lyrics syntax style.
    4. Calculate the synchronize time following the hours:minutes:seconds:milliseconds format.
    5. Calculate the synchronize time following the hours:minutes:seconds format.
    6. Calculate the synchronize time following the minutes:seconds:milliseconds format.
    7. Calculate the synchronize time following the minutes:seconds format.
    8. Ignore the calculation of the time format by implementing the raw format.
    9. Generate the header metadata.
  • Scenarios where you should use this tool

    1. Integrate this tool as a library to your custom scripts files.
    2. Automating the synchronizing process task about downloading the lyrics for each file.
    3. Quick lyrics consult.
    4. Minimalist digital lifestyle.
  • Warning

    1. All the data is provide from a third API.
    2. There is no API key requirement for using this tool.
    3. There is no login account required for using this tool.
    4. This tool only requires to inform the track id value from Spotify.
  • Without this script tool you would try the following command (and filter the content manually):

    $ curl https://spotify-lyric-api.herokuapp.com/?url=https://open.spotify.com/track/0nLiqZ6A27jJri2VCalIUs?autoplay=true | jq .

Setup

  • Dependencies

    1. Python3 >= 3.10
  • Installation setup (stable version)

# Installing with cURL
curl -L https://raw.githubusercontent.com/henrikbeck95/paradise-lyrics/main/paradise-library.py -o ~/.local/bin/paradise-library
curl -L https://raw.githubusercontent.com/henrikbeck95/paradise-lyrics/main/paradise-lyrics.py -o ~/.local/bin/paradise-lyrics

# OR installing with wGET
wget https://raw.githubusercontent.com/henrikbeck95/paradise-lyrics/main/paradise-library.py -O ~/.local/bin/paradise-library
wget https://raw.githubusercontent.com/henrikbeck95/paradise-lyrics/main/paradise-lyrics.py -O ~/.local/bin/paradise-lyrics

# Give executable permission
chmod +x ~/.local/bin/paradise-library
chmod +x ~/.local/bin/paradise-lyrics

# Run
paradise-lyrics --help

Usage

The song Nothing else matters by Metallica is currently being used during the tests.

Paradise Lyrics - Usage

  • The track id value from this song

    From https://open.spotify.com/track/0nLiqZ6A27jJri2VCalIUs url, the track id value is: 0nLiqZ6A27jJri2VCalIUs.

  • Change the track id value according to your needs.

Syntax

  • Syntax format

    $ paradise-lyrics --track "<spotify_track_id>" --syntax "<lyrics_syntax_format>"

  • Lyrics syntax [hours:minutes:seconds:milliseconds]

    $ paradise-lyrics --track "0nLiqZ6A27jJri2VCalIUs" --syntax "hh:mm:ss:mmm"

  • Lyrics syntax [hours:minutes:seconds]

    $ paradise-lyrics --track "0nLiqZ6A27jJri2VCalIUs" --syntax "hh:mm:ss"

  • Lyrics syntax [minutes:seconds:milliseconds]

    $ paradise-lyrics --track "0nLiqZ6A27jJri2VCalIUs" --syntax "mm:ss:mmm"

  • Lyrics syntax [minutes:seconds]

    $ paradise-lyrics --track "0nLiqZ6A27jJri2VCalIUs" --syntax "mm:ss"

  • Lyrics syntax raw

    $ paradise-lyrics --track "0nLiqZ6A27jJri2VCalIUs"

Export

  • Syntax for exporting the output to .lrc file

    $ paradise-lyrics "<spotify_track_id>" "<lyrics_syntax_format>" > /path/to/the/file/output.lrc

  • Exporting the output to .lrc file

    $ paradise-lyrics "0nLiqZ6A27jJri2VCalIUs" "mm:ss:mmm" > ~/Music/lyrics/nothing_else_matters.lrc

  • Check the results files generated by this tool.

Development

  • Requirements

    1. Sh or Bash.
    2. Python >= 3.10
  • Export lyrics from every available syntax formats to ./examples/ path directory for testing $ ./paradise-styles.sh