narou 3.3.2 → 3.4.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of narou might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f09ac1c46f81f95ba960a3133e3496c495250406ca46bbf46bd00f89fa25f51
4
- data.tar.gz: 5eed031b2b27c19389fb6ce445ecf82a1917ca327510763045f4efe9f4d01a2d
3
+ metadata.gz: 1fa2e3994fbe19d02b7a608ea94d2023ad5c3822237acc9444b8aa674266f8db
4
+ data.tar.gz: 64dfe55036a0d3293f63420fbfdd9935093a1ccfd564a145faea4da63385e4d7
5
5
  SHA512:
6
- metadata.gz: 542566318062fd3e2b9f08412e37629c479d9dccfd5afc72ff96ae8cf8eeb621de9bd5d285fa8fb1f182a37bc6a873eb71da7d453fd9ab55b9fa75ddb028bfca
7
- data.tar.gz: 841d2cb8f90d0fd41506fd397252598579747c1876a3bf1bec13a0f364d8a7778edcabb89771f1479b106b0b4375a798d9c38852fd2b7971e98df39b8aacdb9f
6
+ metadata.gz: 218c3f08bc767a48be07a15fe37807d62c76211d530b7ca98aaa9eb3de7d9a9624dff37b0878f82de4ee40657a52d32afd850692beeb015f83480f787cd7d663
7
+ data.tar.gz: 707874da66376d3f5d2376c1cc1aeb51c70980d7b65804214a0a71758235c48d8f34596bb7e9bff585232aea01d4633e02370a54580c05d6788b72cd6a405b26
@@ -1,5 +1,16 @@
1
1
  更新履歴 - ChangeLog
2
2
  ====================
3
+
4
+ 3.4.0: 2018/12/18
5
+ ------------------
6
+ #### 仕様変更
7
+ - WEB UI の小説リストにおいて、ID のソート順を降順からに変更しました
8
+
9
+ #### 修正内容
10
+ - Linux と第10世代 Kindle PW の組み合わせで Eject 時にエラーが起こるのを修正
11
+ - 小説家になろうの仕様変更に対応
12
+
13
+
3
14
  3.3.2: 2018/10/14
4
15
  ------------------
5
16
  #### 修正内容
@@ -22,7 +22,7 @@ PATH
22
22
  GEM
23
23
  remote: https://rubygems.org/
24
24
  specs:
25
- activesupport (5.2.1)
25
+ activesupport (5.2.1.1)
26
26
  concurrent-ruby (~> 1.0, >= 1.0.2)
27
27
  i18n (>= 0.7, < 2)
28
28
  minitest (~> 5.1)
@@ -37,7 +37,7 @@ GEM
37
37
  debug_inspector (>= 0.0.1)
38
38
  byebug (10.0.2)
39
39
  coderay (1.1.2)
40
- concurrent-ruby (1.0.5)
40
+ concurrent-ruby (1.1.3)
41
41
  debug_inspector (0.0.3)
42
42
  diff-lcs (1.3)
43
43
  docile (1.3.1)
@@ -47,14 +47,14 @@ GEM
47
47
  ffi (1.9.25-java)
48
48
  haml (4.0.7)
49
49
  tilt
50
- i18n (1.1.0)
50
+ i18n (1.1.1)
51
51
  concurrent-ruby (~> 1.0)
52
52
  json (2.1.0)
53
53
  json (2.1.0-java)
54
54
  mail (2.6.6)
55
55
  mime-types (>= 1.16, < 4)
56
56
  memoist (0.11.0)
57
- method_source (0.9.0)
57
+ method_source (0.9.2)
58
58
  mime-types (3.2.2)
59
59
  mime-types-data (~> 3.2015)
60
60
  mime-types-data (3.2018.0812)
@@ -63,17 +63,17 @@ GEM
63
63
  open_uri_redirections (0.2.1)
64
64
  pony (1.12)
65
65
  mail (>= 2.0)
66
- pry (0.11.3)
66
+ pry (0.12.2)
67
67
  coderay (~> 1.1.0)
68
68
  method_source (~> 0.9.0)
69
- pry (0.11.3-java)
69
+ pry (0.12.2-java)
70
70
  coderay (~> 1.1.0)
71
71
  method_source (~> 0.9.0)
72
72
  spoon (~> 0.0)
73
73
  pry-byebug (3.6.0)
74
74
  byebug (~> 10.0)
75
75
  pry (~> 0.10)
76
- rack (1.6.10)
76
+ rack (1.6.11)
77
77
  rack-protection (1.5.5)
78
78
  rack
79
79
  rack-test (1.1.0)
@@ -87,7 +87,7 @@ GEM
87
87
  rspec-mocks (~> 3.8.0)
88
88
  rspec-core (3.8.0)
89
89
  rspec-support (~> 3.8.0)
90
- rspec-expectations (3.8.1)
90
+ rspec-expectations (3.8.2)
91
91
  diff-lcs (>= 1.2.0, < 2.0)
92
92
  rspec-support (~> 3.8.0)
93
93
  rspec-mocks (3.8.0)
@@ -99,7 +99,7 @@ GEM
99
99
  rspec_junit_formatter (0.4.1)
100
100
  rspec-core (>= 2, < 4, != 2.12.0)
101
101
  rubyzip (1.2.2)
102
- sass (3.6.0)
102
+ sass (3.7.2)
103
103
  sass-listen (~> 4.0.0)
104
104
  sass-listen (4.0.0)
105
105
  rb-fsevent (~> 0.9, >= 0.9.4)
@@ -125,7 +125,8 @@ GEM
125
125
  systemu (2.6.5)
126
126
  termcolorlight (1.1.1)
127
127
  thread_safe (0.3.6)
128
- tilt (2.0.8)
128
+ thread_safe (0.3.6-java)
129
+ tilt (2.0.9)
129
130
  timecop (0.9.1)
130
131
  tzinfo (1.2.5)
131
132
  thread_safe (~> 0.1)
data/README.md CHANGED
@@ -34,6 +34,16 @@ Narou.rb - 小説家になろうダウンローダー&電子書籍端末での
34
34
  更新履歴 - ChangeLog
35
35
  --------------------
36
36
 
37
+ 3.4.0: 2018/12/18
38
+ ------------------
39
+ #### 仕様変更
40
+ - WEB UI の小説リストにおいて、ID のソート順を降順からに変更しました
41
+
42
+ #### 修正内容
43
+ - Linux と第10世代 Kindle PW の組み合わせで Eject 時にエラーが起こるのを修正
44
+ - 小説家になろうの仕様変更に対応
45
+
46
+
37
47
  3.3.2: 2018/10/14
38
48
  ------------------
39
49
  #### 修正内容
@@ -55,14 +55,17 @@ class Device
55
55
 
56
56
  def eject(volume_name)
57
57
  device, uhelper = device_mount_info(volume_name)
58
+ # Kindle第10世代への対応
59
+ # https://github.com/whiteleaf7/narou/issues/314
60
+ device_chopped = device.gsub(/\d+$/, "")
58
61
 
59
62
  case uhelper
60
63
  when "udisks"
61
64
  commands = ["udisks --unmount #{device}",
62
- "udisks --detach #{device.chop}"]
65
+ "udisks --detach #{device_chopped}"]
63
66
  when "udisks2"
64
67
  commands = ["udisksctl unmount -b #{device} --no-user-interaction",
65
- "udisksctl power-off -b #{device.chop} --no-user-interaction"]
68
+ "udisksctl power-off -b #{device_chopped} --no-user-interaction"]
66
69
  else
67
70
  raise Device::CantEject, "udisks または udisks2 によって自動マウントされたデバイスではありません。"
68
71
  end
@@ -1082,27 +1082,19 @@ class Downloader
1082
1082
  return @section_download_cache[index] if @section_download_cache[index]
1083
1083
  sleep_for_download
1084
1084
  href = subtitle_info["href"]
1085
- if @setting["is_narou"]
1086
- subtitle_url = @setting.replace_group_values("txtdownload_url", subtitle_info)
1087
- elsif href[0] == "/"
1085
+ if href[0] == "/"
1088
1086
  subtitle_url = @setting["top_url"] + href
1089
1087
  else
1090
1088
  subtitle_url = @setting["toc_url"] + href
1091
1089
  end
1092
1090
  raw = download_raw_data(subtitle_url)
1093
- if @setting["is_narou"]
1094
- raw = Helper.restore_entity(raw)
1095
- save_raw_data(raw, subtitle_info)
1096
- element = extract_elements_in_section(raw, subtitle_info["subtitle"])
1097
- else
1098
- save_raw_data(raw, subtitle_info, ".html")
1099
- %w(introduction postscript body).each { |type| @setting[type] = nil }
1100
- @setting.multi_match(raw, "body_pattern", "introduction_pattern", "postscript_pattern")
1101
- element = { "data_type" => "html" }
1102
- %w(introduction postscript body).each { |type|
1103
- element[type] = @setting[type].to_s
1104
- }
1105
- end
1091
+ save_raw_data(raw, subtitle_info, ".html")
1092
+ %w(introduction postscript body).each { |type| @setting[type] = nil }
1093
+ @setting.multi_match(raw, "body_pattern", "introduction_pattern", "postscript_pattern")
1094
+ element = { "data_type" => "html" }
1095
+ %w(introduction postscript body).each { |type|
1096
+ element[type] = @setting[type].to_s
1097
+ }
1106
1098
  subtitle_info["download_time"] = Time.now
1107
1099
  @section_download_cache[index] = element
1108
1100
  element
@@ -26,6 +26,7 @@ class Illustration
26
26
  def scanner(source, &block)
27
27
  source.gsub!(/[#挿絵((.+?))入る]/) do |match|
28
28
  url = $1
29
+ url = "https:#{url}" if url.start_with?("//")
29
30
  if url =~ URI.regexp
30
31
  path = download_image(url)
31
32
  path ? block.call(make_illust_chuki(path)) : ""
@@ -5,5 +5,5 @@
5
5
  #
6
6
 
7
7
  module Narou
8
- VERSION = "3.3.2"
8
+ VERSION = "3.4.0"
9
9
  end
@@ -169,6 +169,7 @@ $(function() {
169
169
  {
170
170
  title: "ID",
171
171
  data: "id", className: "column-id text-center", visible: cell_visible.id,
172
+ orderSequence: [ "desc", "asc" ],
172
173
  width: "20px"
173
174
  },
174
175
  // UPDATEした日時
@@ -32,10 +32,14 @@ Gem::Specification.new do |gem|
32
32
  install_message = <<-EOS
33
33
  #{"*" * 60}
34
34
 
35
- 3.3.2: 2018/10/14
35
+ 3.4.0: 2018/12/18
36
36
  ------------------
37
+ #### 仕様変更
38
+ - WEB UI の小説リストにおいて、ID のソート順を降順からに変更しました
39
+
37
40
  #### 修正内容
38
- - バックアップ中に変換が実行されるとバックアップがクラッシュする場合があった
41
+ - Linux と第10世代 Kindle PW の組み合わせで Eject 時にエラーが起こるのを修正
42
+ - 小説家になろうの仕様変更に対応
39
43
 
40
44
  #{"*" * 60}
41
45
  EOS
@@ -10,7 +10,7 @@ append_title_to_folder_name: yes
10
10
  title_strip_pattern: null
11
11
  cookie: over18=yes
12
12
  sitename: *name
13
- version: 1.0
13
+ version: 2.0
14
14
 
15
15
  # ------------------------------------------------------------
16
16
  # 目次取得設定
@@ -29,11 +29,28 @@ subtitles: |-
29
29
  </dt>
30
30
  </dl>
31
31
 
32
+ # ------------------------------------------------------------
33
+ # 本文取得設定
34
+
35
+ body_pattern: |-
36
+ <div id="novel_honbun" class="novel_view">
37
+ (?<body>.+?)
38
+ ?</div>
39
+ introduction_pattern: |-
40
+ <div id="novel_p" class="novel_view">
41
+ (?<introduction>.+?)
42
+ ?</div>
43
+ postscript_pattern: |-
44
+ <div id="novel_a" class="novel_view">
45
+ (?<postscript>.+?)
46
+ ?</div>
47
+
48
+ illust_current_url: null
49
+ illust_grep_pattern: null
50
+
32
51
  # ------------------------------------------------------------
33
52
  # 特殊な設定
34
53
  is_narou: true
35
- tcode: <li><a href="\\k<top_url>/txtdownload/top/ncode/(?<tcode>\d+?)/" onclick
36
- txtdownload_url: \\k<top_url>/txtdownload/dlstart/ncode/\\k<tcode>/?no=\\k<index>
37
54
  narou_api_url: https://api.syosetu.com/novelapi/api/
38
55
 
39
56
  # ------------------------------------------------------------
@@ -15,7 +15,7 @@ sitename: |-
15
15
  <th>掲載サイト</th>
16
16
  <td>(?<sitename>.+?)\(.+\)</td>
17
17
 
18
- version: 1.0
18
+ version: 2.0
19
19
 
20
20
  # ------------------------------------------------------------
21
21
  # 目次取得設定
@@ -34,11 +34,27 @@ subtitles: |-
34
34
  </dt>
35
35
  </dl>
36
36
 
37
+ # ------------------------------------------------------------
38
+ # 本文取得設定
39
+ body_pattern: |-
40
+ <div id="novel_honbun" class="novel_view">
41
+ (?<body>.+?)
42
+ ?</div>
43
+ introduction_pattern: |-
44
+ <div id="novel_p" class="novel_view">
45
+ (?<introduction>.+?)
46
+ ?</div>
47
+ postscript_pattern: |-
48
+ <div id="novel_a" class="novel_view">
49
+ (?<postscript>.+?)
50
+ ?</div>
51
+
52
+ illust_current_url: null
53
+ illust_grep_pattern: null
54
+
37
55
  # ------------------------------------------------------------
38
56
  # 特殊な設定
39
57
  is_narou: true
40
- tcode: <li><a href="\\k<top_url>/txtdownload/top/ncode/(?<tcode>\d+?)/" onclick
41
- txtdownload_url: \\k<top_url>/txtdownload/dlstart/ncode/\\k<tcode>/?no=\\k<index>
42
58
  narou_api_url: https://api.syosetu.com/novel18api/api/
43
59
 
44
60
  # ------------------------------------------------------------
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: narou
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.2
4
+ version: 3.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - whiteleaf7
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-14 00:00:00.000000000 Z
11
+ date: 2018-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: termcolorlight
@@ -548,10 +548,14 @@ metadata: {}
548
548
  post_install_message: |
549
549
  ************************************************************
550
550
 
551
- 3.3.2: 2018/10/14
551
+ 3.4.0: 2018/12/18
552
552
  ------------------
553
+ #### 仕様変更
554
+ - WEB UI の小説リストにおいて、ID のソート順を降順からに変更しました
555
+
553
556
  #### 修正内容
554
- - バックアップ中に変換が実行されるとバックアップがクラッシュする場合があった
557
+ - Linux と第10世代 Kindle PW の組み合わせで Eject 時にエラーが起こるのを修正
558
+ - 小説家になろうの仕様変更に対応
555
559
 
556
560
  ************************************************************
557
561
  rdoc_options: []