Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

命令行参数读取的支持 #48

Merged
merged 2 commits into from
Oct 13, 2018
Merged

命令行参数读取的支持 #48

merged 2 commits into from
Oct 13, 2018

Conversation

LuuMing
Copy link
Collaborator

@LuuMing LuuMing commented Oct 13, 2018

实现功能: grank 后若指定参数,则从命令行读取,不经过文件。
示例:
grank --token=XXXX --start=2018-01-01 --stop=2018-05-21 --askrule=0 --rule=inc analy luuming HomeWork
修改部分:
core.py:
1.使用全局变量 config 2.main 中增加 click.option 选项,并做判断 3. analy 改用全局 config
helper.py:
1. 增加 get_config_instance(....) 函数,通过给定参数生成配置实例,支持缺省参数 2. 删减 get_config() 函数,使用 get_config_instance 生成实例
缺点:必须指定 token,其它可缺省

@LuuMing
Copy link
Collaborator Author

LuuMing commented Oct 13, 2018

#20

@bestony
Copy link
Member

bestony commented Oct 13, 2018

👍 晚上我补全一下测试。

@bestony bestony merged commit 533e472 into LCTT:master Oct 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants