gtranslate/README.md

61 lines
1.5 KiB
Markdown
Raw Normal View History

2021-01-17 20:09:57 +00:00
# gtranslate
Better front-end for Google Translate that doesn't track you and works
without JavaScript.
2021-01-17 20:49:27 +00:00
# Installation
```sh
git clone https://git.sr.ht/~yerinalexey/gtranslate
cd gtranslate
go build
```
Then run the server with
```sh
./gtranslate
```
If you want to use a different port:
```sh
./gtranslate -b :3000 # will run on port 3000
```
Note: if you're running it outside of development environment, you
should pass `--template-dir` and `--static-dir` arguments pointing to
templates and static directories:
```sh
./gtranslate \
--template-dir /usr/share/webapps/gtranslate/templates \
2021-01-22 09:23:09 +00:00
--static-dir /usr/share/webapps/gtranslate/static
2021-01-17 20:49:27 +00:00
```
2021-01-18 19:36:30 +00:00
2021-01-22 09:23:09 +00:00
Other settings (available with `./gtranslate --help`):
2021-01-18 20:34:21 +00:00
```
2021-01-22 09:23:09 +00:00
Usage of ./gtranslate:
2021-01-18 20:34:21 +00:00
-b, --bind string Address to bind the server to, [addr]:port (default ":5000")
--proxy string Proxy URL, with no scheme http is assumed
--static-dir string Static files directory (default "./static")
--template-dir string Templates directory (default "./templates")
--user-agent string User-Agent header to use
```
2021-01-22 09:20:27 +00:00
If you want to proxy requests through Tor network, it's a good idea to
set User-Agent of Tor Browser so it will be harder to identify such
servers:
2021-01-22 09:23:09 +00:00
```sh
2021-01-22 09:20:27 +00:00
./gtranslate \
--user-agent "Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0" \
...
```
[Source](https://tor.stackexchange.com/questions/4890/tor-browser-user-agent-strings/21524#21524)
2021-01-18 19:36:30 +00:00
# TODO
- Proper language selector
- Dark theme