Skip to content

BigDawnGhost/clidict

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clidict

终端词典,根据语言自动路由,本项目纯vibe coding,欢迎改进。

图片

识别方式基于字符:西里尔字母走千亿词霸,其余走剑桥。

图片

安装

克隆仓库后用 PyInstaller 打包:

git clone https://github.com/BigDawnGhost/clidict
cd clidict
uv sync
uv run pyinstaller clidict.spec
# 二进制输出在 dist/clidict

Windows 下需要单独安装 less

winget install jftuga.less

dist/ 目录加入 PATH:

Fish (~/.config/fish/config.fish):

export PATH="/path/to/clidict/dist:$PATH"

Bash (~/.bashrc):

export PATH="/path/to/clidict/dist:$PATH"

用法

clidict hello
clidict phrasal verb
clidict привет

剑桥词条展示 CEFR 等级、语法标注、英美发音、中文释义和例句。俄语词条包含重音标注、专业含义及词形变化表。

查询流程

3 个 HTTP 请求并行发出:剑桥(中英)、剑桥(纯英)、Bing。优先级:

  1. 剑桥中英版(最快路径)
  2. 剑桥纯英版
  3. Bing 词典(兜底)

当剑桥没有收录时(如 genshin),自动切换到 Bing。

补全

dist/ 加入 PATH 后:

Fish:

cp completions/clidict.fish ~/.config/fish/completions/
图片

Bash:

echo 'source /path/to/clidict/completions/clidict.bash' >> ~/.bashrc

候选词按长度升序排列。

开发

uv sync
uv run pytest

About

Terminal dictionary powered by Cambridge Dictionary with tab-completion

Resources

License

Stars

4 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors