Skip to main content

Fetch lyrics from Genius using your command line

Project description

fetch_lyrics CLI Function

Custom command-line interface, based on the lyricgenius* Genius API implementation. Command line flags can be used to automatically copy the found lyrics to the MacOS* clipboard, and to store the found lyrics as .txt files in a (configurable) directory.


Installation and First Use

pip install lyrics-fetcher

For this software to work, a Genius API token is required. These (free) tokens can be found on the Genius developers website. More information about the Genius API can be found in the Genius API documentation. See the Usage section for information on how to set a token.


Usage

Fetching Lyrics

fetch_lyrics -[pc] "Queen" "Bohemian Rhapsody"

the -p flag enables saving of lyrics to a .txt file. By default, this is the current directory from which the command is run. To change the output directory, see the changing settings section.

the -c flag enables copying of the found lyrics to the MacOS* clipboard. This could be useful for manually adding lyrics to ID3 tags.

--settings, --help and --version can also be called for their basic functionality.

Changing Settings

before the first use, the token should be set. This token will be locally stored (unencrypted). To set the token, use the following command:

fetch_lyrics set token "TOKEN"

where TOKEN is replaced with the token obtained from the Genius developers webpage.

A custom output directory for the output of found lyrics into .txt files can be set using:

fetch_lyrics set outdir "desired/output/directory"

Settings are locally stored in .settings files. Note that these are unencrypted, but are never shared or moved.


Use Policy

This software is licensed using GNU GPLv3.


Disclaimer and Notes

*) Note that compatibility of different dependencies and OS' is not (yet) investigated.

  • I am open to improvements/pull requests, but may not have much time to look into them.

  • Currently only supports UTF-8 character encoding.

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

lyrics-fetcher-0.2.2.tar.gz (23.8 kB view hashes)

Uploaded Source

Built Distribution

lyrics_fetcher-0.2.2-py3-none-any.whl (24.8 kB view hashes)

Uploaded Python 3

Supported by

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