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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8902784600fca604917892a8ca610f3bc200f1ed
4
- data.tar.gz: 685eae97bcf45d42a3802098669846d387cdd88b
3
+ metadata.gz: 9086537122202b59292da4befb49928a7c555ed5
4
+ data.tar.gz: 946d90f7d55e5e152822b05ca242ce28da08dc7c
5
5
  SHA512:
6
- metadata.gz: dc435e57de9dfa9bf3cb4a7eac754a49cb1c7a69f203ae936d2c2a0192e43febb133a471e2a752b93f7c15bd6cb4087e9e12acb094aedb535c78200a83ff9594
7
- data.tar.gz: f7df09b41789a3311613ec5f153bde40da03efc37b79abcac9fbd83abd55354967a20b3d5d7d560b607c335e372aad1de1d99a063ffa9e8b0a7c02b0a92ef1f7
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 == 1
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
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-08-15 00:00:00.000000000 Z
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.11
59
+ rubygems_version: 2.6.13
60
60
  signing_key:
61
61
  specification_version: 4
62
62
  summary: CBETA Tools