aozora2html 2.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rubocop.yml +19 -0
- data/.github/workflows/ruby.yml +5 -3
- data/.gitignore +1 -0
- data/.rubocop.yml +38 -151
- data/.rubocop_todo.yml +7 -0
- data/CHANGELOG.md +41 -0
- data/Gemfile +2 -0
- data/Guardfile +3 -1
- data/HACKING.md +45 -0
- data/README.md +14 -6
- data/Rakefile +12 -5
- data/aozora2html.gemspec +25 -23
- data/bin/aozora2html +21 -19
- data/lib/aozora2html/accent_parser.rb +62 -54
- data/lib/aozora2html/error.rb +5 -4
- data/lib/aozora2html/header.rb +20 -18
- data/lib/aozora2html/i18n.rb +40 -20
- data/lib/aozora2html/midashi_counter.rb +32 -0
- data/lib/aozora2html/ruby_buffer.rb +63 -28
- data/lib/aozora2html/string_refinements.rb +36 -0
- data/lib/aozora2html/style_stack.rb +6 -0
- data/lib/aozora2html/tag/accent.rb +10 -12
- data/lib/aozora2html/tag/block.rb +11 -9
- data/lib/aozora2html/tag/chitsuki.rb +6 -2
- data/lib/aozora2html/tag/dakuten_katakana.rb +10 -8
- data/lib/aozora2html/tag/decorate.rb +4 -3
- data/lib/aozora2html/tag/dir.rb +4 -2
- data/lib/aozora2html/tag/editor_note.rb +7 -4
- data/lib/aozora2html/tag/embed_gaiji.rb +15 -11
- data/lib/aozora2html/tag/font_size.rb +5 -2
- data/lib/aozora2html/tag/gaiji.rb +4 -3
- data/lib/aozora2html/tag/img.rb +4 -4
- data/lib/aozora2html/tag/indent.rb +3 -3
- data/lib/aozora2html/tag/inline.rb +10 -7
- data/lib/aozora2html/tag/inline_caption.rb +4 -2
- data/lib/aozora2html/tag/inline_font_size.rb +4 -3
- data/lib/aozora2html/tag/inline_keigakomi.rb +4 -2
- data/lib/aozora2html/tag/inline_yokogumi.rb +4 -3
- data/lib/aozora2html/tag/jisage.rb +3 -1
- data/lib/aozora2html/tag/jizume.rb +3 -0
- data/lib/aozora2html/tag/kaeriten.rb +4 -2
- data/lib/aozora2html/tag/keigakomi.rb +15 -9
- data/lib/aozora2html/tag/kunten.rb +4 -4
- data/lib/aozora2html/tag/midashi.rb +3 -1
- data/lib/aozora2html/tag/multiline.rb +3 -0
- data/lib/aozora2html/tag/multiline_caption.rb +6 -8
- data/lib/aozora2html/tag/multiline_chitsuki.rb +3 -1
- data/lib/aozora2html/tag/multiline_jisage.rb +3 -1
- data/lib/aozora2html/tag/multiline_midashi.rb +6 -3
- data/lib/aozora2html/tag/multiline_style.rb +5 -3
- data/lib/aozora2html/tag/multiline_yokogumi.rb +6 -9
- data/lib/aozora2html/tag/okurigana.rb +4 -2
- data/lib/aozora2html/tag/oneline_chitsuki.rb +3 -2
- data/lib/aozora2html/tag/oneline_indent.rb +8 -1
- data/lib/aozora2html/tag/oneline_jisage.rb +3 -0
- data/lib/aozora2html/tag/reference_mentioned.rb +22 -21
- data/lib/aozora2html/tag/ruby.rb +174 -70
- data/lib/aozora2html/tag/un_embed_gaiji.rb +8 -2
- data/lib/aozora2html/tag.rb +40 -38
- data/lib/aozora2html/tag_parser.rb +23 -16
- data/lib/aozora2html/text_buffer.rb +50 -0
- data/lib/aozora2html/utils.rb +113 -50
- data/lib/aozora2html/version.rb +3 -1
- data/lib/aozora2html/yaml_loader.rb +8 -2
- data/lib/aozora2html/zip.rb +4 -0
- data/lib/aozora2html.rb +1329 -3
- data/lib/extensions.rb +2 -34
- data/lib/jstream.rb +96 -25
- data/sample/chukiichiran_kinyurei.html +42 -29
- data/sample/chukiichiran_kinyurei.txt +16 -3
- metadata +80 -83
- data/.travis.yml +0 -12
- data/lib/t2hs.rb +0 -1607
- data/test/test_aozora2html.rb +0 -379
- data/test/test_aozora_accent_parser.rb +0 -31
- data/test/test_command_parse.rb +0 -213
- data/test/test_compat.rb +0 -11
- data/test/test_dakuten_katakana_tag.rb +0 -27
- data/test/test_decorate_tag.rb +0 -24
- data/test/test_dir_tag.rb +0 -24
- data/test/test_editor_note_tag.rb +0 -22
- data/test/test_exception.rb +0 -23
- data/test/test_font_size_tag.rb +0 -41
- data/test/test_gaiji_tag.rb +0 -49
- data/test/test_header.rb +0 -60
- data/test/test_helper.rb +0 -5
- data/test/test_i18n.rb +0 -23
- data/test/test_img_tag.rb +0 -23
- data/test/test_inline_caption_tag.rb +0 -24
- data/test/test_inline_font_size_tag.rb +0 -34
- data/test/test_inline_keigakomi_tag.rb +0 -24
- data/test/test_inline_yokogumi_tag.rb +0 -24
- data/test/test_jizume_tag.rb +0 -25
- data/test/test_jstream.rb +0 -57
- data/test/test_kaeriten_tag.rb +0 -24
- data/test/test_keigakomi_tag.rb +0 -31
- data/test/test_midashi_tag.rb +0 -38
- data/test/test_multiline_caption_tag.rb +0 -25
- data/test/test_multiline_midashi_tag.rb +0 -55
- data/test/test_multiline_style_tag.rb +0 -25
- data/test/test_multiline_yokogumi_tag.rb +0 -25
- data/test/test_okurigana_tag.rb +0 -24
- data/test/test_ruby_parse.rb +0 -130
- data/test/test_ruby_tag.rb +0 -24
- data/test/test_tag_parser.rb +0 -80
data/lib/extensions.rb
CHANGED
@@ -1,38 +1,6 @@
|
|
1
|
-
#
|
2
|
-
# 1.8 like to_s method to Array
|
3
|
-
class Array
|
4
|
-
def to_s
|
5
|
-
self.join
|
6
|
-
end
|
7
|
-
end
|
8
|
-
|
9
|
-
class String
|
10
|
-
|
11
|
-
# used in Aozora2Html#char_type
|
12
|
-
def char_type
|
13
|
-
ch = self
|
14
|
-
if ch.match(Regexp.new("[ぁ-んゝゞ]".encode("shift_jis")))
|
15
|
-
:hiragana
|
16
|
-
elsif ch.match(Regexp.new("[ァ-ンーヽヾヴ]".encode("shift_jis")))
|
17
|
-
:katakana
|
18
|
-
elsif ch.match(Regexp.new("[0-9A-Za-zΑ-Ωα-ωА-Яа-я−&’,.]".encode("shift_jis")))
|
19
|
-
:zenkaku
|
20
|
-
elsif ch.match(Regexp.new("[A-Za-z0-9#\\-\\&'\\,]".encode("shift_jis")))
|
21
|
-
:hankaku
|
22
|
-
elsif ch.match(Regexp.new("[亜-熙々※仝〆〇ヶ]".encode("shift_jis")))
|
23
|
-
:kanji
|
24
|
-
elsif ch.match(/[\.\;\"\?\!\)]/)
|
25
|
-
:hankaku_terminate
|
26
|
-
else
|
27
|
-
:else
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
def to_sjis
|
32
|
-
self.encode("shift_jis")
|
33
|
-
end
|
34
|
-
end
|
1
|
+
# frozen_string_literal: true
|
35
2
|
|
3
|
+
# Kernel extension
|
36
4
|
module Kernel
|
37
5
|
alias original_kernel_puts puts
|
38
6
|
|
data/lib/jstream.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'aozora2html/error'
|
4
|
+
require_relative 'aozora2html/i18n'
|
3
5
|
|
4
6
|
##
|
5
7
|
# Stream class for reading a file.
|
@@ -9,60 +11,129 @@ require "aozora2html/i18n"
|
|
9
11
|
# when found line terminator except CR+LF, exit.
|
10
12
|
#
|
11
13
|
class Jstream
|
14
|
+
CR = "\r"
|
15
|
+
LF = "\n"
|
16
|
+
CRLF = CR + LF
|
12
17
|
|
13
|
-
|
14
|
-
|
18
|
+
# 初期化と同時に、いったん最初の行をscanして、改行コードがCR+LFかどうか調べる。
|
19
|
+
# CR+LFでない場合はエラーメッセージを出力してexitする(!)
|
20
|
+
#
|
21
|
+
# TODO: 将来的にはさすがにexitまではしないよう、仕様を変更する?
|
15
22
|
def initialize(file_io)
|
16
23
|
@line = 0
|
17
|
-
@
|
24
|
+
@current_char = nil
|
18
25
|
@file = file_io
|
26
|
+
|
19
27
|
begin
|
20
|
-
|
28
|
+
tmp = @file.readline.chomp!("\r\n")
|
29
|
+
raise Aozora2Html::Error, Aozora2Html::I18n.t(:use_crlf) unless tmp
|
21
30
|
rescue Aozora2Html::Error => e
|
22
31
|
puts e.message(1)
|
23
32
|
if e.is_a?(Aozora2Html::Error)
|
24
33
|
exit(2)
|
25
34
|
end
|
35
|
+
ensure
|
36
|
+
@file.rewind
|
26
37
|
end
|
27
38
|
end
|
28
39
|
|
29
40
|
def inspect
|
30
|
-
"#<jcode-stream input
|
41
|
+
"#<jcode-stream input #{@file.inspect}>"
|
31
42
|
end
|
32
43
|
|
44
|
+
# 1文字読み込んで返す
|
45
|
+
#
|
46
|
+
# 行末の場合は(1文字ではなく)CR+LFを返す
|
47
|
+
# EOFまで到達すると :eof というシンボルを返す
|
48
|
+
#
|
49
|
+
# TODO: EOFの場合はnilを返すように変更する?
|
33
50
|
def read_char
|
34
|
-
|
35
|
-
|
51
|
+
char = @file.getc
|
52
|
+
|
53
|
+
if char == CR
|
54
|
+
char2 = @file.getc
|
55
|
+
if char2 != LF
|
56
|
+
raise Aozora2Html::Error, Aozora2Html::I18n.t(:use_crlf)
|
57
|
+
end
|
58
|
+
|
36
59
|
@line += 1
|
37
|
-
@
|
38
|
-
|
39
|
-
|
40
|
-
|
60
|
+
@current_char = char + char2
|
61
|
+
elsif char.nil?
|
62
|
+
@current_char = :eof
|
63
|
+
else
|
64
|
+
@current_char = char
|
41
65
|
end
|
42
66
|
|
67
|
+
@current_char
|
68
|
+
end
|
69
|
+
|
70
|
+
# pos個分の文字を先読みし、最後の文字を返す
|
71
|
+
#
|
72
|
+
# ファイルディスクリプタは移動しない(実行前の位置まで戻す)
|
73
|
+
# 行末の場合は(1文字ではなく)CR+LFを返す
|
74
|
+
# 行末の先に進んだ場合の挙動は未定義になる
|
75
|
+
def peek_char(pos)
|
76
|
+
original_pos = @file.pos
|
77
|
+
char = nil
|
78
|
+
|
43
79
|
begin
|
44
|
-
|
45
|
-
|
46
|
-
|
80
|
+
pos.times { read_char }
|
81
|
+
|
82
|
+
char = @file.getc
|
83
|
+
if char == CR
|
84
|
+
char2 = @file.getc
|
85
|
+
if char2 != LF
|
86
|
+
raise Aozora2Html::Error, Aozora2Html::I18n.t(:use_crlf)
|
87
|
+
end
|
88
|
+
|
89
|
+
char += char2
|
90
|
+
end
|
91
|
+
ensure
|
92
|
+
@file.seek(original_pos)
|
47
93
|
end
|
48
|
-
|
94
|
+
|
95
|
+
char
|
49
96
|
end
|
50
97
|
|
51
|
-
|
52
|
-
|
98
|
+
# 指定された終端文字(1文字のStringかCRLF)まで読み込む
|
99
|
+
#
|
100
|
+
# @param [String] endchar 終端文字
|
101
|
+
def read_to(endchar)
|
102
|
+
buf = +''
|
103
|
+
loop do
|
104
|
+
char = read_char
|
105
|
+
break if char == endchar
|
106
|
+
|
107
|
+
if char.is_a?(Symbol)
|
108
|
+
print endchar
|
109
|
+
end
|
110
|
+
buf.concat(char)
|
111
|
+
end
|
112
|
+
buf
|
113
|
+
end
|
114
|
+
|
115
|
+
# 1行読み込み
|
116
|
+
#
|
117
|
+
# @return [String] 読み込んだ文字列を返す
|
118
|
+
#
|
119
|
+
def read_line
|
120
|
+
read_to("\r\n")
|
53
121
|
end
|
54
122
|
|
55
123
|
def close
|
56
124
|
@file.close
|
57
125
|
end
|
58
126
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
127
|
+
# 現在の行数を返す
|
128
|
+
#
|
129
|
+
# 何も読み込む前は0、読み込み始めの最初の文字から\r\nまでが1、その次の文字から次の\r\nは2、……といった値になる
|
130
|
+
def line
|
131
|
+
if @file.pos == 0
|
132
|
+
0
|
133
|
+
elsif @current_char == CRLF
|
134
|
+
@line
|
63
135
|
else
|
64
|
-
|
136
|
+
@line + 1
|
65
137
|
end
|
66
|
-
@entry = true
|
67
138
|
end
|
68
139
|
end
|
@@ -310,7 +310,7 @@
|
|
310
310
|
<br />
|
311
311
|
�@�\�\�\�\�\�\�\�\�\�\<br />
|
312
312
|
<br />
|
313
|
-
<div class="
|
313
|
+
<div class="jisage_3" style="margin-left: 3em">
|
314
314
|
<h4 class="naka-midashi"><a class="midashi_anchor" id="midashi822">
|
315
315
|
��������������������<br />
|
316
316
|
��������������������<br />
|
@@ -426,6 +426,10 @@ presqu'<img src="../../../gaiji/1-09/1-09-68.png" alt="
|
|
426
426
|
<br />
|
427
427
|
�@�\�\�\�\�\�\�\�\�\�\<br />
|
428
428
|
<br />
|
429
|
+
�u����ɍ��̂Ƃ��늸���ĕa�I�Ȑ����@���Ɛ���Ȑ����@������ʂ��ׂ��ł���Ƃ��Ă���̂��낤���H����͓|�ꂽ�ƂŐ�������͊w�@���Ɨ����Ă���Ƃ̗͊w�@������ʂ���悤�Ȃ��̂ł���B�v�i"Et maintenant oserait-on soutenir q<img src="../../../gaiji/1-09/1-09-79.png" alt="��(�A�L���[�g�A�N�Z���g�t��U������)" class="gaiji" />il faut distinguer les lois de la vie <img src="../../../gaiji/1-09/1-09-54.png" alt="��(�O���[�u�A�N�Z���g�t��A������)" class="gaiji" /> l'<img src="../../../gaiji/1-09/1-09-63.png" alt="��(�A�L���[�g�A�N�Z���g�t��E������)" class="gaiji" />tat pathologique des lois de la vie <img src="../../../gaiji/1-09/1-09-54.png" alt="��(�O���[�u�A�N�Z���g�t��A������)" class="gaiji" /> l'<img src="../../../gaiji/1-09/1-09-63.png" alt="��(�A�L���[�g�A�N�Z���g�t��E������)" class="gaiji" />tat normal? Ce serait vouloir distinguer les lois de la m<img src="../../../gaiji/1-09/1-09-63.png" alt="��(�A�L���[�g�A�N�Z���g�t��E������)" class="gaiji" />canique dans une maison qui tombe, des lois do la m<img src="../../../gaiji/1-09/1-09-63.png" alt="��(�A�L���[�g�A�N�Z���g�t��E������)" class="gaiji" />canique dans une maison qui tient debout."�j<br />
|
430
|
+
<br />
|
431
|
+
�@�\�\�\�\�\�\�\�\�\�\<br />
|
432
|
+
<br />
|
429
433
|
���P�_<br />
|
430
434
|
<br />
|
431
435
|
���Ԃ�_<br />
|
@@ -756,6 +760,10 @@ Which, teaching us, hath this exordium: <span class="shatai">Nothing from nothin
|
|
756
760
|
<br />
|
757
761
|
<ruby><rb>���</rb><rp>�i</rp><rt>��������Ԃ�</rt><rp>�j</rp></ruby><span class="notes">�m���u��Ɂv�̍��Ɂu�}�}�v�̒��L�n</span><br />
|
758
762
|
<br />
|
763
|
+
�@�\�\�\�\�\�\�\�\�\�\<br />
|
764
|
+
<br />
|
765
|
+
�N�`�����m�I���b�`���n�A<ruby><rb>�H��</rb><rp>�i</rp><rt>�~ �~</rt><rp>�j</rp></ruby>�f<em class="sesame_dot">���X��</em>���g�C�f�C���E�`�j�A�O���O���}���b�e����<em class="sesame_dot">�g��</em>�K�J�P�e�g���f�L�e�A�\���K���l�j�A�^�b�e�A�^�I���e�ƃw�n�R�o���e�L�^�m�B<br />
|
766
|
+
<br />
|
759
767
|
���c�g�ݒ��ʼn��ɕ�����<br />
|
760
768
|
<br />
|
761
769
|
�ċ@�a<span dir="ltr">29</span>�̕ґ��́A<br />
|
@@ -976,6 +984,11 @@ Mors ubi dira fuit vita salusque patent.<br />
|
|
976
984
|
<br />
|
977
985
|
<h3 class="o-midashi"><a class="midashi_anchor" id="midashi1628"><ruby><rb>�����w</rb><rp>�i</rp><rt>����݂�����</rt><rp>�j</rp></ruby>��</a></h3>
|
978
986
|
<br />
|
987
|
+
�@�\�\�\�\�\�\�\�\�\�\<br />
|
988
|
+
<br />
|
989
|
+
<div class="jisage_8" style="margin-left: 8em"><h3 class="mado-o-midashi"><a class="midashi_anchor" id="midashi1728">��</a></h3>�i<span class="warichu">�n�A�́w�_�ȁi�n���сj�x�B�āA�́w�_�ȁi�ĉΕсj�x�B�V�A�́w�_�ȁi�V���сj�x�̗�</span>�j</div>
|
990
|
+
<br />
|
991
|
+
<br />
|
979
992
|
���ɂ����������p�i�ԊO�j<br />
|
980
993
|
<br />
|
981
994
|
���{���I���<br />
|
@@ -1018,11 +1031,11 @@ Mors ubi dira fuit vita salusque patent.<br />
|
|
1018
1031
|
<div class="after_text">
|
1019
1032
|
<hr />
|
1020
1033
|
<br />
|
1021
|
-
���̃e�L�X�g�́A�u���L�ꗗ�v�̋L�ڗ���o
|
1034
|
+
���̃e�L�X�g�́A�u���L�ꗗ�v�̋L�ڗ���o�������̂ƁAXHTML�ϊ������Ŗ��ɂȂ����T���v�����W�߂����̂ł��B<br />
|
1022
1035
|
���́F��<br />
|
1023
1036
|
�Z���F��<br />
|
1024
1037
|
2010�N3��30���쐬<br />
|
1025
|
-
|
1038
|
+
2021�N12��15���C��<br />
|
1026
1039
|
�ɍ쐬�t�@�C���F<br />
|
1027
1040
|
���̃t�@�C���́A�C���^�[�l�b�g�̐}���فA<a href="http://www.aozora.gr.jp/">�Ɂihttp://www.aozora.gr.jp/�j</a>�ō���܂����B���́A�Z���A����ɂ��������̂́A�{�����e�B�A�̊F����ł��B<br />
|
1028
1041
|
<br />
|
@@ -1041,32 +1054,32 @@ Mors ubi dira fuit vita salusque patent.<br />
|
|
1041
1054
|
</ul>
|
1042
1055
|
<br />
|
1043
1056
|
<table class="gaiji_list">
|
1044
|
-
<tr>
|
1045
|
-
<td>
|
1046
|
-
�u���{���v�AU+546D
|
1047
|
-
</td>
|
1048
|
-
<td> </td>
|
1049
|
-
<td>
|
1050
|
-
�y�[�W��-�s�� </td>
|
1051
|
-
<!--
|
1052
|
-
<td>
|
1053
|
-
�@�@<img src="../../../gaiji/others/xxxx.png" alt="�u���{���v�AU+546D" width=32 height=32 />
|
1054
|
-
</td>
|
1055
|
-
-->
|
1056
|
-
</tr>
|
1057
|
-
<tr>
|
1058
|
-
<td>
|
1059
|
-
�u�y�ւ�{��v
|
1060
|
-
</td>
|
1061
|
-
<td> </td>
|
1062
|
-
<td>
|
1063
|
-
�y�[�W��-�s�� </td>
|
1064
|
-
<!--
|
1065
|
-
<td>
|
1066
|
-
�@�@<img src="../../../gaiji/others/xxxx.png" alt="�u�y�ւ�{��v" width=32 height=32 />
|
1067
|
-
</td>
|
1068
|
-
-->
|
1069
|
-
</tr>
|
1057
|
+
<tr>
|
1058
|
+
<td>
|
1059
|
+
�u���{���v�AU+546D
|
1060
|
+
</td>
|
1061
|
+
<td> </td>
|
1062
|
+
<td>
|
1063
|
+
�y�[�W��-�s�� </td>
|
1064
|
+
<!--
|
1065
|
+
<td>
|
1066
|
+
�@�@<img src="../../../gaiji/others/xxxx.png" alt="�u���{���v�AU+546D" width=32 height=32 />
|
1067
|
+
</td>
|
1068
|
+
-->
|
1069
|
+
</tr>
|
1070
|
+
<tr>
|
1071
|
+
<td>
|
1072
|
+
�u�y�ւ�{��v
|
1073
|
+
</td>
|
1074
|
+
<td> </td>
|
1075
|
+
<td>
|
1076
|
+
�y�[�W��-�s�� </td>
|
1077
|
+
<!--
|
1078
|
+
<td>
|
1079
|
+
�@�@<img src="../../../gaiji/others/xxxx.png" alt="�u�y�ւ�{��v" width=32 height=32 />
|
1080
|
+
</td>
|
1081
|
+
-->
|
1082
|
+
</tr>
|
1070
1083
|
</table>
|
1071
1084
|
</div>
|
1072
1085
|
<div id="card">
|
@@ -320,7 +320,7 @@ http://www.aozora.gr.jp/accent_separation.html
|
|
320
320
|
|
321
321
|
�@�\�\�\�\�\�\�\�\�\�\
|
322
322
|
|
323
|
-
�m
|
323
|
+
�m����������R�������n
|
324
324
|
�m���������璆���o���n
|
325
325
|
��������������������
|
326
326
|
��������������������
|
@@ -436,6 +436,10 @@ presqu'
|
|
436
436
|
|
437
437
|
�@�\�\�\�\�\�\�\�\�\�\
|
438
438
|
|
439
|
+
�u����ɍ��̂Ƃ��늸���ĕa�I�Ȑ����@���Ɛ���Ȑ����@������ʂ��ׂ��ł���Ƃ��Ă���̂��낤���H����͓|�ꂽ�ƂŐ�������͊w�@���Ɨ����Ă���Ƃ̗͊w�@������ʂ���悤�Ȃ��̂ł���B�v�i�k"Et maintenant oserait-on soutenir qu'il faut distinguer les lois de la vie a` l'e'tat pathologique des lois de la vie a` l'e'tat normal? Ce serait vouloir distinguer les lois de la me'canique dans une maison qui tombe, des lois do la me'canique dans une maison qui tient debout."�l�j
|
440
|
+
|
441
|
+
�@�\�\�\�\�\�\�\�\�\�\
|
442
|
+
|
439
443
|
���P�_
|
440
444
|
|
441
445
|
���Ԃ�_
|
@@ -766,6 +770,10 @@ Which, teaching us, hath this exordium: Nothing from nothing ever yet was born.
|
|
766
770
|
|
767
771
|
��Ɂs��������Ԃt�m���u��Ɂv�̍��Ɂu�}�}�v�̒��L�n
|
768
772
|
|
773
|
+
�@�\�\�\�\�\�\�\�\�\�\
|
774
|
+
|
775
|
+
�N�`�����m�I���b�`���n�A�H��m���u�H��v�Ɂu�~�v�̖T�L�n�f���X���m���u���X���v�ɖT�_�n���g�C�f�C���E�`�j�A�O���O���}���b�e�����g�m���u�g�v�ɖT�_�n�K�J�P�e�g���f�L�e�A�\���K���l�j�A�^�b�e�A�^�I���e�ƃw�n�R�o���e�L�^�m�B
|
776
|
+
|
769
777
|
���c�g�ݒ��ʼn��ɕ�����
|
770
778
|
|
771
779
|
�ċ@�a29�m���u29�v�͏c�����n�̕ґ��́A
|
@@ -986,6 +994,11 @@ Mors ubi dira fuit vita salusque patent.
|
|
986
994
|
|
987
995
|
�����w�s����݂������t�Łm���u�����w�Łv�͑匩�o���n
|
988
996
|
|
997
|
+
�@�\�\�\�\�\�\�\�\�\�\
|
998
|
+
|
999
|
+
�m���W�������n���m���u���v�͑��匩�o���n�i�m�����蒍�n�n�A�́w�_�ȁi�n���сj�x�B�āA�́w�_�ȁi�ĉΕсj�x�B�V�A�́w�_�ȁi�V���сj�x�̗��m�����蒍�I���n�j
|
1000
|
+
|
1001
|
+
|
989
1002
|
���ɂ����������p�i�ԊO�j
|
990
1003
|
|
991
1004
|
���{���I���
|
@@ -1025,10 +1038,10 @@ Mors ubi dira fuit vita salusque patent.
|
|
1025
1038
|
|
1026
1039
|
|
1027
1040
|
�m���{���I���n
|
1028
|
-
���̃e�L�X�g�́A�u���L�ꗗ�v�̋L�ڗ���o
|
1041
|
+
���̃e�L�X�g�́A�u���L�ꗗ�v�̋L�ڗ���o�������̂ƁAXHTML�ϊ������Ŗ��ɂȂ����T���v�����W�߂����̂ł��B
|
1029
1042
|
���́F��
|
1030
1043
|
�Z���F��
|
1031
1044
|
2010�N3��30���쐬
|
1032
|
-
|
1045
|
+
2021�N12��15���C��
|
1033
1046
|
�ɍ쐬�t�@�C���F
|
1034
1047
|
���̃t�@�C���́A�C���^�[�l�b�g�̐}���فA�Ɂihttp://www.aozora.gr.jp/�j�ō���܂����B���́A�Z���A����ɂ��������̂́A�{�����e�B�A�̊F����ł��B
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aozora2html
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aozorahack team
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -42,16 +42,72 @@ dependencies:
|
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop-performance
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop-rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
55
111
|
- !ruby/object:Gem::Dependency
|
56
112
|
name: test-unit
|
57
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -89,13 +145,15 @@ executables:
|
|
89
145
|
extensions: []
|
90
146
|
extra_rdoc_files: []
|
91
147
|
files:
|
148
|
+
- ".github/workflows/rubocop.yml"
|
92
149
|
- ".github/workflows/ruby.yml"
|
93
150
|
- ".gitignore"
|
94
151
|
- ".rubocop.yml"
|
95
|
-
- ".
|
152
|
+
- ".rubocop_todo.yml"
|
96
153
|
- CHANGELOG.md
|
97
154
|
- Gemfile
|
98
155
|
- Guardfile
|
156
|
+
- HACKING.md
|
99
157
|
- LICENSE
|
100
158
|
- README.md
|
101
159
|
- Rakefile
|
@@ -106,7 +164,9 @@ files:
|
|
106
164
|
- lib/aozora2html/error.rb
|
107
165
|
- lib/aozora2html/header.rb
|
108
166
|
- lib/aozora2html/i18n.rb
|
167
|
+
- lib/aozora2html/midashi_counter.rb
|
109
168
|
- lib/aozora2html/ruby_buffer.rb
|
169
|
+
- lib/aozora2html/string_refinements.rb
|
110
170
|
- lib/aozora2html/style_stack.rb
|
111
171
|
- lib/aozora2html/tag.rb
|
112
172
|
- lib/aozora2html/tag/accent.rb
|
@@ -147,47 +207,15 @@ files:
|
|
147
207
|
- lib/aozora2html/tag/ruby.rb
|
148
208
|
- lib/aozora2html/tag/un_embed_gaiji.rb
|
149
209
|
- lib/aozora2html/tag_parser.rb
|
210
|
+
- lib/aozora2html/text_buffer.rb
|
150
211
|
- lib/aozora2html/utils.rb
|
151
212
|
- lib/aozora2html/version.rb
|
152
213
|
- lib/aozora2html/yaml_loader.rb
|
153
214
|
- lib/aozora2html/zip.rb
|
154
215
|
- lib/extensions.rb
|
155
216
|
- lib/jstream.rb
|
156
|
-
- lib/t2hs.rb
|
157
217
|
- sample/chukiichiran_kinyurei.html
|
158
218
|
- sample/chukiichiran_kinyurei.txt
|
159
|
-
- test/test_aozora2html.rb
|
160
|
-
- test/test_aozora_accent_parser.rb
|
161
|
-
- test/test_command_parse.rb
|
162
|
-
- test/test_compat.rb
|
163
|
-
- test/test_dakuten_katakana_tag.rb
|
164
|
-
- test/test_decorate_tag.rb
|
165
|
-
- test/test_dir_tag.rb
|
166
|
-
- test/test_editor_note_tag.rb
|
167
|
-
- test/test_exception.rb
|
168
|
-
- test/test_font_size_tag.rb
|
169
|
-
- test/test_gaiji_tag.rb
|
170
|
-
- test/test_header.rb
|
171
|
-
- test/test_helper.rb
|
172
|
-
- test/test_i18n.rb
|
173
|
-
- test/test_img_tag.rb
|
174
|
-
- test/test_inline_caption_tag.rb
|
175
|
-
- test/test_inline_font_size_tag.rb
|
176
|
-
- test/test_inline_keigakomi_tag.rb
|
177
|
-
- test/test_inline_yokogumi_tag.rb
|
178
|
-
- test/test_jizume_tag.rb
|
179
|
-
- test/test_jstream.rb
|
180
|
-
- test/test_kaeriten_tag.rb
|
181
|
-
- test/test_keigakomi_tag.rb
|
182
|
-
- test/test_midashi_tag.rb
|
183
|
-
- test/test_multiline_caption_tag.rb
|
184
|
-
- test/test_multiline_midashi_tag.rb
|
185
|
-
- test/test_multiline_style_tag.rb
|
186
|
-
- test/test_multiline_yokogumi_tag.rb
|
187
|
-
- test/test_okurigana_tag.rb
|
188
|
-
- test/test_ruby_parse.rb
|
189
|
-
- test/test_ruby_tag.rb
|
190
|
-
- test/test_tag_parser.rb
|
191
219
|
- vendor/jis2ucs/README.md
|
192
220
|
- vendor/jis2ucs/jisx0213-2004-mono.html
|
193
221
|
- vendor/jis2ucs/mkconv.rb
|
@@ -197,8 +225,9 @@ files:
|
|
197
225
|
homepage: https://github.com/aozorahack/aozora2html
|
198
226
|
licenses:
|
199
227
|
- CC0
|
200
|
-
metadata:
|
201
|
-
|
228
|
+
metadata:
|
229
|
+
rubygems_mfa_required: 'true'
|
230
|
+
post_install_message:
|
202
231
|
rdoc_options: []
|
203
232
|
require_paths:
|
204
233
|
- lib
|
@@ -206,48 +235,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
206
235
|
requirements:
|
207
236
|
- - ">="
|
208
237
|
- !ruby/object:Gem::Version
|
209
|
-
version:
|
238
|
+
version: 2.7.0
|
210
239
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
211
240
|
requirements:
|
212
241
|
- - ">="
|
213
242
|
- !ruby/object:Gem::Version
|
214
243
|
version: '0'
|
215
244
|
requirements: []
|
216
|
-
rubygems_version: 3.
|
217
|
-
signing_key:
|
245
|
+
rubygems_version: 3.4.10
|
246
|
+
signing_key:
|
218
247
|
specification_version: 4
|
219
248
|
summary: converter from Aozora Bunko format into xhtml. It's based of t2hs.rb from
|
220
249
|
kumihan.aozora.gr.jp.
|
221
|
-
test_files:
|
222
|
-
- test/test_aozora2html.rb
|
223
|
-
- test/test_aozora_accent_parser.rb
|
224
|
-
- test/test_command_parse.rb
|
225
|
-
- test/test_compat.rb
|
226
|
-
- test/test_dakuten_katakana_tag.rb
|
227
|
-
- test/test_decorate_tag.rb
|
228
|
-
- test/test_dir_tag.rb
|
229
|
-
- test/test_editor_note_tag.rb
|
230
|
-
- test/test_exception.rb
|
231
|
-
- test/test_font_size_tag.rb
|
232
|
-
- test/test_gaiji_tag.rb
|
233
|
-
- test/test_header.rb
|
234
|
-
- test/test_helper.rb
|
235
|
-
- test/test_i18n.rb
|
236
|
-
- test/test_img_tag.rb
|
237
|
-
- test/test_inline_caption_tag.rb
|
238
|
-
- test/test_inline_font_size_tag.rb
|
239
|
-
- test/test_inline_keigakomi_tag.rb
|
240
|
-
- test/test_inline_yokogumi_tag.rb
|
241
|
-
- test/test_jizume_tag.rb
|
242
|
-
- test/test_jstream.rb
|
243
|
-
- test/test_kaeriten_tag.rb
|
244
|
-
- test/test_keigakomi_tag.rb
|
245
|
-
- test/test_midashi_tag.rb
|
246
|
-
- test/test_multiline_caption_tag.rb
|
247
|
-
- test/test_multiline_midashi_tag.rb
|
248
|
-
- test/test_multiline_style_tag.rb
|
249
|
-
- test/test_multiline_yokogumi_tag.rb
|
250
|
-
- test/test_okurigana_tag.rb
|
251
|
-
- test/test_ruby_parse.rb
|
252
|
-
- test/test_ruby_tag.rb
|
253
|
-
- test/test_tag_parser.rb
|
250
|
+
test_files: []
|