narou 3.1.4 → 3.1.5
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 +4 -4
- data/ChangeLog.md +6 -0
- data/README.md +6 -0
- data/lib/converterbase.rb +1 -0
- data/lib/novelconverter.rb +5 -3
- data/lib/novelsetting.rb +8 -0
- data/lib/version.rb +1 -1
- data/narou.gemspec +6 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c64825f0e9ba719bdba129092a9490baa21b2e9
|
4
|
+
data.tar.gz: cd27b5ff3a870649f44cc24d8453631b3fee3a95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f87b45303c55d9f5e1370bb5752aa78f95aeffddcffb4dcd706f96eda67a7a230a352f5d00ecca8e0baac9e8efcc3053313b08032d43f8f53a71ad2225e863d4
|
7
|
+
data.tar.gz: 18d3a9e31c572d46cf804163db49937aec9068f978f00c5652b680ade13f913d59d74c2bfae20b81c35047232632a5eb2ad870462bb6007a0a7d231156b14282
|
data/ChangeLog.md
CHANGED
data/README.md
CHANGED
data/lib/converterbase.rb
CHANGED
@@ -1307,6 +1307,7 @@ class ConverterBase
|
|
1307
1307
|
return "" if text == ""
|
1308
1308
|
output_text_dir = @output_text_dir || @setting.archive_path
|
1309
1309
|
@text_type = text_type
|
1310
|
+
text.force_encoding(Encoding::UTF_8)
|
1310
1311
|
io = StringIO.new(rstrip_all_lines(text))
|
1311
1312
|
(io = before_convert(io)).rewind
|
1312
1313
|
(io = convert_main(io)).rewind
|
data/lib/novelconverter.rb
CHANGED
@@ -352,9 +352,9 @@ class NovelConverter
|
|
352
352
|
def initialize(setting, output_filename = nil, display_inspector = false, output_text_dir = nil)
|
353
353
|
@setting = setting
|
354
354
|
@novel_id = setting.id
|
355
|
-
@novel_author = setting.author
|
356
|
-
@novel_title = setting.title
|
357
|
-
@output_filename = output_filename
|
355
|
+
@novel_author = setting.include?("novel_author") ? setting["novel_author"] : setting.author
|
356
|
+
@novel_title = setting.include?("novel_title") ? setting["novel_title"] : setting.title
|
357
|
+
@output_filename = (output_filename || setting.output_filename)
|
358
358
|
@inspector = Inspector.new(@setting)
|
359
359
|
@illustration = Illustration.new(@setting, @inspector)
|
360
360
|
@display_inspector = display_inspector
|
@@ -427,6 +427,8 @@ class NovelConverter
|
|
427
427
|
cover_chuki = create_cover_chuki
|
428
428
|
device = Narou.get_device
|
429
429
|
setting = @setting
|
430
|
+
toc["title"] = setting["novel_title"] if setting.include?("novel_title")
|
431
|
+
toc["author"] = setting["novel_author"] if setting.include?("novel_author")
|
430
432
|
processed_title = decorate_title(toc["title"])
|
431
433
|
tempalte_name = (device && device.ibunko? ? NOVEL_TEXT_TEMPLATE_NAME_FOR_IBUNKO : NOVEL_TEXT_TEMPLATE_NAME)
|
432
434
|
Template.get(tempalte_name, binding, 1.1)
|
data/lib/novelsetting.rb
CHANGED
@@ -193,6 +193,14 @@ class NovelSetting
|
|
193
193
|
@settings[name] = value
|
194
194
|
end
|
195
195
|
|
196
|
+
def output_filename
|
197
|
+
@settings.fetch("output_filename", nil)
|
198
|
+
end
|
199
|
+
|
200
|
+
def include?(key)
|
201
|
+
@settings.include?(key)
|
202
|
+
end
|
203
|
+
|
196
204
|
#
|
197
205
|
# replace.txt による置換定義を読み込む
|
198
206
|
#
|
data/lib/version.rb
CHANGED
data/narou.gemspec
CHANGED
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.1.
|
4
|
+
version: 3.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- whiteleaf7
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: termcolorlight
|
@@ -487,6 +487,12 @@ metadata: {}
|
|
487
487
|
post_install_message: |
|
488
488
|
************************************************************
|
489
489
|
|
490
|
+
3.1.5: 2017/08/27
|
491
|
+
------------------
|
492
|
+
#### 修正内容
|
493
|
+
- 変換時にエラーになる小説に対応
|
494
|
+
|
495
|
+
|
490
496
|
3.1.4 : 2017/08/22
|
491
497
|
------------------
|
492
498
|
#### 追加機能
|