噗,这是真的。截至发帖时间为止,PyPI 搜索 v2ex 的关键字貌似只能找到这个 =。= 虽然这个主题貌似快要是月经的节奏了。
这个小玩意的工具的主要用途就是
complete mission, get money, from v2ex
主要的功能:
the first time you do it:
$ v2ex
2014-07-31 19:12:03,417 [INFO] 20140731 的每日登录奖励 26 铜币
Total:5439.0
if you have done it:
$ v2ex
You have completed the mission today.
read log file to know recent days(I set "count": 5
in the config file):
$ v2ex read
2014-07-27 19:12:03,902 [INFO] 20140727 的每日登录奖励 15 铜币 Total:5346.0
2014-07-28 19:12:03,751 [INFO] 20140728 的每日登录奖励 28 铜币 Total:5374.0
2014-07-29 19:12:03,750 [INFO] 20140729 的每日登录奖励 27 铜币 Total:5401.0
2014-07-30 19:12:03,471 [INFO] 20140730 的每日登录奖励 12 铜币 Total:5413.0
2014-07-31 19:12:03,417 [INFO] 20140731 的每日登录奖励 26 铜币 Total:5439.0
also you can use the parameter:
$ v2ex read -c 1
2014-07-31 19:12:03,417 [INFO] 20140731 的每日登录奖励 26 铜币 Total:5439.0
get to know how long you've kept signing in:
$ v2ex last
已连续登录 54 天
没啥新的,就是扔到了 PyPI 上大家下载安装方便点 ;)
我差不多应该用了半年吧,已经签了 1w 多啦,哒哒 _(:3)z
Github: https://github.com/lord63/a_bunch_of_code/tree/master/v2ex
1
pfitseng 2015-03-25 10:42:37 +08:00
Traceback (most recent call last):
File "/usr/local/bin/v2ex", line 9, in <module> load_entry_point('v2ex-daily-mission==0.2.4', 'console_scripts', 'v2ex')() File "/usr/local/lib/python2.7/dist-packages/v2ex_daily_mission/v2ex.py", line 101, in main config = json.load(f) File "/usr/lib/python2.7/json/__init__.py", line 278, in load **kw) File "/usr/lib/python2.7/json/__init__.py", line 326, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/json/decoder.py", line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/json/decoder.py", line 381, in raw_decode obj, end = self.scan_once(s, idx) ValueError: Expecting : delimiter: line 2 column 16 (char 17) |
3
xvid73 OP @pfitseng 之前 github 的 readme 中有笔误,是我的失误,请把 json 文件中的 `=` 改成 `:`,再次尝试一次。 Orz
|
4
pfitseng 2015-03-25 11:08:46 +08:00
@xvid73 还是有问题
Traceback (most recent call last): File "/usr/local/bin/v2ex", line 9, in <module> load_entry_point('v2ex-daily-mission==0.2.4', 'console_scripts', 'v2ex')() File "/usr/local/lib/python2.7/dist-packages/v2ex_daily_mission/v2ex.py", line 101, in main config = json.load(f) File "/usr/lib/python2.7/json/__init__.py", line 278, in load **kw) File "/usr/lib/python2.7/json/__init__.py", line 326, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/json/decoder.py", line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/json/decoder.py", line 383, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded |
5
xvid73 OP @pfitseng http://jsonlint.com/ 测试一下你的 json 文件
|
8
xvid73 OP @linchanx http://jsonlint.com/ 检查 json 文件有效性。
Orz, 我之前还测试了一下,我这里可以正常使用,应该是 json 文件问题。然后由于我的问题, readme 中可能是误导了大家。 QAO |
10
xvid73 OP $ cat /usr/local/bin/v2ex_config.json
{ "username": "xvid73", "password": "your_password", "log_directory": "/home/lord63/code/a_bunch_of_code/v2ex/", "count": 5 } @linchanx |
12
xvid73 OP |
13
xvid73 OP |
14
pfitseng 2015-03-25 11:26:20 +08:00
{
"username":'pfitseng', "password":'111111', "log_directory":'/tmp/', "count": 5 } |
18
phx13ye 2015-03-25 14:31:10 +08:00
配置文件能用homedir吗
os.path.expanduser("~") |
19
xvid73 OP @phx13ye
不行哦,暂时默认是 /usr/local/bin/ 下的。 具体代码在: https://github.com/lord63/a_bunch_of_code/blob/master/v2ex/v2ex_daily_mission/v2ex.py#L100 |