在linux上spotify的命令行接口

spotify-cli-linux的Python项目详细描述


spotify cli linux

Build StatusVersionPython versions

Linux上Spotify的命令行接口。

这个项目的灵感来自一个类似的项目shpotify,它在macos上做类似的事情。它应该很简单,并遵循Unix philosophy

安装

pip install spotify-cli-linux

提示:如果在安装过程中遇到问题,请尝试使用sudo调用命令

升级

pip install spotify-cli-linux --upgrade

提示:如果在升级过程中遇到问题,请尝试使用sudo调用命令

用法

启动官方Spotify桌面应用程序

从终端运行以下命令:

spotifycli

使用下列参数之一:

-h, --help        show this help message and exit
--version         shows version number
--status          shows song name and artist
--statusshort     shows status in a short way
--song            shows the song name
--songshort       shows the song name in a short way
--artist          shows artists name
--artistshort     shows artist name in a short way
--album           shows album name
--arturl          shows album image url
--lyrics          shows lyrics for the song playing
--playbackstatus  shows playback status
--play            plays the song
--pause           pauses the song
--playpause       plays or pauses the song (toggles a state)
--next            plays the next song
--prev            plays the previous song
--client CLIENT   sets client's dbus name

如果不使用任何参数,您将进入shell模式,在此模式下,您将能够使用上述所有命令

解决问题

dbus

当您看到以下错误时:

No module named dbus

然后尝试安装python-dbus!在ubuntu上,您可以如下操作:

sudo apt-get install python-dbus

如果您正在使用另一个发行版,请尝试使用包管理器安装python-dbus

歌词

如果缺少lyricwikia依赖项,请运行以下命令:

pip install lyricwikia

与tmux一起使用

如果要在tmux面板中使用此脚本,可以选中tmux-plugin-spotify

开发

要安装必要的代码格式化、静态代码分析和释放工具,请运行:

make requirements

代码格式

源代码的格式应符合PEP8样式指南。

要格式化代码,请运行:

make format

要验证代码格式,请键入:

make checkformat

静态代码分析

要运行静态代码分析,请执行:

make lint

文档

要更新gh-pages上的文档,请键入:

make docs

要在本地运行文档,请键入:

git checkout gh-pages && ./serve.sh

在0.0.0.0:8000查看文档页面

在线查看https://pwittchen.github.io/spotify-cli-linux

释放

按如下方式配置~/.pypirc文件:

[distutils]
index-servers =
    pypi
[pypi]
username:yourusername
password:yourpassword

然后,更新spotifycli/version.pyspotifycli/spotifycli.py中的版本并键入:

make release

注意:由于在另一个文件中导入文件并将其分发给pypi时出现问题,版本不会保存在单个文件中。还有python-vesion问题。如果你知道如何正确地解决这个问题,以保持版本在一个地方,我很高兴审查你的公关:-)。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
AmazonS3查找从S3forJava下载的压缩文件的MIME类型   java如何使用Selenium在<span>中查找具有特定文本的元素   python如何使用OpenIEDemo生成自定义三元组。由stanfordnlp提供的java   java遇到“方法不适用”编译错误   java如何使用Mockito在Looper中运行的验证代码。getMainLooper?   类Java目录错误   java在已知其他泛型信息时使用原始类型   java connect()和disconnect()在哪里实现?   java使用PDF Box库拆分PDF,生成的PDF几乎与源PDF文件大小相同   java PowerMockito返回错误的对象   java如何找到TIBCO集合消息的字节编码?   java Basic音乐播放器下一步和上一步按钮   添加模块描述符时,java没有名为“entityManagerFactory”的bean可用   java为什么我的代码不是线程安全的?   eclipse java。引用项目中的类的lang.NoClassDefFoundError