cbeta 2.4.10 → 2.4.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d64e4dab3fd43da5a442283e019f439e0cdf85ea63e87f7f97700cf11314121
4
- data.tar.gz: db00d5774c68bc5fbeec3b54dc91f73d66bd0dbb33965811fc133db9bd76dae7
3
+ metadata.gz: 23435c290acabced2cf143afdf3b4c957303f3e8457901d7c1e16f640b562bee
4
+ data.tar.gz: f1ae7f1c4da38125f2e04622f184c5598447f811991384d59d213764bf82e472
5
5
  SHA512:
6
- metadata.gz: 3c251f0b4a31f6c23e05964897f9dd23416ee2b9812bc2e54c908238bcbb648c865ce776f5ee69c7b1484ac8c65788ea894b3ce94ab91067eb22291fcb14dca2
7
- data.tar.gz: b3ba87e68d8284aa6c636e46d257391eabaf8fa20a3e934c679f2ebe040e7a60e8f728a2bc4a0de200e8a997f81c0038524948ab9d750fab9b043735e6777fc9
6
+ metadata.gz: 221c3249ef557051101aa152aa22a50d22a7930356ee9f797f1e4ee350e9076610fef39e77a413eb295f10ad9910ddb47b56cde53d6295146351b540aef7c41f
7
+ data.tar.gz: adf89369fb6a4ecca7fb5d6c6536f49cba63c8aba3b50b325e0d4cb8ed873b586060bb232122f6c04193db569f59608157aedcebebf5a11b028f9b65c6563423
@@ -36,9 +36,12 @@ class CBETA
36
36
  # @param lb[String] 例如 "0001a01" 或 "0757b29"
37
37
  # @return [String] CBETA 行首資訊,例如 "T01n0001_p0001a01" 或 "T25n1510ap0757b29"
38
38
  def self.get_linehead(file_basename, lb)
39
- r = file_basename
40
- r = 'T0220' if r.start_with? 'T0220'
41
- r += '_' if file_basename.match(/\d$/)
39
+ if file_basename.match(/^(T\d\dn0220)/)
40
+ r = $1
41
+ else
42
+ r = file_basename
43
+ end
44
+ r += '_' if r.match(/\d$/)
42
45
  r += 'p' + lb
43
46
  r
44
47
  end
@@ -120,7 +120,7 @@ class CBETA::Gaiji
120
120
  end
121
121
 
122
122
  def update_from_p5_folder(folder)
123
- Dir.entries(folder).each do |f|
123
+ Dir.entries(folder).sort.each do |f|
124
124
  path = File.join(folder, f)
125
125
  next if f.start_with? '.'
126
126
  if Dir.exist? path
@@ -422,7 +422,6 @@ class CBETA::P5aToText
422
422
  end
423
423
 
424
424
  def handle_sutra(xml_fn)
425
- puts "convert sutra #{xml_fn}"
426
425
  @dila_note = 0
427
426
  @div_count = 0
428
427
  #@editions = Set.new [@orig, "【CBETA】"] # 至少有底本跟CBETA兩種版本
@@ -481,7 +480,7 @@ class CBETA::P5aToText
481
480
  end
482
481
 
483
482
  def handle_vol(vol)
484
- puts "convert volumn: #{vol}"
483
+ print vol + ' '
485
484
 
486
485
  @canon = CBETA.get_canon_from_vol(vol)
487
486
  @orig = @cbeta.get_canon_symbol(@canon)
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.10
4
+ version: 2.4.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ray Chou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-02 00:00:00.000000000 Z
11
+ date: 2018-01-14 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