Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
实现功能: 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,其它可缺省