aozora2html 0.2.0 → 0.3.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/CHANGELOG.md +7 -0
- data/README.md +3 -0
- data/bin/aozora2html +5 -0
- data/lib/aozora2html.rb +3 -1
- data/lib/aozora2html/jis2ucs.rb +11237 -0
- data/lib/aozora2html/version.rb +1 -1
- data/lib/embed_gaiji_tag.rb +23 -0
- data/test/test_gaiji_tag.rb +7 -0
- data/test/test_tag_parser.rb +80 -0
- data/vendor/jis2ucs/README.md +26 -0
- data/vendor/jis2ucs/jisx0213-2004-mono.html +11308 -0
- data/vendor/jis2ucs/mkconv.rb +23 -0
- metadata +9 -2
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
print <<EOB
|
4
|
+
class Aozora2Html
|
5
|
+
JIS2UCS = {
|
6
|
+
EOB
|
7
|
+
|
8
|
+
in_header = true
|
9
|
+
|
10
|
+
File.open("jisx0213-2004-mono.html") do |f|
|
11
|
+
f.each_line do |line|
|
12
|
+
rows = line.split()
|
13
|
+
if rows[0] =~ /\d-\d\d-\d\d/ && rows[4] =~ /&#x/
|
14
|
+
print " :'",rows[0],"' => '",rows[4],"',\n"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
print <<EOB
|
20
|
+
}
|
21
|
+
end
|
22
|
+
EOB
|
23
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aozora2html
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aozorahack team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|
@@ -127,8 +127,10 @@ files:
|
|
127
127
|
- aozora2html.gemspec
|
128
128
|
- bin/aozora2html
|
129
129
|
- lib/aozora2html.rb
|
130
|
+
- lib/aozora2html/jis2ucs.rb
|
130
131
|
- lib/aozora2html/version.rb
|
131
132
|
- lib/aozora2html/zip.rb
|
133
|
+
- lib/embed_gaiji_tag.rb
|
132
134
|
- lib/t2hs.rb
|
133
135
|
- sample/chukiichiran_kinyurei.html
|
134
136
|
- sample/chukiichiran_kinyurei.txt
|
@@ -158,6 +160,10 @@ files:
|
|
158
160
|
- test/test_multiline_yokogumi_tag.rb
|
159
161
|
- test/test_okurigana_tag.rb
|
160
162
|
- test/test_ruby_tag.rb
|
163
|
+
- test/test_tag_parser.rb
|
164
|
+
- vendor/jis2ucs/README.md
|
165
|
+
- vendor/jis2ucs/jisx0213-2004-mono.html
|
166
|
+
- vendor/jis2ucs/mkconv.rb
|
161
167
|
homepage: https://github.com/aozorahack/aozora2html
|
162
168
|
licenses:
|
163
169
|
- CC0
|
@@ -210,4 +216,5 @@ test_files:
|
|
210
216
|
- test/test_multiline_yokogumi_tag.rb
|
211
217
|
- test/test_okurigana_tag.rb
|
212
218
|
- test/test_ruby_tag.rb
|
219
|
+
- test/test_tag_parser.rb
|
213
220
|
has_rdoc:
|