nicole/nicole.1.man

178 lines
4.7 KiB
Groff
Raw Permalink Normal View History

2024-05-03 22:42:32 +02:00
.\" Automatically generated by Pandoc 3.1.8
2022-04-04 05:55:34 +02:00
.\"
2024-05-03 22:42:32 +02:00
.TH "NICOLE" "1" "May 2024" "nicole 2.1.0" ""
2022-04-04 05:55:34 +02:00
.SH NAME
\f[B]N\f[R]ew-\f[B]I\f[R]ntrepid-\f[B]C\f[R]hief-\f[B]O\f[R]f-\f[B]L\f[R]yrics-\f[B]E\f[R]mbedders
(obviously)
.PP
Nicole is a program that searches for lyrics and writes them into the
mp3-tag of a file.
.SH SYNOPSIS
.PP
Directory:
.PD 0
.P
.PD
\ \ \ \f[B]nicole\f[R] [OPTION\&...]
-d DIRECTORY
.PD 0
.P
.PD
File:
.PD 0
.P
.PD
\ \ \ \f[B]nicole\f[R] [OPTION\&...]
-f FILE
.SS 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.
.PP
\f[B]mp3\f[R]: lyrics are stored in \[lq]USLT\[rq] tag as
\[lq]lyrics-\[rq]
.PP
\f[B]flac\f[R]: lyrics are stored as vorbis-comment with key
\[lq]LYRICS\[rq]
.SS History
Nicole creates a history of all files that were processed in
2024-05-03 22:42:32 +02:00
\f[CR]\[ti]/.configs/nicole\f[R].
If a file is in the history, it will be skipped (unless \f[CR]-i\f[R] is
2022-04-04 05:55:34 +02:00
passed).
If the lyrics for a file can not be obtained, it is added to
2024-05-03 22:42:32 +02:00
\f[CR]\[ti]/.configs/nicole/failed_files\f[R].
2022-04-04 05:55:34 +02:00
Those files are not skipped, the file only exists so that you can see
which lyrics were not downloaded.
.PP
2024-05-03 22:42:32 +02:00
If you don\[cq]t want your files in the history, add the \f[CR]-n\f[R]
2022-04-04 05:55:34 +02:00
option.
.SS genius
2022-04-04 06:14:47 +02:00
Nicole searches for lyrics using the genius api with the \[lq]title\[rq]
and \[lq]artist\[rq] tags of the file.
2024-05-03 22:42:32 +02:00
If the title and artist names from genius are similar enough to the ones
of the file, the lyrics are scraped from the url obtained through the
api.
2022-04-04 05:55:34 +02:00
.SS azlyrics
Nicole creates an azlyrics.com url from the \[lq]title\[rq] and
\[lq]artist\[rq] tags of the file.
The lyrics are extracted from the html document using regex.
.PP
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.
.SH USAGE
.SS Command line options
.TP
2024-05-03 22:42:32 +02:00
\f[B]\[em]-directory\f[R], \f[B]-d\f[R] directory
2022-04-04 05:55:34 +02:00
process directory [directory]
.TP
2024-05-03 22:42:32 +02:00
\f[B]\[em]-file\f[R], \f[B]-f\f[R] file
2022-04-04 05:55:34 +02:00
process file [file]
.TP
2024-05-03 22:42:32 +02:00
\f[B]\[em]-recursive\f[R], \f[B]-r\f[R]
2022-04-04 05:55:34 +02:00
go through directories recursively
.TP
2024-05-03 22:42:32 +02:00
\f[B]\[em]-silent\f[R]
2022-04-04 05:55:34 +02:00
silent, no command-line output
.TP
2024-05-03 22:42:32 +02:00
\f[B]\[em]-ignore-history\f[R], \f[B]-i\f[R]
2022-04-04 05:55:34 +02:00
ignore history
.TP
2024-05-03 22:42:32 +02:00
\f[B]\[em]-no-history\f[R], \f[B]-n\f[R]
2022-04-04 05:55:34 +02:00
do not write to history
.TP
2024-05-03 22:42:32 +02:00
\f[B]\[em]-overwrite\f[R], \f[B]-o\f[R]
2022-04-04 05:55:34 +02:00
overwrite if the file already has lyrics
.TP
2024-05-03 22:42:32 +02:00
\f[B]\[em]-test\f[R], \f[B]-t\f[R]
2022-04-04 05:55:34 +02:00
test, do not write lyrics to file, but print to stdout
.TP
2024-05-03 22:42:32 +02:00
\f[B]\[em]-rm-explicit\f[R]
2022-04-04 05:55:34 +02:00
remove the \[lq][Explicit]\[rq] lyrics warning from the song\[cq]s title
tag
.TP
2024-05-03 22:42:32 +02:00
\f[B]\[em]-site\f[R], \f[B]-s\f[R] site
2022-04-04 05:55:34 +02:00
onlysearch [site] for lyrics (genius or azlyrics)
.PP
2024-05-03 22:42:32 +02:00
One of \f[CR]----file\f[R] and \f[CR]--directory\f[R] must be given at
least once.
Example: \f[CR]nicole -ior -d \[ti]/music/artist ----rm-explicit\f[R]
2022-04-04 05:55:34 +02:00
.SH INSTALLATION AND UPDATING
To update nicole, simply follow the installation instructions.
.SS pacman (Arch Linux)
Installing nicole using the Arch Build System also installs the man-page
2022-04-04 06:14:47 +02:00
and a zsh completion script, if you have zsh installed.
2022-04-04 05:55:34 +02:00
.IP
2024-05-03 22:42:32 +02:00
.EX
2022-04-04 05:55:34 +02:00
git clone https://github.com/MatthiasQuintern/nicole.git
cd nicole
makepkg -si
2024-05-03 22:42:32 +02:00
.EE
2022-04-04 05:55:34 +02:00
.SS pip
2022-04-04 06:14:47 +02:00
You can also install nicole with python-pip:
2022-04-04 05:55:34 +02:00
.IP
2024-05-03 22:42:32 +02:00
.EX
2022-04-04 05:55:34 +02:00
git clone https://github.com/MatthiasQuintern/nicole.git
cd nicole
python3 -m pip install .
2024-05-03 22:42:32 +02:00
.EE
2022-04-04 05:55:34 +02:00
.PP
You can also install it system-wide using
2024-05-03 22:42:32 +02:00
\f[CR]sudo python3 -m pip install.\f[R]
2022-04-04 05:55:34 +02:00
.PP
If you also want to install the man-page and the zsh completion script:
.IP
2024-05-03 22:42:32 +02:00
.EX
2022-04-04 05:55:34 +02:00
sudo cp nicole.1.man /usr/share/man/man1/nicole.1
2022-04-04 06:14:47 +02:00
sudo gzip /usr/share/man/man1/nicole.1
2022-04-04 05:55:34 +02:00
sudo cp _nicole.compdef.zsh /usr/share/zsh/site-functions/_nicole
sudo chmod +x /usr/share/zsh/site-functions/_nicole
2024-05-03 22:42:32 +02:00
.EE
2022-04-04 05:55:34 +02:00
.SS Dependencies
.IP \[bu] 2
2022-04-04 06:14:47 +02:00
https://github.com/quodlibet/mutagen read and write mp3-tags
2022-04-04 05:55:34 +02:00
.IP \[bu] 2
2022-04-04 06:14:47 +02:00
https://www.crummy.com/software/BeautifulSoup deal with the html from
2022-04-04 05:55:34 +02:00
genius
.PP
The dependencies will be automatically installed when using the either
of the two installation options.
.SH CHANGELOG
2024-05-03 22:42:32 +02:00
.SS 2.1.0
.IP \[bu] 2
Refactoring:
.RS 2
.IP \[bu] 2
use argparse
.IP \[bu] 2
use pyproject.toml
.RE
.IP \[bu] 2
Ignore case when matching a genius result
2022-04-04 05:55:34 +02:00
.SS 2.0
.IP \[bu] 2
Nicole now supports lyrics from genius!
2024-05-03 22:42:32 +02:00
.IP \[bu] 2
Added man-page
.IP \[bu] 2
Added zsh-completion
2022-04-04 05:55:34 +02:00
.SS 1.1
.IP \[bu] 2
Lyrics are now properly encoded.
.IP \[bu] 2
If a title contains parenthesis or umlaute, multiple possible urls will
be checked.
.IP \[bu] 2
Files are now processed in order
.SH COPYRIGHT
2024-05-03 22:42:32 +02:00
Copyright © 2024 Matthias Quintern.
2022-04-04 05:55:34 +02:00
License GPLv3+: GNU GPL version 3 <https://gnu.org/licenses/gpl.html>.
.PD 0
.P
.PD
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH AUTHORS
Matthias Quintern.