Skip to content
A string converter aiming to correct the typography.
Branch: master
Clone or download
Latest commit 315f49a May 18, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Added conversion utility Jan 5, 2015
lib
test Update Code Climate configuration May 18, 2017
.gitignore Updated gemspec & checked Gemfile Dec 22, 2014
.travis.yml
Gemfile
LICENSE Moved to GNU GPL license and removed test file Dec 30, 2015
README.md README whitespace fix Jan 7, 2015
Rakefile
truty.gemspec Update YARD dependency May 18, 2017

README.md

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

You can’t perform that action at this time.