A word-selector translation software by PySide6
- Install mingw-w64 MinGW-W64 GCC-8.1.0
- Add bin directory to environment variable (e.g. D:\mingw64\bin)
- Install dependencies
pip install -r requirements.txt
- Run compile and distribution
python -m nuitka --mingw64 --standalone --plugin-enable=pyside6 --include-data-dir=source_script=source_script --include-data-dir=resource=resource --remove-output --windows-disable-console --windows-icon-from-ico=resource\translate-main.ico --show-progress translation.py
...
translation.exe
- Not limited to the browser(in theory, it can be used in any application that can be copied with ctrl + c)
- Plug-in translation interface, can load custom translation plugins(two translation plugins have been built in, baidu and youdao)
- Hot reload plugin system, easy to debug
- Listen mouse events(current project listens to three events, left click and drag, double click with left button, press shitf key and click left button);
- Backup clipboard content;
- Copy selected text to clipboard;
- Take the clipboard text;
- Restore clipboard;
- Call API to translate text;
- Show results.
The plugin used by the project is the compiled pyd file, which will have a faster loading speed, of course, you can also use the py file directly. I recommend you to use pyd file, similarly, it is also very simple to compile it, you only need to run the following command in the console:
python -m nuitka --mingw64 --module --output-dir source_script plugins\your_plugin.py