aozoragen 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aozoragen/syosetu.rb +2 -2
- data/lib/aozoragen/util.rb +2 -2
- data/lib/aozoragen/version.rb +1 -1
- 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: 1a05794bc03d0a1bde23a2c2935933ed847dedb0
|
4
|
+
data.tar.gz: 3dc7061012dc604cd4e5040db41c52915faedfa2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd478e41e1677fdf54ae4a7be27dec958dffc886ad23401b4d43696125f8f3bd0aaf7024ae2930a281920609520fb9bdfa0de9b57c3ba9d3092b45acd0499101
|
7
|
+
data.tar.gz: eaae1316630e3d6e399f42bd73fedaabbb5ba66ab19a1f0815ffe3ecd6f6cdcf2ad43a384711d03ea8980a381ef1c9a388c52e8c6c9e764c5323cbf9233abd4a
|
data/lib/aozoragen/syosetu.rb
CHANGED
@@ -26,7 +26,7 @@ module Aozoragen
|
|
26
26
|
(@index_html / '.subtitle a').each do |a|
|
27
27
|
uri = @index_uri + a.attr('href')
|
28
28
|
|
29
|
-
chapter = Nokogiri(open(uri, 'r:utf-8', &:read))
|
29
|
+
chapter = Nokogiri(open(uri, 'r:utf-8', &:read).tr('《》', '〈〉'))
|
30
30
|
text = get_chapter_text(chapter)
|
31
31
|
chapter_id = '%03d' % Pathname(uri.path).basename.to_s.to_i
|
32
32
|
yield({id: chapter_id, uri: uri, text: text})
|
@@ -37,7 +37,7 @@ module Aozoragen
|
|
37
37
|
text = ''
|
38
38
|
text << (chapter / '.novel_subtitle')[0].text.subhead
|
39
39
|
(chapter / '#novel_honbun').each do |page|
|
40
|
-
text << detag(page).gsub(/\n
|
40
|
+
text << detag(page).gsub(/\n{2,3}/, "\n").gsub(/^ ◆$/, '[#10字下げ]◆')
|
41
41
|
text << "[#改ページ]\n"
|
42
42
|
end
|
43
43
|
text.han2zen.for_tategaki
|
data/lib/aozoragen/util.rb
CHANGED
@@ -12,8 +12,8 @@ class String
|
|
12
12
|
# Half width of Alphabet and Digit to Full width.
|
13
13
|
#
|
14
14
|
def han2zen
|
15
|
-
self.tr( 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
|
16
|
-
'
|
15
|
+
self.tr( 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,/',
|
16
|
+
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,/' )
|
17
17
|
end
|
18
18
|
|
19
19
|
##
|
data/lib/aozoragen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aozoragen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TADA Tadashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|