Wrapper for the command line of argos-translate
Find a file
2026-01-11 18:48:19 +01:00
README.md Adding interactive mode 2025-12-21 00:22:09 +01:00
tri.sh Small typo correction 2026-01-11 18:48:19 +01:00
trs.sh First commit 2025-12-19 17:05:27 +01:00

Wrapper for argos-translate command line

This is a dead-simple wrapper for the argos-translate command line.

The goal of it is to simplify the arguments.

trs (stands for translate): translate on the fly

tri (stands for translate interactive): interactive mode that allow to import and setup only once (the thing that takes forever), and have an interactive mode to translate.

Installation

Argos

Create a python virtual environment, e.g

python -m venv ~/.virtualenvs/argos_translate

Note: if you named the virtual environment differently, change also the corresponding variable in trs.sh.

Select the newly created environment and install argos:

source ~/.virtualenvs/argos_translate/bin/activate

pip install argostranslate

This script

Clone this repository, and make trs available globally:

sudo ln -s /absolute/path/to/trs.sh /usr/bin/trs

Same for tri.

Usage

$ trs src_lang dest_lang txt

# Examples:
$ trs it en buongiorno
$ trs it en buongiorno | trs en fr

For tri (which stands for tr - translate, i interactive):

$ tri src_lang dest_lang

# Example:
$ tri it en

Note that tri needs my pull request on argos-translate repo (interactive mode, see argosopentech/argos-translate#506).