cbeta 2.4.4 → 2.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cbeta.rb +1 -1
- data/lib/cbeta/p5a_to_simple_html.rb +6 -4
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9086537122202b59292da4befb49928a7c555ed5
|
|
4
|
+
data.tar.gz: 946d90f7d55e5e152822b05ca242ce28da08dc7c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6053414afde407e19fa28ee38fa9a5e7693ed21fea9edc84c0e2fbfd822951984c4292575cb10ad60f99306061383c82e15a0d837d5c1b2a3b7384572aca2b56
|
|
7
|
+
data.tar.gz: 40b0b6b839713e6da74dbb9eb018a7bce9fc1f46699ca464563da629a635ab542bd67987b35a18aafe2b609a3abc05d6bf4e5c6ec49be7f4800b91aaa84b6e34
|
data/lib/cbeta.rb
CHANGED
|
@@ -9,7 +9,7 @@ class CBETA
|
|
|
9
9
|
CANON = 'DA|GA|GB|ZS|ZW|[A-Z]'
|
|
10
10
|
SORT_ORDER = %w(T X A K S F C D U P J L G M N ZS I ZW B GA GB)
|
|
11
11
|
DATA = File.join(File.dirname(__FILE__), 'data')
|
|
12
|
-
PUNCS = '.()[]
|
|
12
|
+
PUNCS = '.()[] 。,、;?!:「」『』《》<>〈〉〔〕[]【】〖〗…— '
|
|
13
13
|
|
|
14
14
|
# 由 行首資訊 取得 藏經 ID
|
|
15
15
|
# @param linehead[String] 行首資訊, 例如 "T01n0001_p0001a01" 或 "GA009n0008_p0003a01"
|
|
@@ -56,7 +56,7 @@ class CBETA::P5aToSimpleHTML
|
|
|
56
56
|
return convert_all if target.nil?
|
|
57
57
|
|
|
58
58
|
arg = target.upcase
|
|
59
|
-
if arg.size
|
|
59
|
+
if arg.size <= 2
|
|
60
60
|
handle_collection(arg)
|
|
61
61
|
else
|
|
62
62
|
if arg.include? '..'
|
|
@@ -318,12 +318,14 @@ class CBETA::P5aToSimpleHTML
|
|
|
318
318
|
def handle_vol(vol)
|
|
319
319
|
puts "convert volumn: #{vol}"
|
|
320
320
|
|
|
321
|
-
@orig = @cbeta.get_canon_symbol(vol[0])
|
|
322
|
-
abort "未處理底本" if @orig.nil?
|
|
323
|
-
@orig_short = @orig.sub(/^【(.*)】$/, '\1')
|
|
324
321
|
|
|
325
322
|
@vol = vol
|
|
326
323
|
@series = CBETA.get_canon_from_vol(vol)
|
|
324
|
+
|
|
325
|
+
@orig = @cbeta.get_canon_symbol(@series)
|
|
326
|
+
abort "未處理底本" if @orig.nil?
|
|
327
|
+
@orig_short = @orig.sub(/^【(.*)】$/, '\1')
|
|
328
|
+
|
|
327
329
|
@out_vol = File.join(@output_root, @series, vol)
|
|
328
330
|
FileUtils.remove_dir(@out_vol, true)
|
|
329
331
|
FileUtils.makedirs @out_vol
|
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.4.
|
|
4
|
+
version: 2.4.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ray Chou
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-10-02 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
|
|
@@ -56,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
56
56
|
version: '0'
|
|
57
57
|
requirements: []
|
|
58
58
|
rubyforge_project:
|
|
59
|
-
rubygems_version: 2.6.
|
|
59
|
+
rubygems_version: 2.6.13
|
|
60
60
|
signing_key:
|
|
61
61
|
specification_version: 4
|
|
62
62
|
summary: CBETA Tools
|