Inspired by Aggelos greek to greeklish text converter implementation, I decided to write such a text converter in Python. It accepts text either from the stdin or by reading a file specified in the command line. It also auto-detects UTF-8 and ISO8859-7 encodings. Two sample text files are provided in the distribution for testing.
Download:
License
This project is released under the terms of the GNU General Public License version 2 or later.
Support
This program is not officially supported. You can still get community support by reporting bugs and asking your questions in the Software Support Forum.
pygr2gl – Greek to Greeklish Converter by George Notaras is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Copyright © 2006 - Some Rights Reserved
Nice! The same can be achieved with:
Unless one intends to use pygr2gl on Windows (for which I’m not sure if standard input redirection is supported), is there any other reason you include an option to specify the file in the command-line?
Actually, I had windows users in mind when adding this feature, but, on the other hand, how many windows users would install a whole programming language in order to run a single script? I think noone :) So, I think this “feature” exists mostly for completeness.
BTW, I just realized there is an inconsistency. Although it is possible to concatenate many text files and pipe them to the script, eg:
It’s not possible to specify multiple files in the command line. So, I need to correct this at some later time.
Thanks for your comment.
I see.
You may want to correct my initial comment. I forgot to escape the “less than sign” and part of the code was lost:
$ python pygr2gl <my_file.txt
Done. I should have guessed that wordpress had messed the comment up.