cbeta 2.2.19 → 2.2.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cbeta/p5a_to_text.rb +5 -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: 278fec91aaefd74c70cfad2806a50e0aab4f5092
|
4
|
+
data.tar.gz: 8b53c5cf3869afb5a0031ade290363e8b88f6ac6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27ce5487892f998e2ccc1b7ea7cecffd603eb3742bee6d06eb90ba2cf8c6a2022a09524e141f7e7e38078b867f584846ee886d105d53094329934b7999a73cfb
|
7
|
+
data.tar.gz: 21b1b790797f377a2e04bc2dff2afaf6a8092ab2f7078a50c334fda6c440a8cca2b501ec3429b7887d1ebe9889cb7b54ee9cc3243a36fafdfa136d2d28b28306
|
data/lib/cbeta/p5a_to_text.rb
CHANGED
@@ -26,6 +26,7 @@ class CBETA::P5aToText
|
|
26
26
|
# @option opts [String] :format 輸出格式,例:'app',預設是 normal
|
27
27
|
# @option opts [String] :encoding 輸出編碼,預設 'UTF-8'
|
28
28
|
# @option opts [String] :gaiji 缺字處理方式,預設 'default'
|
29
|
+
# @option opts [String] :inline_note 是否呈現夾註,預設為 true
|
29
30
|
# * 'PUA': 缺字一律使用 Unicode PUA
|
30
31
|
# * 'default': 優先使用通用字
|
31
32
|
def initialize(xml_root, output_root, opts={})
|
@@ -35,7 +36,8 @@ class CBETA::P5aToText
|
|
35
36
|
@settings = {
|
36
37
|
format: nil,
|
37
38
|
encoding: 'UTF-8',
|
38
|
-
gaiji: 'default'
|
39
|
+
gaiji: 'default',
|
40
|
+
inline_note: true
|
39
41
|
}
|
40
42
|
@settings.merge!(opts)
|
41
43
|
|
@@ -309,6 +311,8 @@ class CBETA::P5aToText
|
|
309
311
|
end
|
310
312
|
|
311
313
|
def e_note(e)
|
314
|
+
return '' unless @settings[:inline_note]
|
315
|
+
|
312
316
|
if e.has_attribute?('place') && e['place']=='inline'
|
313
317
|
r = traverse(e)
|
314
318
|
return "(#{r})"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cbeta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ray Chou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Ruby gem for use Chinese Buddhist Text resources made by CBETA (http://www.cbeta.org).
|
14
14
|
email: zhoubx@gmail.com
|