英汉命令行翻译工具
Project description
cli-trans
命令行单词翻译工具。
功能:
- 单个或多个单词同时翻译;
- 缓存功能,首次查询是在线查询,后续单词查询本地查询,且有标识区分;
- 不同的词性使用不同的颜色区分;
- 能将所有历史查询的单词展示。
安装
pip install cli-trans
使用
# 翻译单词
cli-trans hello
cli-trans hello world python
# 查看历史记录
cli-trans -l
cli-trans -l -n 20
# 强制从 API 重新获取(忽略缓存)
cli-trans hello --force
cli-trans -f hello
# 清除历史记录
cli-trans -c
# 查看版本
cli-trans -v
功能
- 快速查词(中译英/英译中)
- 本地缓存历史记录(SQLite)
- 批量翻译多个单词
- 强制刷新缓存
开发
# 克隆项目
git clone https://github.com/bigfoolliu/cli-trans.git
cd cli-trans
# 安装开发依赖
pip install -e .
# 本地测试
cli-trans hello
python -m cli_trans hello
发布
# 发布到 PyPI
# 安装发布工具
pip install build twine
# 构建
python -m build
# 上传(需要 PyPI 账号)
python -m twine upload dist/*
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cli_trans-0.1.0.tar.gz
(7.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cli_trans-0.1.0.tar.gz.
File metadata
- Download URL: cli_trans-0.1.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a039881c3fae079df35c427afc9961a97d9bb97398bb55bf75e04bb7534944bf
|
|
| MD5 |
47290b81342519734aa565703690965a
|
|
| BLAKE2b-256 |
056a8d8e8f071e565f31bec9716d9cd6c897a934df568bfb40bc3dca572cde98
|
File details
Details for the file cli_trans-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cli_trans-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8763f59b3d7986246f7fa0945845924b93643eae006e1313fe4a7ec7b6671a3d
|
|
| MD5 |
cc4582da8f377883a1bdec0c02625429
|
|
| BLAKE2b-256 |
ec45e9285566f816af6f5c6ab60d4e14ca50709be1791d96776e0d4328143cf8
|