mozhi/README.md

111 lines
5.7 KiB
Markdown
Raw Normal View History

2023-09-02 05:59:43 +00:00
<div align="center">
2023-11-03 16:17:36 +00:00
<img src="public/assets/mozhi.png" width="192" height="192" alt="Mozhi logo">
2023-09-02 05:59:43 +00:00
<h1>Mozhi</h1>
<a href="https://www.gnu.org/licenses/agpl-3.0.en.html">
<img alt="License: AGPLv3" src="https://shields.io/badge/License-AGPL%20v3-blue.svg">
</a>
2023-10-05 16:04:23 +00:00
<a href="https://matrix.to/#/#mozhi:frei.chat">
2023-09-02 05:59:43 +00:00
<img alt="Matrix" src="https://img.shields.io/badge/matrix-000000?style=for-the-badge&logo=Matrix&logoColor=white">
</a>
<h3>Mozhi (spelt moḻi) is an alternative-frontend for many translation engines.</h3>
</div>
It was initially made as a maintained fork/rewrite of [simplytranslate](https://codeberg.org/SimpleWeb/SimplyTranslate-Web), but has grown to have a lot more features as well!
I'm initially focusing on the api and engines, but eventually Mozhi will have a functioning CLI and webapp.
## Supported Engines:
- Google
- Reverso
- DeepL
- LibreTranslate
- Yandex
- MyMemory
- DuckDuckGo ( 1-1 with Bing Translate )
2024-08-23 13:22:09 +00:00
## Projects that use Mozhi
- [select2translate](https://codeberg.org/aryak/select2translate) - Translate text from your selection clipboard using Mozhi
- [Crow Translate](https://invent.kde.org/office/crow-translate) - KDE Project written in C++ / Qt that allows you to translate and speak text using Mozhi
## Where is the engine code?
The engine code has recently been split from the main codebase. Please check [aryak/libmozhi](https://codeberg.org/aryak/libmozhi) for it.
## Installing
You can either use [docker](https://codeberg.org/aryak/mozhi/src/branch/master/compose.yml) or the build artifacts from [CI jobs on git.projectsegfau.lt](https://git.projectsegfau.lt/arya/mozhi/actions).
2023-08-27 16:25:16 +00:00
## Building
```
2023-09-11 08:45:27 +00:00
GOPRIVATE=codeberg.org/aryak/libmozhi # Get latest commit since proxy server is a bit slow
2023-08-27 16:25:16 +00:00
go mod download
go run github.com/swaggo/swag/cmd/swag@latest init --parseDependency
2023-08-27 16:25:16 +00:00
go build -o mozhi
```
2023-08-27 15:57:46 +00:00
## API Docs
2023-08-30 10:43:06 +00:00
Mozhi makes use of swagger (using the fiber middleware) to manage the documentation of the API.
2023-08-27 15:57:46 +00:00
2023-08-30 10:43:06 +00:00
You can find it in /api/swagger of any instance ([example](https://mozhi.aryak.me/api/swagger/index.html)).
2023-08-27 15:57:46 +00:00
## Why does Reverso not work?
Reverso sometimes blocks IPs of servers hosting mozhi, and since it doesn't have IPv6, an IP Rotator won't be viable. For more information, check out [#27](https://codeberg.org/aryak/mozhi/issues/27)
2023-08-30 10:35:16 +00:00
## Configuration
Features of Mozhi can be customized and toggled on/off using Environment Variables.
- `MOZHI_PORT`: Port the webserver listens on (if hosting API)
- `MOZHI_LIBRETRANSLATE_URL`: URL of Libretranslate instance (Example: `MOZHI_LIBRETRANSLATE_URL=https://lt.psf.lt`)
- `MOZHI_DEFAULT_SOURCE_LANG`: Language to default to if no source language is set by user. Defaults to Auto-Detect (or first available language in engines which dont support it)
- `MOZHI_DEFAULT_PREFER_AUTODETECT`: Prefer autodetect if available instead of specified/default source language. Defaults to false
- `MOZHI_DEFAULT_TARGET_LANG`: Language to default to if no target language is set by user. Defaults to English
2023-08-30 10:35:16 +00:00
These envvars turn off/on engines. By default all of them are enabled.
- `MOZHI_GOOGLE_ENABLED`
- `MOZHI_REVERSO_ENABLED`
- `MOZHI_DEEPL_ENABLED`
- `MOZHI_LIBRETRANSLATE_ENABLED`
- `MOZHI_YANDEX_ENABLED`
- `MOZHI_MYMEMORY_ENABLED`
- `MOZHI_DUCKDUCKGO_ENABLED`
2023-08-30 10:43:06 +00:00
## Instances
| Link | Cloudflare | Country | ISP |
| -------- | ---------- | ----------- | ----- |
| [mozhi.aryak.me](https://mozhi.aryak.me) | No | India | Airtel |
2023-09-21 18:10:09 +00:00
| [translate.bus-hit.me](https://translate.bus-hit.me) | No | Canada | Oracle |
2023-11-12 06:36:51 +00:00
| [nyc1.mz.ggtyler.dev](https://nyc1.mz.ggtyler.dev) | No | USA | Royale Hosting |
| [translate.projectsegfau.lt](https://translate.projectsegfau.lt) | No | Germany / USA / India | Avoro / Racknerd / Airtel |
2024-04-21 09:04:13 +00:00
| [translate.nerdvpn.de](https://translate.nerdvpn.de) | No | Ukraine | vsys.host |
2024-04-27 13:16:12 +00:00
| [mozhi.ducks.party](https://mozhi.ducks.party) | No | Germany | Datalix |
| [mozhi.frontendfriendly.xyz](https://mozhi.frontendfriendly.xyz) | No | USA | Hetzner |
2024-05-27 14:27:29 +00:00
| [mozhi.pussthecat.org](https://mozhi.pussthecat.org) | No | Germany | Hetzner |
| [mo.zorby.top](https://mo.zorby.top) | No | Germany | pawhost.de |
| [mozhi.adminforge.de](https://mozhi.adminforge.de) | No | Germany | Hetzner |
| [translate.privacyredirect.com](https://translate.privacyredirect.com) | No | Finland | Private WebHost |
| [mozhi.frontendfriendly.xyz (Tor)](http://mozhi.wsuno6lnjdcsiok5mrxvl6e2bdex7nhsqqav6ux7tkwrqiqnulejfbyd.onion) | No | USA | Hetzner |
2024-07-17 10:25:20 +00:00
| [mozhi.ducks.party (Tor)](http://42i2bzogwkph3dvoo2bm6srskf7vvabsphw7uzftymbjjlzgfluhnmid.onion) | No | Germany | Datalix |
| [mo.zorby.top (Tor)](http://3mu2almmcv7rd7wlwhmkbwqgttntgpqu3hdanutxbv2v72wzbxe5ixqd.onion) | No | Germany | pawhost.de |
| [mo.zorby.top (I2P)](http://74lptlnvaukcjnmqefedgna35ahkqexqzq2qq3k7utc2ep4jotcq.b32.i2p) | No | Germany | pawhost.de |
2023-08-30 10:43:06 +00:00
## Features
- An all mode where the responses of all supported engines will be shown.
- Autodetect which will show the language that was detected
- Text-To-Speech for multiple engines
- A good API (subjective :P)
- All the stuff you expect from a translation utility :)
## Etymology
Mozhi is the word in Tamil for language. Simple as that :P
2023-09-10 11:57:22 +00:00
## Credits
- [Arya](https://aryak.me): creator
- [Midou36o](https://midou.dev): made the logo
2023-09-10 12:50:32 +00:00
- [py_](https://github.com/supercolbat): Design files
2023-09-21 10:23:28 +00:00
- [Missuo](https://github.com/missuo): creating gDeepLX that does the hard part of making DeepL work
- [translatepy](https://github.com/Animenosekai/translate): giving me the format of request for yandex engine
2023-09-10 11:57:22 +00:00
- [SimplyTranslate](https://codeberg.org/simpleweb/simplytranslate): Inspiration and base code for the webui
2023-09-10 12:45:46 +00:00
- [Rimgo](https://codeberg.org/rimgo/rimgo): Code for embedding html in binary
2023-10-04 15:02:56 +00:00
- [Bnyro](https://me.chatoyer.de): Parallelization of all engines