character_to_description 0.1.2 → 0.1.3
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 +17 -16
- data/lib/character_to_description/version.rb +1 -1
- data/lib/character_to_description.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 238a4c54005ac74f56a4dffd5472eb9ed4d45a52
|
|
4
|
+
data.tar.gz: cf791830067b9401519cb5ca6586db4c735332be
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 358238e8cf9cce971ad476a47d6089a26e74f8cd16eb94b0232461ee02d2dafa4ae904ba9671d863ec48f45058039913218b0768d838fa434a27beb80f16752c
|
|
7
|
+
data.tar.gz: 43c46e9d040a9307c5fc0e1d68c1fe04186ecb67d59bb08c18db49de99dc2ae9df94fdb98e97e4d59fbc67689646960b2f85da4af8cc2068785b59c9e975eae6
|
data/README.md
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
# CharacterToDescription
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
This gem currently targets a Japanese character.
|
|
3
|
+
The gem for converting a character into its description.
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
This gem converts a character into its description by using the dictionary for NVDA, the screen reader for Windows.
|
|
6
|
+
There are many characters that are pronounced as the same in Japanese so that this gem currently targets to Japanese characters.
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Quick start
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
gem 'character_to_description'
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
And then execute:
|
|
10
|
+
Install the gem by the following command:
|
|
15
11
|
|
|
16
|
-
|
|
12
|
+
```shell
|
|
13
|
+
$ gem install character_to_description
|
|
14
|
+
```
|
|
17
15
|
|
|
18
|
-
|
|
16
|
+
Now you can convert a character into its description.
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
```ruby
|
|
19
|
+
require 'character_to_description'
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
class String
|
|
22
|
+
def to_description
|
|
23
|
+
CharacterToDescription::Dictionary.description self
|
|
24
|
+
end
|
|
25
|
+
end
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
>> require 'character_to_description'
|
|
26
|
-
>> puts 'あ'.to_description
|
|
27
|
+
puts 'あ'.to_description
|
|
27
28
|
```
|
|
28
29
|
|
|
29
30
|
## Development
|
|
@@ -23,13 +23,13 @@ module CharacterToDescription
|
|
|
23
23
|
when /[A-Z]/
|
|
24
24
|
"Upper case: #{character}"
|
|
25
25
|
when /\p{Hiragana}/
|
|
26
|
-
"
|
|
26
|
+
"ひらがなの「#{character}」"
|
|
27
27
|
when /\p{Katakana}/
|
|
28
|
-
"
|
|
28
|
+
"カタカナの「#{character}」"
|
|
29
29
|
when /[一-龠]/
|
|
30
30
|
@description_table[character]
|
|
31
31
|
else
|
|
32
|
-
"
|
|
32
|
+
"不明な文字"
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: character_to_description
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yoshiyuki Koyanagi
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-05-
|
|
11
|
+
date: 2016-05-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|