Skip to content

cschritt/deepl-plugin-albert

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deepl plugin for Albert launcher

Plugin to use Deepl translator with Albert launcher

How to setup

First, a Deepl API key is needed. Create an account on the Deepl website and subscribe for the Deepl API Free subscription.

Once you've got your key, clone this repo to the Albert modules folder and edit the configuration file:

cd ~/.local/share/albert/org.albert.extension.python/modules/
git clone https://github.com/lilianmallardeau/deepl-plugin-albert.git deepl_translate
nano deepl_translate/parameters.env

Put your API key in the DEEPL_API_KEY variable.

In case you use the Pro (paid) version of the API, change the variable DEEPL_SUBSCRIPTION to pro (the base URL for the API is not the same for the free API and the Pro API).

You can also change the triggers for the plugin if you want, by changing the __triggers__ variable in __init__.py.

You may need to restart Albert for it to load the plugin. Don't forget to activate the module in the Albert settings, under "Python Extensions".

How to use

deepl <target-lang> <text>
deepl <src-lang:target-lang> <text>

For example:

deepl fr Hello world!
deepl en:fr Hello world!

When the source language is not specified, Deepl will detect it. Once the translation is shown, pressing Enter will copy it to the clipboard.

Requirements

python-dotenv Python package. It can be installed from Pypi.

About

Albert launcher plugin for the Deepl translator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 93.8%
  • Shell 6.2%