Skip to content

Commit

Permalink
1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
凌建发 committed Dec 26, 2020
1 parent c9d2f3f commit c49dbfb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: npmjs_publish
name: npm-publish

on:
release:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# 安装

npm install h2dict -g # from npmjs.org
npm install h2dict --registry https://registry.npm.taobao.org/ -g

npm link # from source code

Expand Down
8 changes: 6 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,12 @@ function show_words(words, a1, a2) {

var args = process.argv;

if (args[2] == '-v') {
console.log("h2dict 1.1.0 https://github.com/lingjf/h2dict.git");
if (!args[2]) {

} else if (args[2] == '-v') {
console.log("h2dict 1.2.0 https://github.com/lingjf/h2dict.git");
} else if (args[2] == '-h') {
console.log("");
console.log("h2dict/dict/f staff #查询单词staff");
console.log("h2dict/dict/f 'st?ff' #使用通配符搜索单词");
console.log("h2dict/dict/f 'st?ff' 1w # 使用通配符搜索1万常用单词,默认最多显示20个");
Expand All @@ -145,6 +148,7 @@ if (args[2] == '-v') {
console.log("ff stff # 使用编辑距离算法模糊搜索,默认最多显示20个最匹配的单词");
console.log("ff stff 1w 3 # 使用编辑距离算法,在前1万常用单词中模糊搜索,并显示前3个最匹配的单词");
console.log("fff stff 1w 3 # 使用类SublimeText矢量算法,在前1万常用单词中模糊搜索,并显示前3个最匹配的单词");
console.log("");
} else if (args[1].endsWith("/ff")) {
show_words(getSimilars(args[2]), args[3], args[4]);
} else if (args[1].endsWith("/fff")) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "h2dict",
"version": "1.1.0",
"version": "1.2.0",
"repository": "http://registry.npmjs.org/h2dict",
"main": "index.js",
"bin": {
Expand Down

0 comments on commit c49dbfb

Please sign in to comment.