Skip to content

Commit

Permalink
-g--grep参数支持对股票代码的过滤;
Browse files Browse the repository at this point in the history
  • Loading branch information
topdna committed Aug 22, 2015
1 parent 9fac833 commit 3692ddc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Support this project and [others by hustcer][gratipay] via [gratipay][].

变更详情 [**见此**](history.md),主要变更如下:

- 【v0.3.1】 修复深市股票董监高持股变动查询时的分页显示问题;
- 【v0.3.1】 `-g``--grep`参数支持对股票代码的过滤;
- 【v0.3.0】 通过`-i``--insider`参数查询董监高持股变化信息的时候也可以不指定股票代码,此时查询沪深两市最近的董监高交易记录,按交易时间倒序排列;
- 【v0.3.0】 未指定股票代码查询董监高持股变动信息时允许通过`--market`参数来指定板块儿:SZM-深圳主板, SZGEM-深圳创业板, SZSME-深圳中小板, SHM-上海主板. 大小写不敏感; 指定股票代码时会根据股票代码来判断属于哪个市场,所以`--market`参数无效。
- 【v0.3.0】 可以通过`-i --top-buy`参数查询最近买入总额排名前列的股票,`--span`参数代表查询时间区间:1m~12m,即最近一个月到最近12个月;数据源: [traceinvest.com](http://traceinvest.com)
Expand Down Expand Up @@ -78,7 +80,7 @@ Support this project and [others by hustcer][gratipay] via [gratipay][].
- 可以通过`-e``--exclude`参数排除所有证券代码以300,600,002或者000开头的股票,多个前缀之间以','或者','分隔;
- 可以通过`-c``--contain`参数只显示所有证券代码以300,600,002或者000开头的股票,多个前缀之间以','或者','分隔;
- 可以通过`-f``--file`参数指定股票文件路径,并自动保存该路径,下次执行命令的时候不必重复输入;
- 可以通过`-g``--grep`参数对股票列表里的股票名、备注字段进行搜索、过滤,多个关键词之间以','或者','分隔;
- 可以通过`-g``--grep`参数对股票列表里的股票名、股票代码、备注字段进行搜索、过滤,多个关键词之间以','或者','分隔;
- 可以通过`--remove`参数筛选证券名称和备注里面**不包含**指定关键词的股票,多个关键词之间用','或','分隔.
- 可以通过`-L``--lte`参数过滤出当前价到目标价的上涨空间百分比小于等于指定百分比的股票;
- 可以通过`-G``--gte`参数过滤出当前价到目标价的上涨空间百分比大于等于指定百分比的股票;
Expand Down
1 change: 1 addition & 0 deletions history.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

- Fix pagination bugs for insider trading query with specified security code.
- Update node module request to 2.61.0.
- Add grep from security code feature in stock trace.

### v0.3.0

Expand Down
2 changes: 1 addition & 1 deletion lib/trace.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ let getFilteredSymbols = function(){
let kws = cmd.grep.replace(//g, ',').split(',');
_.each(kws, kw => {
let reg = new RegExp(kw, 'i');
if(reg.test(s.comment) || reg.test(s.name)){
if(reg.test(s.comment) || reg.test(s.name) || reg.test(s.code)){
find = true;
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "star",
"author": "hustcer",
"public": true,
"version": "0.3.0",
"version": "0.3.1",
"license": "MIT",
"homepage": "http://traceinvest.com",
"description": "A STock Analysis and Research tool for terminal users.",
Expand Down

0 comments on commit 3692ddc

Please sign in to comment.