这个版本的命令行界面是参考了 Node.js版本的douban.fm制作的,向原作者致敬.终端界面设计的非常好看.
感谢Cloverstd的修改,已经支持Mac OS X(>=V0.2.9)
Linux/Mac OS X
其实Node.js版本已经很好了,功能齐全,但是我发现在我的zsh + tmux环境下颜色竟然显示不出来,感觉很蛋疼.
$ sudo pip install douban.fm
需要mplayer播放器依赖,如未安装:
Ubuntu:
$ sudo apt-get install mplayer
OS X:
$ brew install mplayer
在终端下直接输入
$ douban.fm
第一次登陆需要输入账号,密码,程序不会保留密码,而是保存返回的token存储在~/.douban_token.txt,下次登陆无需输入密码.
支持vim按键
移动
[j] --> 下
[k] --> 上
[g] --> 移到最顶
[G] --> 移到最底
音乐
[space] --> 播放
[w] --> 打开歌曲主页
[n] --> 下一首
[r] --> 喜欢/取消喜欢
[b] --> 不再播放
[q] --> 退出
[p] --> 暂停
[l] --> 单曲循环
音量(>=V0.2.9)
[=] --> 增
[-] --> 减
[m] --> 静音
歌词(>=v0.2.9)
[o] --> 显示歌词(Bug很多,先别用,没有反应就是没找到歌词)
[q] --> 退出歌词
.doubanfm_config保存在了~/.doubanfm_config,根据需要可以修改按键的映射
[key]
UP = k # 上
DOWN = j # 下
TOP = g # 顶
BOTTOM = G # 底
OPENURL = w # 打开歌曲主页
RATE = r # 标记喜欢/取消喜欢
NEXT = n # 下一首
BYE = b # 不再播放
QUIT = q # 退出
PAUSE = p # 暂停
LOOP = l # 单曲循环
MUTE = m # 静音
V0.2.10 滚动歌词,单曲循环,暂停,静音
V0.2.9 支持歌词,支持Mac OS X
V0.2.8 增加config
Copyright (c) 2014 hackerxu
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.