| Crates.io | popup-translation |
| lib.rs | popup-translation |
| version | 0.2.2 |
| created_at | 2023-02-14 13:17:33.849535+00 |
| updated_at | 2023-02-14 13:17:33.849535+00 |
| description | 🧼 A popup translation tool. |
| homepage | |
| repository | https://github.com/fzdwx/popup-translation |
| max_upload_size | |
| id | 784868 |
| size | 4,775,509 |
通过 wry 打开一个 webview 窗口,然后打开某个翻译平台的网页翻译内容,并通过 js 代码屏蔽掉不需要的内容,专注于翻译内容本身。

ctrl+c 后,在读取剪贴板的内容cargo install --git https://github.com/fzdwx/popup-translation
# 命令行直接设置翻译文本,只运行一次
fanyi hello
fanyi -p youdao 你好
# 守护模式,可以一直翻译,`ctrl+shift+c` 打开窗口
fanyi
# 覆盖快捷键,使用 `alt+s` 打开窗口
fanyi --show=alt+s
# 设置窗口显示位置,默认为鼠标附近
fanyi --position=100,100
fanyi --help
map("n", "<leader>fy", function()
local word = vim.fn.expand("<cWORD>")
local cmd = { "fanyi", word }
vim.fn.jobstart(cmd, { detach = true })
end, { desc = "qwe" })

top_left, top_center, top_right, center ...MIT