{"id":21428448,"url":"https://github.com/kaze-k/funye","last_synced_at":"2025-07-18T13:35:52.881Z","repository":{"id":62406270,"uuid":"555459739","full_name":"kaze-k/FunYe","owner":"kaze-k","description":"基于Textual的TUI翻译程序","archived":false,"fork":false,"pushed_at":"2023-09-10T16:45:22.000Z","size":46734,"stargazers_count":14,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-14T11:50:51.397Z","etag":null,"topics":["python3","rich","terminal","textual","tui"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaze-k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-10-21T16:12:40.000Z","updated_at":"2024-07-15T02:13:21.000Z","dependencies_parsed_at":"2025-07-14T10:32:06.254Z","dependency_job_id":"79f7a99d-3b76-4800-993f-e9e34ac08e05","html_url":"https://github.com/kaze-k/FunYe","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kaze-k/FunYe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaze-k%2FFunYe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaze-k%2FFunYe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaze-k%2FFunYe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaze-k%2FFunYe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaze-k","download_url":"https://codeload.github.com/kaze-k/FunYe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaze-k%2FFunYe/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265769241,"owners_count":23825244,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python3","rich","terminal","textual","tui"],"created_at":"2024-11-22T22:13:20.365Z","updated_at":"2025-07-18T13:35:52.790Z","avatar_url":"https://github.com/kaze-k.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FunYe\n\n\u003e :bangbang: 网易翻译的接口挂了 T_T\n\u003e\n\u003e 所以用不了\n\n![screenshot](./img/show.gif)\n\n**FunYe**是一个基于[Textual](https://github.com/Textualize/textual)框架的TUI翻译程序（终端程序）\n\n\n## 使用\n\nWindows\n\n[这里](https://github.com/kaze-k/FunYe/releases/tag/v1.0.0)有Windows上的可执行文件，下载到本地，到Powershell中切换到文件所在目录下，输入以下命令即可使用。（实测在windows自带的终端模拟器无法完整渲染，最好使用Windows Terminal或者好点的终端模拟器）\n\n```Powershell\n.\\FunYe.exe\n```\n\nLinux\n\n[这里](https://github.com/kaze-k/FunYe/releases/tag/v1.0.0)有Linux上的可执行文件，下载到本地，到终端中切换到文件所在目录下，输入以下命令即可使用。\n\n```bash\nchmod +x ./FunYe \u0026\u0026 ./FunYe\n```\n\n\u003e 因为程序有使用系统剪切板的功能，Windows上可能会报毒，杀毒软件中允许即可\n\u003e\n\u003e 如果下载的可执行文件无法运行，需要自行重新编译\n\n快捷键\n\n- `Enter` 提交翻译内容\n- `up` 上一个输入记录\n- `down` 下一个输入记录\n- `ESC` 退出程序\n- `ctrl+l` 清空输入框中的内容\n- `ctrl+y` 拷贝当前的翻译结果\n\n\n## 编译\n\nWindows\n\n```powershell\n.\\bin\\install.bat # 安装依赖\n.\\bin\\make.bat # 执行编译\n```\n\nLinux\n\n```bash\nsh ./bin/install.sh # 安装依赖\nsh ./bin/make.sh # 执行编译\n```\n\n\u003e 有`make`也可以直接`make`\n\u003e\n\u003e 需要在项目根目录下运行脚本编译\n\n\n## 开发工具\n\n`tools`目录下有一些开发脚本\n\n``` sh\npython ./tools/devtools.py -h # 查看如何使用\n```\n\n`bin`目录下有一些命令脚本\n\n- `install.sh` 和 `install.bat` 安装项目依赖，编译前一定要先执行\n- `make.sh` 和 `make.bat` 执行编译\n- `remove.sh` 和 `remove.bat` 移除项目所有依赖、删除虚拟环境、清理pyc缓存文件\n- `run.sh` 和 `run.bat` 启动一下FunYe\n\n\u003e `tools` 和 `bin` 目录下的脚本都要在项目的根目录下运行\n\n\n## 配置颜色样式\n\n`config/style.py`中可以进行颜色的调整，修改后重新编译一下即可。\n\n\n## 问题\n\n\u003e 这个程序有些问题\n1. 在网络比较慢的时候，会卡住，因为在等待网络请求，界面无法重新更新渲染\n2. 输入中文不太友好，输入法的光标会不在预料之中，虽然Textual新版本出了input组件，但是仍没有很好的支持\n3. 终端模拟器的兼容不是很好，像windows自带的终端就不能很好的渲染\n\n\n## 支持\n- [Textual(v0.1.18)](https://github.com/Textualize/textual/tree/v0.1.18)：一个python的TUI框架(现在框架已更新到[新的版本](https://github.com/Textualize/textual))\n\n- [Rich](https://github.com/Textualize/rich)：一个 Python 库，可以为您在终端中提供富文本和精美格式\n\n- [textual-inputs](https://github.com/sirfuzzalot/textual-inputs)：一个基于Textual的输入小组件\n\n- [pyperclip](https://github.com/asweigart/pyperclip)：一个用于复制和粘贴剪贴板函数的跨平台 Python 模块，它可以与 Python2和3一起工作。\n\n- [网易有道翻译](https://fanyi.youdao.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaze-k%2Ffunye","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaze-k%2Ffunye","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaze-k%2Ffunye/lists"}