wenlin_db_scanner 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.
- data/VERSION +1 -1
- data/lib/wenlin_db_scanner/chars.rb +10 -5
- data/wenlin_db_scanner.gemspec +71 -0
- metadata +4 -3
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.1
|
|
@@ -103,17 +103,21 @@ module Chars
|
|
|
103
103
|
aside_text = aside[1...-1]
|
|
104
104
|
case aside_text[0]
|
|
105
105
|
when '='
|
|
106
|
-
entry.variants = aside_text[1..-1].chars.
|
|
106
|
+
entry.variants = aside_text[1..-1].chars.
|
|
107
|
+
reject { |c| c.codepoints.first < 128 }
|
|
107
108
|
header.gsub! aside, ''
|
|
108
109
|
when '!', '?'
|
|
109
110
|
entry.related ||= []
|
|
110
|
-
entry.related += aside_text[1..-1].chars.
|
|
111
|
+
entry.related += aside_text[1..-1].chars.
|
|
112
|
+
reject { |c| c.codepoints.first < 128 }
|
|
111
113
|
header.gsub! aside, ''
|
|
112
114
|
when 'F'
|
|
113
|
-
entry.complex_forms = aside_text[1..-1].chars.
|
|
115
|
+
entry.complex_forms = aside_text[1..-1].chars.
|
|
116
|
+
reject { |c| c.codepoints.first < 128 }
|
|
114
117
|
header.gsub! aside, ''
|
|
115
118
|
when 'S'
|
|
116
|
-
entry.simplified_forms = aside_text[1..-1].chars.
|
|
119
|
+
entry.simplified_forms = aside_text[1..-1].chars.
|
|
120
|
+
reject { |c| c.codepoints.first < 128 }
|
|
117
121
|
header.gsub! aside, ''
|
|
118
122
|
when 'u', 'U'
|
|
119
123
|
if /^Unihan/i =~ aside_text
|
|
@@ -142,7 +146,8 @@ module Chars
|
|
|
142
146
|
tag, data = line[1], line[2..-1].strip
|
|
143
147
|
case 'tag'
|
|
144
148
|
when 'c'
|
|
145
|
-
entry.components = data.chars.
|
|
149
|
+
entry.components = data.chars.
|
|
150
|
+
reject { |c| c.codepoints.first < 128 }
|
|
146
151
|
when 'r'
|
|
147
152
|
# NOTE: skipping remarks
|
|
148
153
|
when 'y'
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Generated by jeweler
|
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
|
+
# -*- encoding: utf-8 -*-
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |s|
|
|
7
|
+
s.name = "wenlin_db_scanner"
|
|
8
|
+
s.version = "0.2.1"
|
|
9
|
+
|
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
|
+
s.authors = ["Victor Costan"]
|
|
12
|
+
s.date = "2012-10-16"
|
|
13
|
+
s.description = "The Wenlin dictionary contains two great databases, the ABC English<->Chinese\ndictionary, and the Character Description Language (CDL). Unfortunately, this\ndata is wrapped by a less-than-great UI. This gem lets you extract the data so\nyou can build your own UI for it.\n"
|
|
14
|
+
s.email = "victor@costan.us"
|
|
15
|
+
s.executables = ["wenlin_dbdump", "wenlin_dict", "wenlin_hanzi", "wenlin_parts"]
|
|
16
|
+
s.extra_rdoc_files = [
|
|
17
|
+
"LICENSE.txt",
|
|
18
|
+
"README.md"
|
|
19
|
+
]
|
|
20
|
+
s.files = [
|
|
21
|
+
".document",
|
|
22
|
+
"Gemfile",
|
|
23
|
+
"Gemfile.lock",
|
|
24
|
+
"LICENSE.txt",
|
|
25
|
+
"README.md",
|
|
26
|
+
"Rakefile",
|
|
27
|
+
"VERSION",
|
|
28
|
+
"bin/wenlin_dbdump",
|
|
29
|
+
"bin/wenlin_dict",
|
|
30
|
+
"bin/wenlin_hanzi",
|
|
31
|
+
"bin/wenlin_parts",
|
|
32
|
+
"lib/wenlin_db_scanner.rb",
|
|
33
|
+
"lib/wenlin_db_scanner/chars.rb",
|
|
34
|
+
"lib/wenlin_db_scanner/db.rb",
|
|
35
|
+
"lib/wenlin_db_scanner/db_record.rb",
|
|
36
|
+
"lib/wenlin_db_scanner/dict.rb",
|
|
37
|
+
"lib/wenlin_db_scanner/speech_parts.rb",
|
|
38
|
+
"reversed/README.md",
|
|
39
|
+
"reversed/code.asm",
|
|
40
|
+
"reversed/magic.txt",
|
|
41
|
+
"reversed/notes.txt",
|
|
42
|
+
"wenlin_db_scanner.gemspec"
|
|
43
|
+
]
|
|
44
|
+
s.homepage = "http://github.com/pwnall/wenlin_db_scanner"
|
|
45
|
+
s.licenses = ["CC0"]
|
|
46
|
+
s.require_paths = ["lib"]
|
|
47
|
+
s.rubygems_version = "1.8.24"
|
|
48
|
+
s.summary = "Extracts the data from the Wenlin dictionary"
|
|
49
|
+
|
|
50
|
+
if s.respond_to? :specification_version then
|
|
51
|
+
s.specification_version = 3
|
|
52
|
+
|
|
53
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
54
|
+
s.add_development_dependency(%q<yard>, [">= 0.8.2.1"])
|
|
55
|
+
s.add_development_dependency(%q<rdoc>, [">= 3.12"])
|
|
56
|
+
s.add_development_dependency(%q<bundler>, [">= 1.2.0"])
|
|
57
|
+
s.add_development_dependency(%q<jeweler>, [">= 1.8.4"])
|
|
58
|
+
else
|
|
59
|
+
s.add_dependency(%q<yard>, [">= 0.8.2.1"])
|
|
60
|
+
s.add_dependency(%q<rdoc>, [">= 3.12"])
|
|
61
|
+
s.add_dependency(%q<bundler>, [">= 1.2.0"])
|
|
62
|
+
s.add_dependency(%q<jeweler>, [">= 1.8.4"])
|
|
63
|
+
end
|
|
64
|
+
else
|
|
65
|
+
s.add_dependency(%q<yard>, [">= 0.8.2.1"])
|
|
66
|
+
s.add_dependency(%q<rdoc>, [">= 3.12"])
|
|
67
|
+
s.add_dependency(%q<bundler>, [">= 1.2.0"])
|
|
68
|
+
s.add_dependency(%q<jeweler>, [">= 1.8.4"])
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wenlin_db_scanner
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-
|
|
12
|
+
date: 2012-10-16 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: yard
|
|
@@ -116,6 +116,7 @@ files:
|
|
|
116
116
|
- reversed/code.asm
|
|
117
117
|
- reversed/magic.txt
|
|
118
118
|
- reversed/notes.txt
|
|
119
|
+
- wenlin_db_scanner.gemspec
|
|
119
120
|
homepage: http://github.com/pwnall/wenlin_db_scanner
|
|
120
121
|
licenses:
|
|
121
122
|
- CC0
|
|
@@ -131,7 +132,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
131
132
|
version: '0'
|
|
132
133
|
segments:
|
|
133
134
|
- 0
|
|
134
|
-
hash:
|
|
135
|
+
hash: -4220943337954764968
|
|
135
136
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
137
|
none: false
|
|
137
138
|
requirements:
|