A simple string converter, which aims to fix all the typography imperfections of the plain text.
The current version of the project fixes following things:
- Typographic quotes
- Non-breaking spaces
- Trailing spaces
The most simple way to install Truty is using Ruby gems.
gem install truty
The gem contains an executable. For now it has only one parameter, language. Other arguments are files which will be converted and outputted. If no file is supplied, then the standard input is converted.
truty -l czech file.txt
truty --language english file.txt
Currently suported languages:
- English (partially)
- French (partially)
If you want to use typography fixes and improvements in your code then add:
Main method for converting your string is:
string = "Hello world!" puts Truty.fix(string, :english)
Full documentation can be found here: