为Mac的自带的词典添加自定义词库
1.准备词库mdx、css文件
2.安装Dictionary Development Kit
https://github.com/SebastianSzturo/Dictionary-Development-Kit
安装后目录结构如下:
/Applications/Utilities/Dictionary\ Development\ Kit
├── README.md
├── bin
├── documents
├── project_templates
└── samples
3.下载pyglossary
https://github.com/ilius/pyglossary
4. 安装词典
cd $pyglossary-path
python3 $pyglossary-path/main.py --write-format=AppleDict dict.mdx $directory-name
cd $directory-name
复制词典原来附随的css样式,粘贴到$directory-name下的css文件中.
在.plist文件
第10行更改的CFBundleDisplayName值,这将会是是词库在词典显示的名字
make && make install
词典将会安装到~/Library/Dictionaries
目录
5.最后
重启词典应用,在词典的偏好设置里添加自定义词典
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律