一个提供 OpenCC API 及网页服务的镜像。
# pull
docker pull giterhub/opencc:latest
# run
docker run -d \
--name opencc
--restart unless-stopped \
-p 8900:8900 \
giterhub/opencc:latest
| 地址 | 请求方法 | Body 类型 | Body 参数 | 响应 |
|---|---|---|---|---|
/api | POST | text/plain 或 application/json | { "type": "<类型>", "content": "<内容>" } | { "code": 0, "result": "<结果>" } |
| 类型 | 描述 |
|---|---|
s2t | 简体 → 繁体(OpenCC 标准) |
t2s | 繁体(OpenCC 标准) → 简体 |
s2hk | 简体 → 香港繁体 |
hk2s | 香港繁体 → 简体 |
s2tw | 简体 → 台湾正体 |
tw2s | 台湾正体 → 简体 |
s2hkp | 简体 → 香港繁体(香港常用词汇模式) |
hk2sp | 香港繁体 → 简体(中国大陆常用词汇模式) |
s2twp | 简体 → 台湾正体(台湾常用词汇模式) |
tw2sp | 台湾正体 → 简体(中国大陆常用词汇模式) |
t2hk | 繁体(OpenCC 标准) → 香港繁体 |
hk2t | 香港繁体 → 繁体(OpenCC 标准) |
t2tw | 繁体(OpenCC 标准) → 台湾正体 |
tw2t | 台湾正体 → 繁体(OpenCC 标准) |
t2jp | 日文旧字体 → 日文新字体 |
jp2t | 日文新字体 → 日文旧字体 |
curl -d '{"type":"s2twp","content":"软件"}' http://localhost:8900/api
地址:http://localhost:8900。

Content type
Image
Digest
sha256:688c3365d…
Size
48.7 MB
Last updated
about 1 month ago
docker pull giterhub/opencc