Skip to main content

A command line tool to fetch lyrics from Genie

Project description

lyriks License PyPI version PyPI downloads

A command line tool that fetches lyrics from Genie.

Installation

You can easily install lyriks from PyPI by using pip:

pip install lyriks

To install it from source instead, clone the repository and build the wheel before installing it with pip:

uv build
pip install dist/lyriks-0.5.5-py3-none-any.whl

You can also run the script directly from within the repository:

`./lyriks.py /path/to/music/folder`

Make sure to first install the required dependencies from pyproject.toml (i.e. uv sync).

Usage

Simply run the script with the path to the folder containing your music as an argument. This can be your whole collection, a single artist, or a single album.

lyriks /path/to/music/folder

The script will search for audio files (.flac or .mp3) in the given folder, and attempt to fetch the lyrics. Note that it will only be able to do that for files that are properly tagged with MusicBrainz MBIDs (specifically musicbrainz_releasegroupid and musicbrainz_trackid). It then uses them to resolve the Genie album ID from the release or release group on MusicBrainz. Thus, at least one release in the release group must have a URL relationship to the album on Genie.

If successful, the lyrics will be downloaded and stored next to the audio files with the appropriate extension (.lrc or .txt, depending on whether they're synced or not).

Exclude files and folders

You can recursively ignore folders by adding a (empty) .nolyrics file inside the folder you want to exclude. This can be useful for Western artists, where Genie is unlikely to have lyrics, or for instrumental releases.

Likewise, you can ignore specific songs by creating a file with the same name as the audio file but the extension changed to .nolyrics. For example, a track named 01 Song.flac can be excluded by creating a file named 01 Song.nolyrics.

Excluded files won't be queried at all, which can noticeably speed up the synchronisation process for large collections.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lyriks-0.5.5.tar.gz (32.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lyriks-0.5.5-py3-none-any.whl (37.8 kB view details)

Uploaded Python 3

File details

Details for the file lyriks-0.5.5.tar.gz.

File metadata

  • Download URL: lyriks-0.5.5.tar.gz
  • Upload date:
  • Size: 32.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for lyriks-0.5.5.tar.gz
Algorithm Hash digest
SHA256 8afb6312ebbaf80051c1916424f42fbb2a05d6845c175b0cfa13b1e45c8d3fc2
MD5 0e25dfc9fa83c2111aa1982bc60a6f9c
BLAKE2b-256 64caa8cfa178d3dee2e7f40de114b3d0726874f757186166e54314f8751f0e7e

See more details on using hashes here.

File details

Details for the file lyriks-0.5.5-py3-none-any.whl.

File metadata

  • Download URL: lyriks-0.5.5-py3-none-any.whl
  • Upload date:
  • Size: 37.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for lyriks-0.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3c7e49b74a0df425ef9f03c4dfb5c2d88891d52c67e4d77a20758ca26a6e7159
MD5 f68e1de05e46b3e2fd575d811855a812
BLAKE2b-256 2c02f8a52f4bd8f5afb4d746a6dede339bae8de24e43df78ab238f2e3051d0c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page