cbeta 2.5.4 → 2.6.0

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: ac4d37e07a06f46dec31623caf5213215937a4212c735ea7e6559b9e2847c3d5
4
- data.tar.gz: 07525ba09529524a7931acb1e7452ebd4387ad926ceaad66d8bf5050f0b84826
3
+ metadata.gz: a6d6827257da5ed66f3b375476eb8d1ab9cfd9aaa95cc383e85c147a8edefb98
4
+ data.tar.gz: 279b9251791a67c7366d17e11ef319fb0c25276e8fd4da6ec2669d6988ac2e5b
5
5
  SHA512:
6
- metadata.gz: 1bb673ee7aecdbdf2f3b59814e8d70d4ea7d5e1e2a5c72d57891a06d98e33d8ddf5f777e78831ce3bdcb4f522ef1f308e853bdec3d5fa4117ca869c8c7b5498d
7
- data.tar.gz: f46affe67fa4e9bbcd9680c2cb7abfcf08eee545eed7f354b808a72f46e52158d86473dd7d5166e276ddb9c34aaffde03006f35676f717355f95b0c6180cffd9
6
+ metadata.gz: 543fb4b0dd2a1afb83cfd53b90b8913622d7475b69975ebb68a4f11c9722f3935084ebfb8954628545cde6d856506e316e60c32b3ec40f9268d12b7e8354250f
7
+ data.tar.gz: 5f7fe97e1e39e5a28bcb967327471defc72a58ef90ed1537ad0da5dd16c817937ad47288eff9988f7ad2f51cd0db93d167246a37a2f11adce526716c6bc79894
data/lib/cbeta.rb CHANGED
@@ -214,6 +214,7 @@ end
214
214
 
215
215
  require 'cbeta/gaiji'
216
216
  require 'cbeta/bm_to_text'
217
+ require 'cbeta/canon'
217
218
  require 'cbeta/char_count'
218
219
  require 'cbeta/char_freq'
219
220
  require 'cbeta/html_to_pdf'
@@ -0,0 +1,17 @@
1
+ require 'csv'
2
+
3
+ class CBETA::Canon
4
+ def initialize
5
+ fn = File.join(File.dirname(__FILE__), '../data/canons.csv')
6
+ text = File.read(fn)
7
+ @canons = {}
8
+ CSV.parse(text, :headers => true) do |row|
9
+ id = row['id']
10
+ @canons[id] = row
11
+ end
12
+ end
13
+
14
+ def get_canon_attr(canon_id, attr_name)
15
+ @canons[canon_id][attr_name]
16
+ end
17
+ end
data/lib/data/canons.csv CHANGED
@@ -1,10 +1,10 @@
1
1
  id,chinese_name,english_name,nickname,abbreviation,editor,publish_place,publish_date
2
2
  A,趙城金藏,Jin Edition of the Canon,趙城藏,【金藏】,,北京: 北京圖書館出版社,2008
3
- B,大藏經補編,Supplement to the Dazangjing,,【補編】,藍吉富,台北: 華宇出版社,1985
3
+ B,大藏經補編,Supplement to the Dazangjing,大藏經補編,【補編】,藍吉富,台北: 華宇出版社,1985
4
4
  C,中華大藏經-中華書局版,Zhonghua Canon - Zhonghua shuju Edition,中華藏,【中華】,中華大藏經編輯局,北京: 中華書局,1984-1997
5
5
  D,國家圖書館善本佛典,Selections from the Taipei National Central Library Buddhist Rare Book Collection,國圖善本,【國圖】,國家圖書館特藏組,台北,
6
- F,房山石經,Fangshan shijing,,【房山】,中國佛教圖書文物館,北京: 華夏出版社,2000
7
- G,佛教大藏經,Fojiao Canon,,【佛教】,佛教書局,台北: 佛教書局,1978
6
+ F,房山石經,Fangshan shijing,房山石經,【房山】,中國佛教圖書文物館,北京: 華夏出版社,2000
7
+ G,佛教大藏經,Fojiao Canon,佛教大藏經,【佛教】,佛教書局,台北: 佛教書局,1978
8
8
  GA,中國佛寺史志彙刊,Zhongguo Fosi Shizhi Huikan,志彙,【志彙】,杜潔祥,台北:宗青圖書出版公司,1980-1994
9
9
  GB,中國佛寺志叢刊,Zhongguo fosizhi congkan,志叢,【志叢】,白化文、張智,揚州:廣陵書社,2006
10
10
  I,北朝佛教石刻拓片百品,Selections of Buddhist Stone Rubbings from the Northern Dynasties,佛拓,【佛拓】,顏娟英,台北: 中央研究院歷史語言研究所,2008
@@ -16,7 +16,7 @@ N,永樂南藏,Southern Yongle Edition of the Canon,再刻南藏,【南藏】,,,
16
16
  P,永樂北藏,Northern Yongle Edition of the Canon,北藏,【北藏】,永樂北藏整理委員會,北京: 線裝書局,2000
17
17
  Q,磧砂大藏經-新文豐版,Qisha Edition of the Canon - Xinwenfeng Edition,磧砂藏,【磧砂】,延聖院大藏經局,台北: 新文豐,1987
18
18
  R,卍續藏經-新文豐版,Manji Zokuzōkyō - Xinwenfeng Edition,卍續藏,,,京都.藏經書院 原刊 / 台北: 新文豐,1994
19
- S,宋藏遺珍-新文豐版,Songzang yizhen - Xinwenfeng Edition,,【宋遺】,範成,台北: 新文豐,1978
19
+ S,宋藏遺珍-新文豐版,Songzang yizhen - Xinwenfeng Edition,宋藏遺珍,【宋遺】,範成,台北: 新文豐,1978
20
20
  T,大正新脩大藏經,Taishō Tripiṭaka,大正藏,【大】,大正新修大藏經刊行會,東京: 大藏出版株式會社,1988
21
21
  U,洪武南藏,Southern Hongwu Edition of the Canon,初刻南藏,【洪武】,,成都: 四川省佛教協會,1999
22
22
  X,卍新纂大日本續藏經,Manji Shinsan Dainihon Zokuzōkyō,新纂卍續藏,【卍續】,河村照孝,東京: 株式會社國書刊行會,1975-1989
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.5.4
4
+ version: 2.6.0
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-04-05 00:00:00.000000000 Z
11
+ date: 2018-04-18 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
@@ -18,6 +18,7 @@ extra_rdoc_files: []
18
18
  files:
19
19
  - lib/cbeta.rb
20
20
  - lib/cbeta/bm_to_text.rb
21
+ - lib/cbeta/canon.rb
21
22
  - lib/cbeta/cbeta_share.rb
22
23
  - lib/cbeta/char_count.rb
23
24
  - lib/cbeta/char_freq.rb