命令行实用程序和lib与音乐网站magnatune交互
magnatune的Python项目详细描述
简介
python-magnatune提供了一个名为magnatune的简单命令行实用程序,可用于搜索magnatune数据库并获取流式url。
例如,要从curl获取所有相册
magnatune --artist Curl
从curl获取所有歌曲的流式url
magnatune --artist Curl --stream
结果可以是使用mpc的用户,例如将所有这些歌曲添加到mpd中
magnatune --artist Curl --stream | mpc add
如果您有订阅登录名,并且希望在没有广告的情况下收听音乐,则可以使用它
magnatune --artist Curl --login login:passwd --stream
你也可以下载相册。这将下载curl的所有相册,并将它们提取到当前目录
magnatune --artist Curl --login login:passwd --download --dlformat ogg --extract
当然,有一个简短的版本。在配置文件中设置了login和dlformat,我就这样做了
magnatune -a Curl -de
安装
python-magnatune需要python 3。我强烈建议您使用virtualenv。安装virtualenv后,您可以通过执行以下操作来安装python magnatune
pip install magnatune
要使用开发版本,请克隆位于https://github.com/madjar/python-magnatune的存储库并执行
pip install -e .
配置文件
python-magnatune在配置文件~/.python-magnatune/config.ini中查找所有参数的默认值。有关详细信息,请参见config.ini.example。
学分
Author: | Georges Dubus (madjar) |
---|