2021-09-29 04:20:27 +02:00
|
|
|
# Nicole - Lyrics Scraper
|
|
|
|
|
2021-09-29 04:24:35 +02:00
|
|
|
## Overview
|
2021-09-29 14:43:58 +02:00
|
|
|
Nicole is a program that searches for lyrics and writes them into the mp3-tag.
|
2021-09-29 04:20:27 +02:00
|
|
|
There is a 5 second delay between each request to azlyrics.com because the site will block your ip if there are too many requests.
|
|
|
|
|
2021-09-29 14:43:58 +02:00
|
|
|
### Files
|
|
|
|
Nicole supports FLAC and mp3 files. Other files can not be edited (as of now).
|
|
|
|
Files that do not have a .flac or .mp3 extension are skipped automatically.
|
2021-09-29 14:52:05 +02:00
|
|
|
- mp3: lyrics are stored in "USLT" tag as "lyrics- "
|
|
|
|
- flac: lyrics are stored as vorbis-comment with key "LYRICS"
|
2021-09-29 14:43:58 +02:00
|
|
|
|
2021-09-29 04:24:35 +02:00
|
|
|
### History
|
2021-09-29 14:43:58 +02:00
|
|
|
Nicole creates a history of all files that were processed in `~/.configs/nicole`.
|
2021-09-29 04:20:27 +02:00
|
|
|
If a file is in the history, it will be skipped unless `ignore_history=True`.
|
|
|
|
If the lyrics for a file can not be obtained, it is added to `~/.configs/nicole/failed_files`.
|
|
|
|
Those files are not skipped, the file only exists so that you can see which lyrics were not downloaded.
|
|
|
|
|
2021-09-29 14:43:58 +02:00
|
|
|
If you dont want your files in the history, add the `-n` option.
|
|
|
|
|
2021-09-29 04:24:35 +02:00
|
|
|
### azlyrics
|
2021-09-29 04:20:27 +02:00
|
|
|
Nicole creates a azlyrics.com url from the title and artist mp3-tags of the file.
|
|
|
|
The lyrics are extracted from the html document using regex.
|
|
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
Command line options:
|
2021-09-29 04:28:12 +02:00
|
|
|
- `-d [directory]` process directory [directory]
|
|
|
|
- `-f [file]` process file [file]
|
2021-09-29 04:27:35 +02:00
|
|
|
- `-r` go through directories recursively
|
|
|
|
- `-s` silent, no command-line output
|
|
|
|
- `-i` ignore history
|
|
|
|
- `-n` do not write to history
|
2021-09-29 15:32:44 +02:00
|
|
|
- `-o` overwrite if the file already a lyrics
|
2021-09-29 04:27:35 +02:00
|
|
|
- `-h` show this
|
2021-09-29 15:32:44 +02:00
|
|
|
- `--rm_explicit` remove the "[Explicit]" lyrics warning from the songs title tag
|
2021-09-29 04:28:43 +02:00
|
|
|
|
2021-09-29 04:20:27 +02:00
|
|
|
If you do not specify a directory or file, the program will ask you if you want to use the current working directory.
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
Clone this repository and install it using python-pip.
|
|
|
|
pip should also install https://github.com/seebye/mutagen, which is needed to read and write the mp3-tags.
|
|
|
|
```shell
|
|
|
|
cd ~/Downloads
|
|
|
|
git clone https://github.com/MatthiasQuintern/nicole.git
|
|
|
|
cd nicole
|
|
|
|
python3 -m pip install .
|
|
|
|
```
|
|
|
|
You can also install it system-wide using `sudo python3 -m pip install.`
|
|
|
|
|
2021-09-29 04:24:35 +02:00
|
|
|
## Importand Notice
|
2021-09-29 04:20:27 +02:00
|
|
|
This software comes with no warranty!
|