Coder Social home page Coder Social logo

yogeshwaran01 / lyricy Goto Github PK

View Code? Open in Web Editor NEW
27.0 2.0 3.0 15.83 MB

A command line lyrics utility tool which search and add lyrics to your offline songs. ๐ŸŽต

Home Page: https://lyricy.yogeshwaran01.repl.co/#/

License: MIT License

Python 97.33% Dockerfile 0.74% Procfile 0.08% Nix 0.53% Shell 1.31%
lyrics music songs lyrics-fetcher lyrics-finder lyrics-search spotify pypi python cli downloader mp3

lyricy's Introduction

๐ŸŽผ lyricy

A command line lyrics utility tool which search and add lyrics to your offline songs.

PyPi Downloads GitHub stars GitHub forks GitHub license Code style GitHub Repo size Upload lyricy to pypi Python package

Why lyricy ?

We can use spotDL/spotify-downloader to download our spotify playlist and songs along with album art and metadata. But it does not add the lyrics of the songs in song metadata. lyricy search for the lyrics of the song add to song metadata.

you can use Retro music player for android to listen the offline local songs with synced lyrics.

Features

  • Used as a Python package, Desktop application and mobile application (PWA)
  • Easy to add lyrics to your offline songs
  • Preview of lyrics
  • Synced lyrics with lrc time tags
  • Lyrics without lrc tags
  • Save lyrics as lrc file
  • Add your own lyrics or downloaded lyrics to songs

Usage

GUI

GUI is built with flet

demo

CLI

Installation

Using pip

pip install lyricy

Windows user download this executable file

demo

Usage: python -m lyricy [OPTIONS] COMMAND [ARGS]...

  A command line lyrics utility tool which search and add lyrics to your
  offline songs.

Options:
  --help  Show this message and exit.

Commands:
  add     Search and add lyrics to given TRACK.
  remove  Remove lyrics from given TRACK.
  search  Search for lyrics for given track or query
  show    Show the lyrics of TRACK if available.

Searching for lyrics using your queries

Usage: python -m lyricy search [OPTIONS]

  Search for lyrics for given track or query

Options:
  -t, --track PATH       file path of track
  -d, --disable-preview  Disable the preview
  -l, --only-lyrics      Show Lyrics Only (without LRC tag)
  -s, --save TEXT        Save file as .lrc
  -q, --query TEXT       search query of track name
  -p, --provider TEXT    Lyrics provider name [rc] or [mo]
  --help                 Show this message and exit.
lyricy search --query "jolly yo gymkanna"

Searching for lyrics for your track

Track must have album metadata title

lyricy search --track 'Imagine Dragons - Believer.mp3'

After searching it print list of lyrics, enter the index number lyrics to get the full lyrics

Adding lyrics

Adding lyrics to track metadata to get synced lyrics

Usage: python -m lyricy add [OPTIONS] TRACK

  Search and add lyrics to given TRACK.

  TRACK is the filepath of track.

Options:
  -q, --query TEXT       search for this query instead of track name
  -d, --disable-preview  Disable the preview
  --show                 Print the lyrics and ask for confirmation
  --lrc PATH             Lyrics file to add on track
  -p, --provider TEXT    Lyrics provider name [rc] or [mo]
  --help                 Show this message and exit.
lyricy add 'Imagine Dragons - Believer.mp3'

select the preferred lyrics for the song to add it

If track does not have metadata title or any other irrelevant name, use can use --query option to override this.

lyricy add 'some-track.mp3' --query "vikram title track"

Changing lyrics provider

By default the lyrics provider is is megalobiz, but you can use other provider is rclyricsband

lyricy add 'some-track.mp3' --query "vikram title track" --provider rc
lyricy search --query "karka kark" --provider mo

Remove lyrics

Usage: lyricy remove [OPTIONS] TRACK

  Remove lyrics from given TRACK.

  TRACK is the filepath of track.

Options:
  --help  Show this message and exit.
lyricy remove 'Imagine Dragons - Believer.mp3'

Show lyrics

Usage: lyricy show [OPTIONS] TRACK

  Show the lyrics of TRACK if available.

  TRACK is the filepath of track.

Options:
  -l, --only-lyrics  Show Lyrics Only (without LRC tag)
  --help             Show this message and exit.
lyricy show 'Imagine Dragons - Believer.mp31

Downloading lrc file

lyricy search --query "new york" --save "new_york"

This search and ask for the prompt, select any song it will download and save as lrc file

Add lrc file to song

lyricy add track.mp3 --lrc track.lrc

It will add the lyrics to song metadata

Python Package

Install

Using pip

pip install lyricy

Simple Usage

>>> from lyricy import Lyricy

>>> l = Lyricy()
>>> results = l.search("karka karka")
>>> selected_lyrics = results[0]
>>> selected_lyrics.fetch()

>>> selected_lyrics.lyrics
>>> selected_lyrics.lyrics_without_lrc_tags

Saving and adding lyrics to track

>>> selected_lyrics.save("lyrics.lrc")
>>> selected_lyrics.add_to_track("path_to_track.mp3")

Using Other Providers

Default provider is https://www.megalobiz.com/, but you can use other provider is https://rclyricsband.com/.

>>> from lyricy import Lyricy, Providers

>>> l = Lyricy()
>>> results = l.search("vikram", provider=Providers.RCLYRICSBAND)
>>> selected_lyrics = results[0]
>>> selected_lyrics.fetch()

>>> selected_lyrics.lyrics
>>> selected_lyrics.lyrics_without_lrc_tags

Dev Setup

  • Clone repo
  • Install package requirements
pip install -r requirements
  • Install dev requiremnts
pip install black flake8 pytest
  • Linting
black
flake8 -v
  • Test
pytest -v

Lyrics Providers

Contributions

Contributions are Welcome. Feel free to report bugs in issue and fix some bugs by creating pull requests. Comments, Suggestions, Improvements and Enhancements are always welcome.

lyricy's People

Contributors

lightrajat avatar yogeshwaran01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lyricy's Issues

[Feature Request] Bulk downloading

Feature Request:
Add the ability to mass download LRC files for many songs in multiple directories. This will allow you to run it for your whole plex library to download lyrics for every song in every album directory

Support for non English languages

The program works without any flaw for subtitles that are in English languages.
But, in the case for other languages(such as Bengali, Korean) the program throws error.
Adding support for non English languages would be very useful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.