• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

pwittchen/spotify-cli-linux:

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

pwittchen/spotify-cli-linux

开源软件地址(OpenSource Url):

https://github.com/pwittchen/spotify-cli-linux

开源编程语言(OpenSource Language):

Python 91.1%

开源软件介绍(OpenSource Introduction):

spotify-cli-linux

Build Status Version Python versions

A command line interface to Spotify on Linux.

This project is inspired by the similar project called shpotify, which does similar things, but on macOS.

installation

pip install spotify-cli-linux

hint #1: if you encounter problems during installation, try to call command with sudo

hint #2: if you still have problems (e.g. with resolving project dependencies), try to call pip3 instead of pip

if you have any problems with pip or pip3, you can try to install the script in the alternative way as a workaround:

git clone [email protected]:pwittchen/spotify-cli-linux.git
cd spotify-cli-linux
sudo cp spotifycli/spotifycli.py /usr/local/bin/spotifycli

upgrade

pip install spotify-cli-linux --upgrade

for the upgrade, you can apply the same hints like for installation

usage

start the official Spotify desktop app

run the following command from your terminal:

spotifycli

use one of the following parameters:

-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

if you don't use any parameters, you'll enter the shell mode, where you'll be able to use all commands mentioned above

solving problems

dbus

When you've seen the following error:

No module named dbus

Then try to install python-dbus! On Ubuntu you can do it as follows:

sudo apt-get install python-dbus

If you are using another distro, then try to install python-dbus with your package manager.

lyricwikia

When, you're missing lyricwikia dependency, run the following command:

pip install lyricwikia

usage with tmux

If you want to use this script in your tmux panel, you can check tmux-plugin-spotify.

development

to install necessary tools for code formatting, static code analysis and releasing, run:

make requirements

code formatting

Source code should be formatted according to PEP8 style guides.

To format code, run:

make format

to verify code formatting, type:

make checkformat

static code analysis

To run static code analysis, execute:

make lint

docs

to update docs on gh-pages, type:

make docs

to run docs locally, type:

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

and view page with docs at: 0.0.0.0:8000

view it on-line at https://pwittchen.github.io/spotify-cli-linux

releasing

configure your ~/.pypirc file as follows:

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

then, update version in spotifycli/version.py and spotifycli/spotifycli.py and type:

make release

note: Version is not kept in a single file due to problems with importing files within another file and distributing them to PyPi. There are also Python vesion issues. If you know how to fix this issue properly to keep version in one place, I'd be happy to review your PR :-).




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
yusefnapora/pixelbook-linux发布时间:2022-08-15
下一篇:
r4m0n/ZenStates-Linux: Dynamically edit AMD Ryzen processor P-States发布时间:2022-08-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap