2021-09-29 04:20:27 +02:00
# Nicole - Lyrics Scraper
2021-09-29 15:52:12 +02:00
**N**ew-**I**ntrepid-**C**hief-**O**f-**L**yrics-**E**mbedders (obviously)
2021-09-29 04:20:27 +02:00
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 15:39:48 +02:00
Unfortunately, there needs to be a 5 second delay between each request to azlyrics.com because the site will block your ip for a while if you send many requests.
2021-09-29 04:20:27 +02:00
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 15:39:48 +02:00
Nicole creates an azlyrics.com url from the "title" and "artist" tags of the file.
2021-09-29 04:20:27 +02:00
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 15:35:14 +02:00
- `-t` test, do not write lyrics to file, but print to console
2021-09-29 04:27:35 +02:00
- `-h` show this
2021-09-29 15:39:48 +02:00
- `--rm_explicit` remove the "[Explicit]" lyrics warning from the song's 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 16:00:05 +02:00
After installing, you can use it like this: `nicole -ior -d ~/music/artist --rm_explicit`
2021-10-03 17:39:43 +02:00
## Changelog
### 1.1
- Lyrics are now properly encoded.
- If a title contains paranthesis or umlaute, multiple possible urls will be checked.
2021-10-03 20:31:50 +02:00
- Files are now processed in order
2021-10-03 17:39:43 +02:00
2021-09-29 04:24:35 +02:00
## Importand Notice
2021-09-29 04:20:27 +02:00
This software comes with no warranty!