truty 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +63 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dddef28acfc726a65125d42f0a60b308725bd686
|
4
|
+
data.tar.gz: 95c1cf47e7099fe51c3b224243479ab37abfd2ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce543e0d40401f31a7a73f699e0814a0deea3eefcf0892897c5acd0a41fd9e35281f8bd7f39d3682e07a80c3cfaa792fef8e95672add021a0b509e603ae33d41
|
7
|
+
data.tar.gz: fe6a3dcf3742e0f62efeb5438758961c6c6406a8d1ad8fe37463d12e3d319edd0915a2b17b22b292f8426cb4216a79ef978df2a28716314c819ec5582d4c60f8
|
data/README.md
CHANGED
@@ -8,4 +8,66 @@
|
|
8
8
|
[](https://gemnasium.com/mkj-is/Truty)
|
9
9
|
[](https://hakiri.io/github/mkj-is/Truty/master)
|
10
10
|
|
11
|
-
|
11
|
+
A simple string converter, which aims to fix all the typography imperfections of the plain text.
|
12
|
+
|
13
|
+
The current version of the project fixes following things:
|
14
|
+
|
15
|
+
- Hyphenation
|
16
|
+
- Typographic quotes
|
17
|
+
- Non-breaking spaces
|
18
|
+
- Ellipses
|
19
|
+
- Trailing spaces
|
20
|
+
- Widows
|
21
|
+
- etc.
|
22
|
+
|
23
|
+
## Installation
|
24
|
+
|
25
|
+
The most simple way to install Truty is using Ruby gems.
|
26
|
+
|
27
|
+
```
|
28
|
+
gem install truty
|
29
|
+
```
|
30
|
+
|
31
|
+
## Usage
|
32
|
+
|
33
|
+
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.
|
34
|
+
|
35
|
+
```
|
36
|
+
truty -l czech file.txt
|
37
|
+
```
|
38
|
+
|
39
|
+
Or:
|
40
|
+
|
41
|
+
```
|
42
|
+
truty --language english file.txt
|
43
|
+
```
|
44
|
+
|
45
|
+
Currently suported languages:
|
46
|
+
|
47
|
+
- Czech
|
48
|
+
- English (partially)
|
49
|
+
- French (partially)
|
50
|
+
|
51
|
+
## Library
|
52
|
+
|
53
|
+
If you want to use typography fixes and improvements in your code then add:
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
require 'truty'
|
57
|
+
```
|
58
|
+
|
59
|
+
Main method for converting your string is:
|
60
|
+
|
61
|
+
```ruby
|
62
|
+
string = "Hello world!"
|
63
|
+
puts Truty.fix(string, :english)
|
64
|
+
```
|
65
|
+
|
66
|
+
Full documentation can be found here:
|
67
|
+
|
68
|
+
http://www.rubydoc.info/gems/truty
|
69
|
+
|
70
|
+
## Authors
|
71
|
+
|
72
|
+
- [Matěj Kašpar Jirásek](https://github.com/mkj-is) (http://mkj.is)
|
73
|
+
|