Giter Club home page Giter Club logo

youdao-dict's Introduction

RUST Qt5 or higher RUST-QT

RELEASE LAST COMMIT ISSUES LICENSE

YDict

YDict 是一个使用 Rust + Qt 开发的仿有道词典的翻译 + 词典 工具.

此项目所用到的Api为 有道翻译Api.

New In 0.3.2

  • ✨ 划词翻译增加点击其他窗口时自动关闭翻译窗口​

Full Changelog

Available Here

Help

See the help

Installation Or Upgrade

archlinux(aur)

# 终端执行
yay -S ydict

# 升级注意
# 通过aur的方式安装其实也是下载release文件之后通过 install.sh 脚本进行安装,
# 所以在升级 YDict 时不能通过 pamac-manager(Discover之类的应用商店) 进行更新,
# 因为 install.sh 脚本会要求输入root账户密码,而此类软件不能输入密码,所以会安装失败

# 正确的升级方式, 请使用下面命令, 你也可以选择性进行升级
# 在终端中执行升级是可以输入root账户密码的
yay -Syu

其他方式(手动安装)

# 下载
# 请自行前往Release下载最新版本
wget https://github.com/DreamSaddle/youdao-dict/releases/download/0.3.2/YDict-0.3.2.tar.gz

# 解压
tar -zxvf YDict-0.3.2.tar.gz

# 安装/更新
cd YDict-0.3.2/scripts
sudo chmod +x install.sh
./install.sh

# 执行完成即安装完成
# 可在启动器 工具 类目中查看启动, 或直接终端运行
YDict

# 卸载
# 你可以单独获取项目 scripts目录中的 uninstall.sh执行卸载

Usage

输入框输入待翻译的词汇点击翻译按钮接口完成翻译.

ShotCut

Ctrl+U: 清空输入框内容

Ctrl+Return(Enter): 翻译

划词翻译

首先安装好YDict, 接着你需要在系统中为YDict的划词功能配置一个全局快捷键, 此快捷键的命令为 YDict clipboard

例如:

划词翻译全局快捷键配置

Development

Requirements

  • Rust
  • Qt5 or higher

建议开发使用Linux桌面环境开发. 此项目也只提供Linux版本Release.

首先请确保你已经安装好了Rust环境以及Qt5.

git clone https://github.com/DreamSaddle/youdao-dict.git
cd youdao-dict
cargo run

# 构建Release
cargo build --release

Screenshots

中译英

短语

段落翻译

划词翻译

段落划词翻译

为什么会有这个项目

我自从桌面切换为Linux环境后, 苦于英语差, 但是又没有找到好用的翻译软件. 便想着自己搞一个, 顺便还可以练习一下 Rust .

本项目主要用于学习和个人使用, 目前Rust资料比较少, Rust-Qt资料更是少, 希望此项目能对有兴趣的同学起到一定的帮助作用吧.

youdao-dict's People

Contributors

dreamsaddle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jason-hue

youdao-dict's Issues

功能建议

配置好快捷键以后,每次都要先按ctrl-c, 再去按一下自定义的翻译快捷键,稍微繁琐了一些,能否整合起来,一个快捷键自动复制翻译。

Ubuntu1804运行YDict错误

环境: Ubuntu1804

YDict: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by YDict)
YDict: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by YDict)

我这边libc相关如下

~/tools/ydict/YDict-0.3.2/scripts » ls -lh /lib/x86_64-linux-gnu/libc.so.6
lrwxrwxrwx 1 root root 12 12月  8 00:38 /lib/x86_64-linux-gnu/libc.so.6 -> libc-2.27.so
--------------------------------------------------------------------------------
~/tools/ydict/YDict-0.3.2/scripts » strings /lib/x86_64-linux-gnu/libc-2.27.so | grep GLIBC
GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
GLIBC_2.12
GLIBC_2.13
GLIBC_2.14
GLIBC_2.15
GLIBC_2.16
GLIBC_2.17
GLIBC_2.18
GLIBC_2.22
GLIBC_2.23
GLIBC_2.24
GLIBC_2.25
GLIBC_2.26
GLIBC_2.27
GLIBC_PRIVATE
GNU C Library (Ubuntu GLIBC 2.27-3ubuntu1.4) stable release version 2.27.

查询到是使用了以下api

~/tools/ydict/YDict-0.3.2/scripts » objdump -T YDict | grep "GLIBC_2.29"
objdump: 'YDict': No such file
--------------------------------------------------------------------------------
~/tools/ydict/YDict-0.3.2/scripts » which YDict
/usr/bin/YDict
--------------------------------------------------------------------------------
~/tools/ydict/YDict-0.3.2/scripts » objdump -T /usr/bin/YDict | grep "GLIBC_2.29"
0000000000000000      DF *UND*	0000000000000000  GLIBC_2.29  exp
0000000000000000      DF *UND*	0000000000000000  GLIBC_2.29  log
0000000000000000      DF *UND*	0000000000000000  GLIBC_2.29  pow
------------------------------------------------------------------

glibc升级有空再折腾

关于界面问题和整句翻译。

os:manjaro

关于界面:可能是我主题的问题。单词翻译后字体看不清。

01.jpg

无法整句翻译

多点击闪退

  • 英=>汉,输入单词点击翻译后。再切换 汉=>英 多点击几次翻译后会出现闪退现象。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.