Lingva Translate Gateway for Mastodon (LibreTranslate API compatible)
-
Install the
flaskpackagepip install flask -
Install the modified
pylingvagit clone https://git.catswords.net/gnh1201/pylingva && cd pylingva pip install . -
Add lines to
.env.productionLIBRE_TRANSLATE_ENDPOINT=https://translation-api.example.org # YOUR API URL LIBRE_TRANSLATE_API_KEY=true -
Run mastodon-lingva (Or use
mastodon-lingva.service)python3 server.py & -
Restart all related processes
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d 'q=hello world&source=en&target=ko' http://localhost:5000/translatecurl -X POST -H "Content-Type: application/json" -d '{"q":["hello world"],"source":"en","target":"ko"}' http://localhost:5000/translate- pylingva (modified version): https://git.catswords.net/gnh1201/pylingva
- Lingva Translate: https://github.com/thedaviddelta/lingva-translate
- ActivityPub @gnh1201@catswords.social
- abuse@catswords.net