Project

truty

0.0
No commit activity in last 3 years
No release in over 3 years
A string converter aiming to correct the typography of plain text.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.9
~> 3.0
~> 0.9

Runtime

 Project Readme

Truty

Gem Version Test Coverage Code Climate Build Status Dependency Status security

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:

  • Hyphenation
  • Typographic quotes
  • Non-breaking spaces
  • Ellipses
  • Trailing spaces
  • Widows
  • etc.

Installation

The most simple way to install Truty is using Ruby gems.

gem install truty

Usage

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

Or:

truty --language english file.txt

Currently suported languages:

  • Czech
  • English (partially)
  • French (partially)

Library

If you want to use typography fixes and improvements in your code then add:

require 'truty'

Main method for converting your string is:

string = "Hello world!"
puts Truty.fix(string, :english)

Full documentation can be found here:

http://www.rubydoc.info/gems/truty

Authors