tripod31 / get_lyric

Command line tool to retrive lyric from sites.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

get_lyric

Command line tool to retrive lyric from sites.

windows binary

dist/*.exe
python and required libraries are included in them.
I used pyinstaller to make windows binaries from python sources.I tried some combinations of pyinstaller version and python version.

python pyinstaller executable is runnable
3.5.4/32bit 3.1.1 Yes
3.5.3/64bit 3.1.1 Yes
3.5.3/32bit 3.1.1 Yes
3.5.3/64bit 3.2.1 No

development environment

Windows10pro/64bit
python3.5.4/32bit

required libraries

robobrowser
beautifulsoup4
mutagen
Werkzeug==0.16.1(>1.0.0 cause error in robobrowesr)

get_lyric.py

When the lyric is found,the script put lyric to standard output.

usage

python get_lyric.py --artist "artist name" --song "song name"  
     [--proxy PROXY]] [--sites SITES] [--list] [--log_path LOG_PATH]
  • --proxy
    Format is [site name=proxy url:port],spllited by ','. When specified,the script use proxy to access to sites.
    Example
--proxy www.azlyrics.com=36.234.184.32:3128
  • --sites
    name of sites to search,splitted by ','.
    You can specify sites order with this argument.
    site names are displayed py 'get_lyric.py --list'.

  • --list
    List Available site names,and exit.

  • --log_path
    path to output log.defalut is current directory.If error occurs when the script tries to write log,you can change the directory to avoid the error.

log

The script put some debug information to "get_lyric.log",in current directory.You can change the path of log file by --log_path.

get_mp3_lyrics.py

For mp3 files in specified directory,it search lyric from the site,and put it to file or tag of mp3.

usage

python grt_mp3_lyrics.py --in_dir "mp3_files_dir"
    [--out_dir OUT_DIR] [--write2tag] [--overwrite]  
    [--proxy PROXY] [--sites SITES]
  • --in_dir
    directory where mp3 files are.default is current directory.

  • --output_dir
    The script puts lyric to file in "output_dir".
    The format of filename is "artist - song.txt".
    These file are useful for foo_uie_lyrics3(foobar2000 plugin to display lyric).They can be used by "local File Search" source.

  • --write2tag
    The script puts lyric to tag of mp3.
    If lyric contains text like [00:00.00] it is saved to synced lyrics tag,otherwise it is saved to unsynced lyrics tag.

  • --overwrite
    When specified,The script overwrites existing file or tag.

arguments below are same as get_lyric.py.

  • --proxy
  • --sites

log

The script put some debug information to "get_lyrics.log",in current directory.

get_lyric.cnf

If there is this file in current directory,the script reads arguments from it.
You can copy get_lyric.cnf.sample to get_lyric.cnf end edit it.

changelog

2021/02/28

added argument "--log_path". remove sites that are not usable.

About

Command line tool to retrive lyric from sites.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%