sdcv命令行词典:轻量级的StarDict客户端

sdcv命令行词典:轻量级的StarDict客户端

sdcv项目地址:https://gitcode.com/gh_mirrors/sd/sdcv

项目介绍

sdcv(StarDict在控制台版本)是由Evgeniy A. Dushistov和Hu Zheng开发的一个简单跨平台的文本基础工具,专为处理StarDict格式的词典而设计。它允许用户在终端环境中便捷地查询单词,适用于Linux、Windows等多种操作系统,并且遵循GNU General Public License version 2.0许可协议。该项目托管在GitHub,便于开发者贡献和用户下载使用。

项目快速启动

要迅速开始使用sdcv,你需要先安装Git以及必要的编译环境。以下是基于Linux的快速安装指南:

# 克隆项目到本地
git clone https://github.com/Dushistov/sdcv.git
cd sdcv

# 创建构建目录并进入
mkdir build && cd build

# 使用CMake配置项目
cmake ..

# 编译项目
make

# 若想支持多语言,还需执行
make lang

# 安装到系统(可能需要管理员权限)
sudo make install

安装完成后,你可以在终端中输入sdcv来启动程序,并使用它查询词典。

应用案例和最佳实践

查询单词

在终端输入sdcv 单词即可查询对应单词,例如查询“example”:

sdcv example

配置多词典源

sdcv支持多个词典文件,用户可以通过修改配置或在命令行指定路径来增加词典的来源,确保更全面的查询结果。

自动完成与别名设置

为了提高效率,你可以为sdcv设置一个快捷别名,并利用shell的自动补全功能。在bash环境下,可以通过以下方式添加别名及补全支持:

echo 'alias sdc="sdcv"' >> ~/.bashrc
source ~/.bashrc
complete -W "$(awk '{print $1}' $(sdcv --list-dicts) | paste -sd " " -)" sdc

这样设置后,使用sdc代替sdcv时,还能享受到自动补全的便利。

典型生态项目

虽然sdcv本身专注于作为一款简单的控制台词典工具,但它的生态紧密关联着StarDict格式的词典资源。StarDict社区提供了大量的词典文件,涵盖多种语言,是sdcv强大功能背后的生态支撑。用户可以从各种在线资源下载StarDict兼容的词典文件,并将其与sdcv集成使用,以满足个性化学习和查询需求。

通过上述步骤和实践,你能够快速上手sdcv,享受高效、简洁的终端词典查询体验。记得探索其文档和相关论坛,以发现更多高级用法和技术细节,进一步优化你的使用流程。

sdcv项目地址:https://gitcode.com/gh_mirrors/sd/sdcv

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

安装说明:http://blog.youkuaiyun.com/love254443233/article/details/39056173 安装说明: 1:sudo apt-get install stardict 2:全部解压到temp文件夹中 3:sudo mv temp/* /usr/share/stardict/dic 3:重启星际译王 包含的词库zh_CN 简体中文词典.html中所有汉语+英汉词库 cdict-gb dictionary(en - zh_CN) tarbal GPL, 4.5M, 57510 words stardict1.3 dictionary(en - zh_CN) tarbal GPL, 1.1M, 51214 words Sun Dict(en - zh_CN) tarbal GPL, 1M, 33042 words xdict-ec-gb dictionary(en - zh_CN) tarbal GPL, 3.6M, 177817 words xdict-ce-gb dictionary(zh_CN - en) tarbal GPL, 2.4M, 160995 words. cedict-gb dictionary(zh_CN - en) tarbal CEDICT LICENCE, 0.7M, 31200 words. 推荐! langdao-ec-gb dictionary(en - zh_CN) 朗道英汉字典 tarbal GPL, 9.1M, 435468 words. 推荐! langdao-ce-gb dictionary(zh_CN - en) 朗道汉英字典 tarbal GPL, 7.8M, 405719 words. 推荐! lazyworm-ec dictionary(en - zh_CN) 懒虫简明英汉词典 tarbal GPL, 10M, 452185 words. lazyworm-ce dictionary(zh_CN - en) 懒虫简明汉英词典 tarbal GPL, 1.7M, 119592 words. 新华字典 tarbal GPL, 8.9M, 74025 words. ProECCE dictionary 英汉汉英专业词典 tarbal GPL, 8.6M, 571998 words. Hanzi Master (zh_CN - en) tarbal GPL, 427K, 25992 words XiangYa Medical dictionary 湘雅医学专业词典 tarbal GPL, 28M, 1479322 words Advance Chinese big dictionary (zh_CN - zh_CN) 高级汉语大词典 tarbal GPL, 6.3M, 51675 words Advance Chinese big dictionary (zh_CN - zh_CN) 高级汉语大词典(修正版) tarbal GPL, 6.3M, 51675 words International standard Chinese big dictionary (zh_CN - zh_CN) 国际标准汉字大辞典 tarbal GPL, 1.5M, 45053 words Chinese idiom dictionary (zh_CN - zh_CN) 汉语成语词典 tarbal GPL, 2M, 24702 words Chinese idiom dictionary (zh_CN - zh_CN) 汉语成语词典(修正版) tarbal GPL, 1.9M, 13001 words 汉语成语词典(美化版) tarbal GPL, 2.8M, 13305 words Modern Chinese dictionary (zh_CN - zh_CN) 现代汉语词典 tarbal GPL, 3.3M, 57643 words Modern Chinese dictionary (zh_CN - zh_CN) 现代汉语词典(修正版) tarbal GPL, 3.2M, 57691 words 21 century bidirectional dictionary 21世纪英汉汉英双向词典 tarbal GPL, 13M, 213723 words quick_eng-zh_CN 英汉专业词典 tarball GPL, 10.7M, 634008 words 21 century bidirectional science and technology dictionary 21世纪双语科技词典 tarball GPL, 15M, 809486 words nc
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

戚巧琚Ellen

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值