{"id":13910522,"url":"https://github.com/mrsobakin/lrc-dl","last_synced_at":"2025-04-13T11:15:15.834Z","repository":{"id":204756291,"uuid":"689085195","full_name":"mrsobakin/lrc-dl","owner":"mrsobakin","description":"🎵 The ultimate CLI tool for downloading lyrics for songs, inspired by other awesome *-dl projects.","archived":false,"fork":false,"pushed_at":"2025-04-01T22:37:19.000Z","size":57,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T11:15:06.422Z","etag":null,"topics":["dl","kugou","lrc","lyrics","lyrics-downloader","lyrics-finder","lyrics-search","musixmatch","youtube-dl","yt-dlp"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrsobakin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-08T19:04:55.000Z","updated_at":"2025-04-01T22:37:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"f68b74ef-817e-4ad1-9878-20e56b7fb4a2","html_url":"https://github.com/mrsobakin/lrc-dl","commit_stats":null,"previous_names":["mrsobakin/lyrics-dl","mrsobakin/lrc-dl"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsobakin%2Flrc-dl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsobakin%2Flrc-dl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsobakin%2Flrc-dl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsobakin%2Flrc-dl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrsobakin","download_url":"https://codeload.github.com/mrsobakin/lrc-dl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248703197,"owners_count":21148118,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dl","kugou","lrc","lyrics","lyrics-downloader","lyrics-finder","lyrics-search","musixmatch","youtube-dl","yt-dlp"],"created_at":"2024-08-07T00:01:31.301Z","updated_at":"2025-04-13T11:15:15.813Z","avatar_url":"https://github.com/mrsobakin.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# :musical_note: lrc-dl\n\nAn ultimate CLI tool for downloading lyrics for songs, inspired by other awesome *-dl projects.\n\n## Installation\n\nBefore you begin, make sure you have `python3` and `pip` installed.\n\n0. If you wish to use the `youtube` provider, install `ffmpeg` and add it to your `PATH`.\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/mrsobakin/lrc-dl.git\n   ```\n2. Navigate to the project directory:\n   ```bash\n   cd lrc-dl\n   ```\n3. Install the package:\n   ```bash\n   pip install .\n   ```\n\n## Usage\n\nYou can use `lrc-dl` both as a CLI tool and as a Python module.\n\n### CLI Usage\n\n```bash\nlrc-dl [-h] [-c CONFIG] [-e EXTENSIONS] [-f] path\n```\n\n#### Positional Arguments:\n\n- `path`: Path to the song file or directory\n\n#### Options:\n\n- `-h, --help`: Display help message and exit.\n- `-c CONFIG, --config CONFIG`: Specify a custom config file (in TOML format) for `lrc-dl`.\n- `-e EXTENSIONS, --extensions EXTENSIONS`: Define music file extensions, separated by commas (e.g., wav,flac,mp3).\n- `-f, --force-override`: Force override .lrc file, if it already exists.\n\n### Usage as a Python Module\n\nYou can also use `lrc-dl` as a Python module, allowing you to integrate its functionality directly into your own scripts or applications.\n\n#### Initializing `LyricsDl`\n\n```python\nfrom lrc_dl import LyricsDl, LyricsDlConfig\n\n# Create a LyricsDl instance with default configuration\nldl = LyricsDl()\n\n# Create a LyricsDl instance with a custom configuration\nconfig = LyricsDlConfig(order=[\"kugou\"])\nldl = LyricsDl(config=config)\n```\n\n#### Fetching Lyrics for a Song\n\n```python\nfrom lrc_dl import Song\n\n# Create a Song object\nsong = Song(title=\"Where'd All The Time Go?\", artist=\"Dr. Dog\")\n\n# Fetch lyrics for the song\nlyrics = ldl.fetch_lyrics(song)\n\nif lyrics:\n    print(lyrics)\nelse:\n    print(\"Lyrics not found\")\n```\n\n#### Processing a File\n\n```python\nfrom pathlib import Path\n\n# Define the path to the song file\nfile_path = Path(\"/path/to/song.mp3\")\n\n# Process the file\nldl.process_file(file_path)\n```\n\n#### Processing a Directory\n\n```python\nfrom pathlib import Path\n\n# Define the path to the directory\ndir_path = Path(\"/path/to/songs/directory\")\n\n# Define the extensions of music files\nextensions = [\"mp3\", \"wav\"]\n\n# Process the directory\nldl.process_directory(dir_path, extensions)\n```\n\nFor more detailed information on the usage of the `LyricsDl` class, `Song` class, and `LyricsDlConfig` class, you can explore the source code. The code is written with Python typing, making it easy to understand.\n\n## Configuration\n\nBy default, lrc-dl searches for the configuration file at `$XDG_CONFIG_HOME/lrc-dl/config.toml`. You can specify custom config location using `-c` flag.\n\nThe configuration is using the TOML format.\nGlobal provider parameters (for example, services order) are defined under the `[providers]` section.\nTo change provider-specific configuration, add a `[providers.provider_name]` section and set the required parameters under it.\n\nAs an example, to enable the `musixmatch` provider, you'll need to [acquire a Musixmatch token](https://web.archive.org/web/20230831151006/https://spicetify.app/docs/faq/#sometimes-popup-lyrics-andor-lyrics-plus-seem-to-not-work) and create a config like this:\n\n```toml\n[providers]\norder = [\"musixmatch\", \"kugou\"]\ndelay = 10  # Seconds to wait between searches\nprepend_header = true  # Prepend lrc-dl's \u0026 provider's header to keep track of lyrics source\n\n[providers.musixmatch]\ntoken = \"YOUR_TOKEN\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsobakin%2Flrc-dl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrsobakin%2Flrc-dl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsobakin%2Flrc-dl/lists"}