Comments (6)
I don't use zsh myself, but I'm open to a PR for this :)
from ydcv.
好吧,我尽量试试。抱歉刚才在抢红包回复晚了。
from ydcv.
不小心用了中文回复了。⊙﹏⊙b 那就一直用中文吧:
- 列出所有参数项
-h, --help show this help message and exit
-f, --full print full web reference, only the first 3 results
will be printed without this flag.
-s, --simple only show explainations. argument "-f" will not take
effect
-x, --selection show explaination of current selection.
--color {always,auto,never}
colorize the output. Default to 'auto' or can be
'never' or 'always'.
- 列出
--color
的所有可选参数 -
列出(放弃)-x
的当前选择文字 - 根据输入列出搜索建议(依赖 #23 )
个人列出这些用户需求,请审阅。
from ydcv.
看起来不错. 不过 "列出 -x
的当前选择文字" 会不会让人误以为需要把当前选择文字作为参数? (抱歉我不太了解 zsh...)
from ydcv.
“列出搜索建议”这一项需要 ydcv
提供一个参数,当增加了这个参数后, ydcv
把搜索建议以以下方式输出。(假设该参数名为 --list-suggestions
,以 aard
为例)
$ ydcv --list-suggestions aard
aard
aardman
aardman animations
aardvark
aardwolf
但是我不清楚怎么样调用有道翻译的搜索建议 API …… 😕 😖
以下数据提取自 http://dsuggest.ydstatic.com/suggest/suggest.s?query=aard&o=aa&keyfrom=dict.suggest
<div style="display:none" id="aard"></div>
<div>
<table cellpadding="0" cellspacing="1" border="0" width="100%" bgcolor="#979797" align="center">
<tbody>
<tr>
<td valign="top">
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tbody>
<tr onselect="this.txtBox.value=aard">
<td align="left" bgcolor="white" class="remindtt75">aard</td>
</tr>
<tr onselect="this.txtBox.value=aardvark">
<td align="left" bgcolor="white" class="remindtt75" colspan="2">aardvark</td>
</tr>
<tr onselect="this.txtBox.value=aardwolf">
<td align="left" bgcolor="white" class="remindtt75" colspan="2">aardwolf</td>
</tr>
<tr onselect="this.txtBox.value=aardman">
<td align="left" bgcolor="white" class="remindtt75" colspan="2">aardman</td>
</tr>
<tr onselect="this.txtBox.value=aardman animations">
<td align="left" bgcolor="white" class="remindtt75" colspan="2">aardman animations</td>
</tr>
</tbody>
</table>
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tbody>
<tr>
<td height="1px" bgcolor="#DDDDDD"></td>
</tr>
<tr>
<td align="right" height="17px" bgcolor="#ECF0EF" class="jstxhuitiaoyou"><a class="jstxlan" onclick="turnOffSuggest();">关闭提示功能</a></td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>
</div>
from ydcv.
更新一下
“根据输入列出搜索建议”这项用户需求依赖 #23 ,我想以我的能力目前还做不出来。并且考虑到如果需要不断发送网络请求的话可能会有性能问题。所以暂时搁置这项用户需求了。
这样就只剩下前面两项用户需求了,基本在 #22 中实现了。我个人测试使用了近一个月(通过安装 ydcv-git-0.3.6.20150307.cd10332-1-any.pkg.tar ),没有发现有什么问题。 @felixonmars 大神如果有什么问题的话可以提出。
期待能够合并到主仓库中。
from ydcv.
Related Issues (20)
- 有道词典改接口了么?现在是Network is unavailable 状态 HOT 1
- error when network is unavailable
- 添加completion后,zsh按tab键没有反应 HOT 2
- ydcv 0.6 fails to run on macOS Python 2.7.10 HOT 4
- 部分词语查寻异常 HOT 3
- 我想添加自己的api,请问如何找到源代码文件的位置 HOT 6
- 小工具好像不能用了,目前搜索什么都返回 No result for this query, 难道appkey失效了? HOT 1
- 配置文件位置遵循XDG规范 HOT 4
- 报告一个bug KeyError HOT 3
- 有没有考虑添加朗读功能
- 2019.06.30 似乎Key出错了? HOT 3
- [bug] KeyError HOT 2
- [feature] support more clipboard tools? HOT 2
- [feature] Can user customize the prompt string `>`? HOT 1
- [feature] Can translate the input word and the selected word in the same time? HOT 3
- [feature] Support join multi-lines HOT 1
- [feature] support strip HOT 1
- [advice] Why not use some library colorama to output color?
- [feature] generate shell completion script from arg_parse HOT 1
- Use python-keyring to store ydcv appid/appsec HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ydcv.