Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mohyoo/google-multiple-images-tanslator
Translate multiple images via google translator! for linux.
https://github.com/mohyoo/google-multiple-images-tanslator
debian imag images linux python-3 translation
Last synced: about 10 hours ago
JSON representation
Translate multiple images via google translator! for linux.
- Host: GitHub
- URL: https://github.com/mohyoo/google-multiple-images-tanslator
- Owner: Mohyoo
- License: mit
- Created: 2024-11-17T19:57:27.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-26T16:07:47.000Z (about 2 months ago)
- Last Synced: 2024-12-22T02:00:25.348Z (30 days ago)
- Topics: debian, imag, images, linux, python-3, translation
- Language: Python
- Homepage:
- Size: 56.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Description
1) A python program that allows you to translate multiple images
via google translator, without wasting time in clicking & dragging; based on selenium.
2) Still under development, please report bugs.
3) For now, it only works on Debian; but it may work for other ditributions if you know how to install dependencies.# Requirements
1) Python libraries: pyperclip & selenium.
2) Linux packages: xclip, xsel & wl-clipboard.
3) Google Chrome or Chromium.# Installation
- There is an installer for the requirements (for Debian), but you can install them manually (better to install python libraries in a venv) & skip step (1).
- Open the terminal in the program's directory and:
1) type: ````python install_requirements.py```` (or python3), and wait.
2) A 'venv' folder should appear, now before executing the program, activate the venv: ````source venv/bin/activate````
2) Download & install google chrome: https://www.google.com/chrome/ (flatpak repository may cause issues!); or Chromium.# Examples
-For brief instructions, type in the terminal: ````python google_translate.py -h````
### 1) Example 1:
- This is the simplest command:
````
python google_translate.py -i images -l en_ar
````
- The argument '-i images' is the folder containing the images, it must be inside the program folder, otherwise use absolute path.
- The argument '-l en_ar' means translating from english (en) to arabic (ar), separated with an underscore.
- To find your language's shortcut, see the 'languages_list.txt' file.
- When this command is executed, google chrome will show up & start translating on its own (it's not a virus o_o).
### 2) Example 2:
````
python google_translate.py -i images -l en_ar -o output.txt -q 60 -k true
````
- The argument '-o output.txt' is where your translated text will be saved, here it will be saved inside the program folder, otherwise use absolute path.
- The argument '-q 60' means: when the translation finishes, how much time to wait before closing the browser & exiting the program (in seconds).
- The argument '-k true' is an HTTP connection parameter; when true, the client binding keeps the
same connection for every request, which may speed up the process.# Exiting venv & uninstallation
1) To deactivate the venv, simply type: ````deactivate````
2) To remove the venv, simply delete the folder.
3) A selenium folder may be left in the ~/.cache directory, delete it.# What's new!
- Errors handling.
- No need to specify the '-c' argument anymore (c: time between upload & copy).