tate 1.1.0 → 1.6.0
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/.ruby-version +1 -1
- data/.travis.yml +3 -3
- data/Gemfile +2 -0
- data/LICENSE.txt +21 -0
- data/README.md +22 -6
- data/Rakefile +5 -3
- data/bin/console +4 -3
- data/bin/tate +7 -7
- data/lib/config/locales/az.yml +68 -0
- data/lib/config/locales/bg.yml +112 -0
- data/lib/config/locales/ca.yml +82 -0
- data/lib/config/locales/de.yml +60 -0
- data/lib/config/locales/en.yml +59 -0
- data/lib/config/locales/es.yml +70 -0
- data/lib/config/locales/fr.yml +84 -0
- data/lib/config/locales/hu.yml +70 -0
- data/lib/config/locales/pl.yml +70 -0
- data/lib/config/locales/pt.yml +80 -0
- data/lib/config/locales/ro.yml +62 -0
- data/lib/config/locales/vi.yml +186 -0
- data/lib/tate.rb +10 -21
- data/lib/tate/version.rb +3 -1
- data/tate.gemspec +6 -5
- metadata +30 -28
- data/lib/rules/az.yml +0 -20
- data/lib/rules/bg.yml +0 -60
- data/lib/rules/ca.yml +0 -24
- data/lib/rules/de.yml +0 -8
- data/lib/rules/es.yml +0 -14
- data/lib/rules/fr.yml +0 -32
- data/lib/rules/glyphs.yml +0 -56
- data/lib/rules/hu.yml +0 -18
- data/lib/rules/pl.yml +0 -18
- data/lib/rules/pt.yml +0 -24
- data/lib/rules/ro.yml +0 -10
- data/lib/rules/vi.yml +0 -134
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b84cad54ae3dc9964b725f3ea6fb7561e2d6b482574d49aeb682ea95f7529e0
|
4
|
+
data.tar.gz: 152c7cbaea389367ec49c20c4acc186de8deed4a4f4c59ff9e621849fd89e6d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8498bfb2e4a8510281863d2aea086c8e8764f5efcd8f0f965fc6595157147e7fda41b091e8fbe25329d21beb0953029c2594c525a79e79c387800638c9707c75
|
7
|
+
data.tar.gz: 4735c54d1f75b36890e37fcb5d6e66150c83df5a414d2c89c404e22e5a2279fad7c5ab11c7f9b4a30833fb08634b6529a748284ed8c3d9bb715be37466b694ae
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.
|
1
|
+
ruby-2.7.1
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2019 Kerem Bozdas
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -104,13 +104,13 @@ curl gov.bg/bg | tate --lang=bg > index.html
|
|
104
104
|
There are custom filters for:
|
105
105
|
|
106
106
|
```
|
107
|
-
Azeri, Bulgarian, Catalan, French, German, Hungarian, Polish, Romanian, Spanish, and Vietnamese.
|
107
|
+
Azeri, Bulgarian, Catalan, French, German, Hungarian, Polish, Romanian, Portuguese, Spanish, and Vietnamese.
|
108
108
|
```
|
109
109
|
|
110
110
|
The following languages are known to work (w/o custom filters):
|
111
111
|
|
112
112
|
```
|
113
|
-
Croatian, Czech, Danish, Esperanto, Estonian, Finnish, Icelandic, Latvian, Lithuania, Norwegian,
|
113
|
+
Croatian, Czech, Danish, Esperanto, Estonian, Finnish, Icelandic, Latvian, Lithuania, Norwegian, Scottish, Slovak, Slovenian, Swedish, Turkish, and Welsh.
|
114
114
|
```
|
115
115
|
|
116
116
|
What's next?
|
@@ -123,9 +123,23 @@ Russian, Irish, Arabic, and Yoruba.
|
|
123
123
|
|
124
124
|
Yes.
|
125
125
|
|
126
|
+
## Support
|
127
|
+
|
128
|
+
This gem is tested against the following Ruby versions:
|
129
|
+
|
130
|
+
- ✅ `2.7.1` (stable)
|
131
|
+
- ✅ `2.6.6` (stable)
|
132
|
+
- ⏳ `2.5.8` (security maintenance)
|
133
|
+
|
134
|
+
## Development
|
135
|
+
|
136
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
137
|
+
|
138
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org][RubyGems].
|
139
|
+
|
126
140
|
## Contributing
|
127
141
|
|
128
|
-
1. Fork
|
142
|
+
1. [Fork the repository][Fork]
|
129
143
|
2. Create your feature branch (`git checkout -b add-irish-support`)
|
130
144
|
3. Commit your changes (`git commit -am 'Add Irish language support'`)
|
131
145
|
4. Push to the branch (`git push origin add-irish-support`)
|
@@ -135,7 +149,7 @@ Yes.
|
|
135
149
|
|
136
150
|
You can add custom language filters under `lib/rules` directory.
|
137
151
|
|
138
|
-
### Donations
|
152
|
+
### Donations ❤️
|
139
153
|
|
140
154
|
You can donate me at [Liberapay][Donation]. Thanks! ☕️
|
141
155
|
|
@@ -147,10 +161,12 @@ Nobody has time to type transliterate in the terminal.
|
|
147
161
|
|
148
162
|
## License
|
149
163
|
|
150
|
-
Copyright ©
|
164
|
+
Copyright © 2016-2020 [Kerem Bozdas][Personal Webpage]
|
151
165
|
|
152
166
|
This project is available under the terms of the [MIT License][License].
|
153
167
|
|
154
168
|
[Donation]: https://liberapay.com/krmbzds/donate
|
155
|
-
[
|
169
|
+
[Fork]: https://github.com/krmbzds/tate/fork
|
156
170
|
[License]: http://kerem.mit-license.org
|
171
|
+
[Personal Webpage]: http://kerembozdas.com
|
172
|
+
[RubyGems]: https://rubygems.org
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
require
|
4
|
-
require
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'tate'
|
5
6
|
|
6
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
8
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -10,5 +11,5 @@ require "tate"
|
|
10
11
|
# require "pry"
|
11
12
|
# Pry.start
|
12
13
|
|
13
|
-
require
|
14
|
+
require 'irb'
|
14
15
|
IRB.start
|
data/bin/tate
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
#
|
2
|
+
# frozen_string_literal: true
|
3
3
|
|
4
4
|
lib = File.expand_path(File.dirname(__FILE__) + '/../lib')
|
5
5
|
$LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib)
|
@@ -10,12 +10,12 @@ require 'optionparser'
|
|
10
10
|
options = {}
|
11
11
|
|
12
12
|
option_parser = OptionParser.new do |opts|
|
13
|
-
opts.banner = 'Usage: tate [
|
14
|
-
opts.on(
|
13
|
+
opts.banner = 'Usage: tate [-l LANGUAGE]'
|
14
|
+
opts.on('-l LANGUAGE', '--language LANGUAGE', String, 'Set language for custom filters') do |language|
|
15
15
|
options[:language] = language
|
16
16
|
end
|
17
17
|
opts.on('-h', '--help', 'Show this message') do
|
18
|
-
options[:help] =
|
18
|
+
options[:help] = opts.help
|
19
19
|
end
|
20
20
|
opts.on('-v', '--version', 'Show version') do
|
21
21
|
options[:version] = Tate::VERSION
|
@@ -25,11 +25,11 @@ end
|
|
25
25
|
option_parser.parse!
|
26
26
|
|
27
27
|
if options[:language]
|
28
|
-
STDOUT.puts(Tate
|
28
|
+
STDOUT.puts(Tate.transliterate(STDIN.read, options[:language]))
|
29
29
|
elsif options[:version]
|
30
30
|
STDOUT.puts(options[:version])
|
31
31
|
elsif options.empty?
|
32
|
-
STDOUT.puts(Tate
|
32
|
+
STDOUT.puts(Tate.transliterate(STDIN.read))
|
33
33
|
else
|
34
|
-
STDOUT.puts(
|
34
|
+
STDOUT.puts(options[:help])
|
35
35
|
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
az:
|
2
|
+
i18n:
|
3
|
+
transliterate:
|
4
|
+
rule:
|
5
|
+
C: "C"
|
6
|
+
İ: "I"
|
7
|
+
J: "J"
|
8
|
+
Q: "Q"
|
9
|
+
X: "X"
|
10
|
+
ç: "c"
|
11
|
+
Ç: "C"
|
12
|
+
ü: "u"
|
13
|
+
Ü: "U"
|
14
|
+
ğ: "g"
|
15
|
+
Ğ: "G"
|
16
|
+
ı: "i"
|
17
|
+
ş: "s"
|
18
|
+
Ş: "S"
|
19
|
+
ə: "e"
|
20
|
+
Ə: "E"
|
21
|
+
¢: "c"
|
22
|
+
£: "GBP "
|
23
|
+
¥: "CNY "
|
24
|
+
¨: '"'
|
25
|
+
©: "(c)"
|
26
|
+
®: " (R)"
|
27
|
+
±: "+-"
|
28
|
+
²: "^2"
|
29
|
+
³: "^3"
|
30
|
+
´: "'"
|
31
|
+
µ: "nM"
|
32
|
+
¼: "1/4"
|
33
|
+
½: "1/2"
|
34
|
+
¾: "3/4"
|
35
|
+
×: "*"
|
36
|
+
ˆ: "^"
|
37
|
+
˜: "~"
|
38
|
+
–: "-"
|
39
|
+
—: "-"
|
40
|
+
‘: "'"
|
41
|
+
’: "'"
|
42
|
+
‚: ","
|
43
|
+
“: '"'
|
44
|
+
”: '"'
|
45
|
+
„: '"'
|
46
|
+
…: "..."
|
47
|
+
′: "'"
|
48
|
+
″: '"'
|
49
|
+
‹: "<"
|
50
|
+
›: ">"
|
51
|
+
⁄: "/"
|
52
|
+
€: "EUR "
|
53
|
+
™: " (TM)"
|
54
|
+
←: "<-"
|
55
|
+
→: "->"
|
56
|
+
↔: "<->"
|
57
|
+
⇐: "<="
|
58
|
+
⇒: "=>"
|
59
|
+
⇔: "<=>"
|
60
|
+
−: "-"
|
61
|
+
∗: "*"
|
62
|
+
∼: "~"
|
63
|
+
≠: "=/="
|
64
|
+
≤: "<="
|
65
|
+
≥: "=>"
|
66
|
+
⋅: "-"
|
67
|
+
〈: "<"
|
68
|
+
〉: ">"
|
@@ -0,0 +1,112 @@
|
|
1
|
+
bg:
|
2
|
+
i18n:
|
3
|
+
transliterate:
|
4
|
+
rule:
|
5
|
+
а: "a"
|
6
|
+
А: "A"
|
7
|
+
б: "b"
|
8
|
+
Б: "B"
|
9
|
+
в: "v"
|
10
|
+
В: "V"
|
11
|
+
г: "g"
|
12
|
+
Г: "G"
|
13
|
+
д: "d"
|
14
|
+
Д: "D"
|
15
|
+
е: "e"
|
16
|
+
Е: "E"
|
17
|
+
ж: "zh"
|
18
|
+
Ж: "Zh"
|
19
|
+
з: "z"
|
20
|
+
З: "Z"
|
21
|
+
и: "i"
|
22
|
+
И: "I"
|
23
|
+
й: "y"
|
24
|
+
Й: "Y"
|
25
|
+
к: "k"
|
26
|
+
К: "K"
|
27
|
+
л: "l"
|
28
|
+
Л: "L"
|
29
|
+
м: "m"
|
30
|
+
М: "M"
|
31
|
+
н: "n"
|
32
|
+
Н: "N"
|
33
|
+
о: "o"
|
34
|
+
О: "O"
|
35
|
+
п: "p"
|
36
|
+
П: "P"
|
37
|
+
р: "r"
|
38
|
+
Р: "R"
|
39
|
+
с: "s"
|
40
|
+
С: "S"
|
41
|
+
т: "t"
|
42
|
+
Т: "T"
|
43
|
+
у: "u"
|
44
|
+
У: "U"
|
45
|
+
ф: "f"
|
46
|
+
Ф: "F"
|
47
|
+
х: "h"
|
48
|
+
Х: "H"
|
49
|
+
ц: "ts"
|
50
|
+
Ц: "Ts"
|
51
|
+
ч: "ch"
|
52
|
+
Ч: "Ch"
|
53
|
+
ш: "sh"
|
54
|
+
Ш: "Sh"
|
55
|
+
щ: "sht"
|
56
|
+
Щ: "Sht"
|
57
|
+
ъ: "a"
|
58
|
+
Ъ: "A"
|
59
|
+
ь: "y"
|
60
|
+
Ь: "Y"
|
61
|
+
ю: "yu"
|
62
|
+
Ю: "Yu"
|
63
|
+
я: "ya"
|
64
|
+
Я: "Ya"
|
65
|
+
¢: "c"
|
66
|
+
£: "GBP "
|
67
|
+
¥: "CNY "
|
68
|
+
¨: '"'
|
69
|
+
©: "(c)"
|
70
|
+
®: " (R)"
|
71
|
+
±: "+-"
|
72
|
+
²: "^2"
|
73
|
+
³: "^3"
|
74
|
+
´: "'"
|
75
|
+
µ: "nM"
|
76
|
+
¼: "1/4"
|
77
|
+
½: "1/2"
|
78
|
+
¾: "3/4"
|
79
|
+
×: "*"
|
80
|
+
ˆ: "^"
|
81
|
+
˜: "~"
|
82
|
+
–: "-"
|
83
|
+
—: "-"
|
84
|
+
‘: "'"
|
85
|
+
’: "'"
|
86
|
+
‚: ","
|
87
|
+
“: '"'
|
88
|
+
”: '"'
|
89
|
+
„: '"'
|
90
|
+
…: "..."
|
91
|
+
′: "'"
|
92
|
+
″: '"'
|
93
|
+
‹: "<"
|
94
|
+
›: ">"
|
95
|
+
⁄: "/"
|
96
|
+
€: "EUR "
|
97
|
+
™: " (TM)"
|
98
|
+
←: "<-"
|
99
|
+
→: "->"
|
100
|
+
↔: "<->"
|
101
|
+
⇐: "<="
|
102
|
+
⇒: "=>"
|
103
|
+
⇔: "<=>"
|
104
|
+
−: "-"
|
105
|
+
∗: "*"
|
106
|
+
∼: "~"
|
107
|
+
≠: "=/="
|
108
|
+
≤: "<="
|
109
|
+
≥: "=>"
|
110
|
+
⋅: "-"
|
111
|
+
〈: "<"
|
112
|
+
〉: ">"
|
@@ -0,0 +1,82 @@
|
|
1
|
+
ca:
|
2
|
+
i18n:
|
3
|
+
transliterate:
|
4
|
+
rule:
|
5
|
+
¡: "!"
|
6
|
+
«: '"'
|
7
|
+
·: '-'
|
8
|
+
»: '"'
|
9
|
+
¿: "?"
|
10
|
+
à: "a"
|
11
|
+
À: "A"
|
12
|
+
á: "a"
|
13
|
+
Á: "A"
|
14
|
+
ç: "c"
|
15
|
+
Ç: "C"
|
16
|
+
è: "e"
|
17
|
+
È: "E"
|
18
|
+
é: "e"
|
19
|
+
É: "E"
|
20
|
+
ë: "e"
|
21
|
+
Ë: "E"
|
22
|
+
í: "i"
|
23
|
+
Í: "I"
|
24
|
+
ï: "i"
|
25
|
+
Ï: "I"
|
26
|
+
ò: "o"
|
27
|
+
Ò: "O"
|
28
|
+
ó: "o"
|
29
|
+
Ó: "O"
|
30
|
+
ú: "u"
|
31
|
+
Ú: "U"
|
32
|
+
ü: "u"
|
33
|
+
Ü: "U"
|
34
|
+
•: "-"
|
35
|
+
¢: "c"
|
36
|
+
£: "GBP "
|
37
|
+
¥: "CNY "
|
38
|
+
¨: '"'
|
39
|
+
©: "(c)"
|
40
|
+
®: " (R)"
|
41
|
+
±: "+-"
|
42
|
+
²: "^2"
|
43
|
+
³: "^3"
|
44
|
+
´: "'"
|
45
|
+
µ: "nM"
|
46
|
+
¼: "1/4"
|
47
|
+
½: "1/2"
|
48
|
+
¾: "3/4"
|
49
|
+
×: "*"
|
50
|
+
ˆ: "^"
|
51
|
+
˜: "~"
|
52
|
+
–: "-"
|
53
|
+
—: "-"
|
54
|
+
‘: "'"
|
55
|
+
’: "'"
|
56
|
+
‚: ","
|
57
|
+
“: '"'
|
58
|
+
”: '"'
|
59
|
+
„: '"'
|
60
|
+
…: "..."
|
61
|
+
′: "'"
|
62
|
+
″: '"'
|
63
|
+
‹: "<"
|
64
|
+
›: ">"
|
65
|
+
⁄: "/"
|
66
|
+
€: "EUR "
|
67
|
+
™: " (TM)"
|
68
|
+
←: "<-"
|
69
|
+
→: "->"
|
70
|
+
↔: "<->"
|
71
|
+
⇐: "<="
|
72
|
+
⇒: "=>"
|
73
|
+
⇔: "<=>"
|
74
|
+
−: "-"
|
75
|
+
∗: "*"
|
76
|
+
∼: "~"
|
77
|
+
≠: "=/="
|
78
|
+
≤: "<="
|
79
|
+
≥: "=>"
|
80
|
+
⋅: "-"
|
81
|
+
〈: "<"
|
82
|
+
〉: ">"
|