Skip to content

Commit

Permalink
改变.douban_token.txt路径为当前目录 v0.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
taizilongxu committed Oct 11, 2014
1 parent 6f916f6 commit 210a14d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ Python版本

![screenshot](https://raw.githubusercontent.com/taizilongxu/douban.fm/master/img/2.png)

###为什么Python版本
###Do something cool!

其实Node.js版本已经很好了,功能齐全,但是我发现在我的zsh + tmux环境下颜色竟然显示不出来,感觉很蛋疼.

###安装
###Setup

sudo pip install douban.fm

需要mplayer播放器依赖,如未安装:

sudo apt-get install mplayer

###使用
###Usage

在终端下直接输入douban.fm

###登陆
###Login

第一次登陆需要输入账号,密码,程序不会保留密码,而是保存返回的token存储在.douban_token.txt,下次登陆无需输入密码.

###按键
###Keys

支持vim按键

Expand All @@ -44,7 +44,7 @@ Python版本
* b 不再播放
* q 退出

###已完成功能
###Done

* 登陆token
* 显示PRO
Expand Down
2 changes: 1 addition & 1 deletion douban/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Cli(object):
def __init__(self, lines):
self.love = colored('♥ ', 'red')
self.lines = lines
self.markline = 2 # 箭头行 初始化设置默认频道
self.markline = 0 # 箭头行 初始化设置默认频道
self.topline = 0 # lines
self.displayline = self.markline # 初始化歌曲信息显示行
self.screenline = self.linesnum() - 4 # 屏幕显示行数
Expand Down
2 changes: 1 addition & 1 deletion douban/douban_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def login(self):
"登陆douban.fm获取token"
if os.path.exists('.douban_token.txt'):
# 已登陆
with open('.douban_token.txt', 'r') as f:
with open(os.path.expanduser('~') + '/.douban_token.txt', 'r') as f:
self.login_data = pickle.load(f)
self.token = self.login_data['token']
self.user_name = self.login_data['user_name']
Expand Down
7 changes: 2 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
打包的用的setup必须引入,
"""

VERSION = '0.2.1'
with open('README.md') as f:
long_description = f.read()
VERSION = '0.2.5'

setup(name='douban.fm',
version=VERSION,
description="a tiny and smart cli player of douban.fm based on Python",
long_description=long_description,
long_description='just do something cool!',
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='python douban douban.fm terminal',
author='taizilongxu',
Expand All @@ -24,7 +22,6 @@
zip_safe=True,
install_requires=[
'termcolor',
'requests',
],
entry_points={
'console_scripts':[
Expand Down

0 comments on commit 210a14d

Please sign in to comment.