8tracks.com的命令行客户端。
项目描述
Orochi是用Python编写的8tracks.com的命令行客户端。
八岐大蛇(八岐の大蛇)是日本传说中的八头八尾龙。这个名字翻译为“八枝巨蛇”。我选择这个名字是因为它既指代数字八(如8tracks),也指代蛇(如Python)。
图片由Gustavo Araujo提供
安装
使用pip
$ sudo pip install -U orochi
如果您是ArchLinux用户,您还可以从AUR安装orochi或orochi-git
$ 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/目录中创建配置文件config.json。以下配置可以更改
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)。然后按照以下方式启动orochi:
$ python -m orochi.client
为了开发和测试目的,您还可以传递 --pdb 参数。然后如果 orochi 崩溃,应该启动调试会话。
编码指南
测试
安装 requirements-dev.txt,然后在主目录中运行 py.test。上述编码指南的违规将被计为测试失败。
贡献
请参阅贡献指南。谢谢!
许可证
版权 (C) 2013–2016 Danilo Bargen 及贡献者
本程序是免费软件:您可以重新分发和/或修改它,前提是您遵守由自由软件基金会发布的 GNU 通用公共许可证的条款,许可证版本 3 或(根据您的选择)任何后续版本。
本程序的分发是出于它可能有用的希望,但没有任何保证;甚至没有关于其商业性或适用于特定目的的暗示性保证。有关详细信息,请参阅 GNU 通用公共许可证。
您应该已收到一份 GNU 通用公共许可证副本。如果没有,请参阅 <https://gnu.ac.cn/licenses/>。
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。
源代码分布
构建分布
orochi-0.2.1.tar.gz 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 8ed2b4d94dc2c65862efd06de65e7a3ec48ef1500492ce6f3e69cd56e10dc87c |
|
MD5 | 9d7b6662d294ace93fc32c25a8da2a5a |
|
BLAKE2b-256 | b716c0b9ba75b52921985888765a7d0fa669267fe55221786620c1ba93ac9c24 |
orochi-0.2.1-py2.py3-none-any.whl 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 362982651025ce5399aa7e62bff76598d3d964dd3c503bb00ce97ce9fb0310f2 |
|
MD5 | f9b608d9dac4cff604b321512b993476 |
|
BLAKE2b-256 | bc27d5a67dec803c795c0951255866571cc5ab077d426b16e941cbc6c460e7a9 |