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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 531310930df10ff69b5c5804afc7f935f3014646
4
- data.tar.gz: 2370bb692b45d2ecde94c9a7c62913a0d748376d
3
+ metadata.gz: 1a05794bc03d0a1bde23a2c2935933ed847dedb0
4
+ data.tar.gz: 3dc7061012dc604cd4e5040db41c52915faedfa2
5
5
  SHA512:
6
- metadata.gz: f626776afd09a2897f8d124ef6bcd60f393fc4dd4a68ee5f1a9295be9ae54b8f85094c1d4577e8c00ba0600ca6f2c5e686ae7b097aadee25fe5332279d67a3d2
7
- data.tar.gz: cf3b020e6d721f465c060d53d391cef74bbb00d670f24ff9309ed216d777061d953a28614aed6d62382e8eaf6325b54700559780daa948a8f3f45689fd53f92f
6
+ metadata.gz: fd478e41e1677fdf54ae4a7be27dec958dffc886ad23401b4d43696125f8f3bd0aaf7024ae2930a281920609520fb9bdfa0de9b57c3ba9d3092b45acd0499101
7
+ data.tar.gz: eaae1316630e3d6e399f42bd73fedaabbb5ba66ab19a1f0815ffe3ecd6f6cdcf2ad43a384711d03ea8980a381ef1c9a388c52e8c6c9e764c5323cbf9233abd4a
@@ -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\n/, "\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
@@ -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
- 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,' )
15
+ self.tr( 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,/',
16
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,/' )
17
17
  end
18
18
 
19
19
  ##
@@ -1,3 +1,3 @@
1
1
  module Aozoragen
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
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.1
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-07 00:00:00.000000000 Z
11
+ date: 2014-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri