8tracks.com的命令行客户端
orochi的Python项目详细描述
orochi是8tracks.com的命令行客户机 用Python编写
山田野町(Yamata no Orochi)是一位传奇的八头八尾日本人 龙这个名字被翻译成“8支巨蛇”。我选了名字 因为它同时指的是数字8(如在8个轨道中)和蛇(如在 Python)。
图片由gustavo araujo提供
安装
使用pip:
$ sudo pip install -U orochi
如果您是archlinux用户,也可以安装 orochi或 orochi-git来自AUR:
$ yaourt -S orochi
用法
先决条件:
- python 2.7+和3.3+
- MPlayer(至少r27665,在1.0rc3中发布)
开始时间:
$ orochi
可用命令(主菜单):
search: Syntax: search <searchterm> Search for a mix by keyword. You can then play a mix with the "play" command. Press enter to show next page results. search_tags: Syntax: search <tag1>, <tag2> Search for a mix by tag(s), separated by comma. You can then play a mix with the "play" command. Press Enter to show next page results. search_user: Syntax: search <username> Search for a mix by user. You can then play a mix with the "play" command. Press Enter to show next page results. search_user_liked: Syntax: search <username> Search for a mix liked by user. You can then play a mix with the "play" command. Press Enter to show next page results. set: Syntax: set <setting> <param> Configure settings. Available settings: - autologin yes|no Toggle autologin on start (no by default) WARNING: password will be saved in plain text. - sorting recent|popular|hot (hot by default) Configure search results sorting order. - results_per_page <n> Set number of results per page showed. - terminal_title yes|no (yes by default) Toggle setting terminal title to song status. - log_current_song yes|no (no by default) Toggle whether to log current song information to file `~/.cache/orochi/current_song.txt` To get help for each setting, press Enter with no <param>. play: Syntax: play <mix> Play the nth mix from the last search results. The <mix> argument can also be a mix ID or an URL. exit: Exit the interpreter. You can also use the Ctrl-D shortcut. login: Syntax: login <username> Log in to your 8tracks account. liked_mixes: List liked mixes (login required). Press Enter to show next page results.
可用命令(播放模式菜单):
pause / p: Pause or resume the playback. stop: Stop the playback and exit play mode. next_song / n: Skip to next song. next_mix: Skip to next mix. status / s: Show the status of the currently playing song. mix_info: Show information about the currently playing mix. volume / v: Syntax: volume <amount> Change playback volume. The argument must be a number between 0 and 100. like_mix / l: Like the currently playing mix (login required). unlike_mix / ul: Un-like the currently playing mix (login required). fav_track / f: Favorite the currently playing track (login required). unfav_track / uf: Un-favorite the currently playing track (login required).
配置
第一次启动orochi时,它在 ~/.config/orochi/目录。以下配置可以是 更改:
mplayer_extra_args: Extra arguments that are passed on to the mplayer instance.
配置示例:
{ "mplayer_extra_args": "-ao alsa:device=hw=1.0" }
开发
安装requirements.txt(使用pip install -r)。然后开始奥罗奇 以下方式:
$ python -m orochi.client
为了进行开发和测试,您还可以传入--pdb 争论。如果orochi崩溃,则应该启动调试会话。
测试
安装requirements-dev.txt,然后在主目录中运行py.test。 违反上述编码准则将被视为测试失败。
贡献
请参考Contributors Guidelines。谢谢!
许可证
版权所有(c)2013–2016 Danilo Bargen和贡献者
此程序是免费软件:您可以重新分发和/或修改 根据由 自由软件基金会,或者许可证的第3版,或者 (由您选择)任何更高版本。
这个程序的发布是希望它能有用, 但没有任何保证;甚至没有 适销性或适合某一特定目的的适销性。见 GNU通用公共许可证了解更多详细信息。
你应该收到GNU通用公共许可证的副本 还有这个节目。如果没有,请参见<;http://www.gnu.org/licenses/>;。