https://github.com/xtonousou/grklsh
:greece: :uk: Translate any text into Greeklish, print on stdout, write to file/s.
https://github.com/xtonousou/grklsh
english googletrans greek greeklish pip python stdout text-processing translation
Last synced: 21 days ago
JSON representation
:greece: :uk: Translate any text into Greeklish, print on stdout, write to file/s.
- Host: GitHub
- URL: https://github.com/xtonousou/grklsh
- Owner: xtonousou
- License: mit
- Created: 2017-06-22T22:20:58.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-02T14:58:51.000Z (almost 8 years ago)
- Last Synced: 2025-03-31T12:21:27.704Z (about 2 months ago)
- Topics: english, googletrans, greek, greeklish, pip, python, stdout, text-processing, translation
- Language: Python
- Homepage:
- Size: 142 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
### grklsh [](https://travis-ci.org/xtonousou/grklsh)
> Greeklish, a portmanteau of the words Greek and English, also known as Grenglish, Latinoellinika/Λατινοελληνικά or ASCII Greek, is the Greek language written using the Latin alphabet.
### About
`grklsh` is a small script written in **Python 2** that translates any text into Greeklish. It reads from stdin or from the arguments and prints on stdout or writes to files.
#### Features
* Type and Enter translation
* File translation### Installation
#### on Linux and on MacOS
You only need `git` and of course `python2`
```bash
$ git clone https://github.com/xtonousou/grklsh.git
$ cd grklsh/
$ sudo python2 -m pip install -r requirements.txt
```#### on Windows
You can read this [guide]
### Usage
#### Table Of Contents
* Type and Enter translation
* [Greek ➝ Greeklish] *does not require internet connection*
* [Any language ➝ Greeklish] *requires internet connection*
* File translation
* [Any language files ➝ New files in Greeklish] *requires internet connection*
* [Any language files ➝ New files in Greeklish (PARTIALLY)] *requires internet connection*
* [Files with Greek characters ➝ New files in Greeklish] *does not require internet connection*
* [Files with Greek characters ➝ New files in Greeklish (PARTIALLY)] *does not require internet connection*##### Greek ➝ Greeklish
You just have to type,
```bash
$ grklsh.py
```##### Any language ➝ Greeklish
You need to put the `-t` or `--translate` argument first like this,
```bash
$ grklsh.py -t
```##### Any language files ➝ New files in Greeklish
OK, this one is a bit tricky :smirk:
You have to put the `-t` or `--translate` and `-w` or `--write` arguments before each filename
The following example will show you how to use this feature,
```bash
$ grklsh.py -t -w file1
```This will generate the translated file `file1.grklsh`
If you want to translate multiple files at once,
*It doesn't matter the order of the arguments*```bash
$ grklsh.py -t -w file1 -w -t file2 -t -w file3
```This one, will generate three translated files: `file1.grklsh`, `file2.grklsh` and `file3.grklsh`
##### Any language files ➝ New files in Greeklish (PARTIALLY)
:interrobang: Wait what?
In this case, you have to do it like this,
```bash
$ grklsh.py -w -t file1 -w file2 -t file3 -t -w file4 file5
```Well, this example will generate a translated file `file1.grklsh` and a converted (Greek ➝ Greeklish) file `file2.grklsh`, print the file `file3` translated, generate a translated file `file4.grklsh` and print the converted (Greek ➝ Greeklish) file `file5` :grin:
##### Files with Greek characters ➝ New files in Greeklish
You have to put the `-w` or `--write` argument before each filename
The example below shows how to translate a file into Greeklish and generate a file `file1.grklsh` which contains the translated text
```bash
$ grklsh.py -w file1
```If you want to convert multiple files at once,
```bash
$ grklsh.py -w file1 -w file2 -w file3
```This will generate three files: `file1.grklsh`, `file2.grklsh` and `file3.grklsh` which contain the translated text of each file passed as argument
##### Files with Greek characters ➝ New files in Greeklish (PARTIALLY)
Hmmm? :confused:
You can use the functionality of printing the translated text on stdout and the functionality of writing to files simultaneously
The example below shows the implementation of the above,
```bash
$ grklsh.py -w file1 file2 -w file3 -w file4
```This will print on stdout the translated text of the file `file2` but it will also generate three files: `file1.grklsh`, `file3.grklsh` and `file4.grklsh` which contain the translated text of each file
### Credits
* [nfldb] by BurntSushi for his awesome wiki
### Changelog
All notable changes to this project will be documented in [this] file
### License
Copyright (c) **2017** by **Sotirios M. Roussis**. Some rights reserved.
`grklsh` is under the terms of the MIT License, following all clarifications stated in the [license] file
[here]: https://www.python.org/downloads/windows/
[nfldb]: https://github.com/BurntSushi/nfldb[Greek ➝ Greeklish]: #greek--greeklish
[Any language ➝ Greeklish]: #any-language--greeklish
[Any language files ➝ New files in Greeklish]: #any-language-files--new-files-in-greeklish
[Any language files ➝ New files in Greeklish (PARTIALLY)]: #any-language-files--new-files-in-greeklish-partially
[Files with Greek characters ➝ New files in Greeklish]: #files-with-greek-characters--new-files-in-greeklish
[Files with Greek characters ➝ New files in Greeklish (PARTIALLY)]: #files-with-greek-characters--new-files-in-greeklish-partially[banner]: /imgs/flag.jpg
[board]: /imgs/board.png[guide]: WINDOWS_INSTALLATION.md
[this]: CHANGELOG.md
[license]: LICENSE.md