cbeta 0.0.1 → 0.0.2
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/bm_to_text.rb +3 -3
- data/lib/cbeta/gaiji.rb +2 -2
- data/lib/cbeta/html_to_text.rb +2 -2
- data/lib/cbeta/p5a_to_html.rb +2 -2
- 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: 1626247c8575cf24ada478aa97f17c75fdac7eab
|
4
|
+
data.tar.gz: 9ae68349445b0f69a0e790f8174a3962ecf78487
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40d5d5d7d5b25b84176a787130335915ecb42653939953b05049dadde3d8cdae02f12bd02f136609e57e61f610e35b90d8e3ef8292c84d35c0c907c6215a7ba9
|
7
|
+
data.tar.gz: be40d0911522efd96949fb186e09e76457a323f9ab449658e6f99a5069e2326531219c492145555b9c3b0b1316a8b580bf9ccbb6c7bebab9f93eab09bb243379
|
data/lib/cbeta/bm_to_text.rb
CHANGED
@@ -4,14 +4,14 @@ require 'fileutils'
|
|
4
4
|
#
|
5
5
|
# CBETA Basic Markup 格式可由此取得: https://github.com/mahawu/BM_u8
|
6
6
|
#
|
7
|
-
#
|
7
|
+
# Example:
|
8
8
|
#
|
9
9
|
# bm2t = CBETA::BMToText.new('/temp/cbeta-bm', '/temp/cbeta-text1')
|
10
10
|
# bm2t.convert('T01') # 執行大正藏第一冊
|
11
11
|
class CBETA::BMToText
|
12
12
|
|
13
|
-
# bm_root
|
14
|
-
# out_root
|
13
|
+
# @param bm_root [String] 來源 CBETA Basic Markup 檔案路徑
|
14
|
+
# @param out_root [String] 輸出路徑
|
15
15
|
def initialize(bm_root, out_root)
|
16
16
|
@bm_root = bm_root
|
17
17
|
@out_root = out_root
|
data/lib/cbeta/gaiji.rb
CHANGED
data/lib/cbeta/html_to_text.rb
CHANGED
@@ -3,7 +3,7 @@ require 'nokogiri'
|
|
3
3
|
|
4
4
|
# 將 CBETA HTML 轉為 純文字(含行首資訊)
|
5
5
|
#
|
6
|
-
#
|
6
|
+
# Example:
|
7
7
|
#
|
8
8
|
# h2t = CBETA::HTMLToText.new('/temp/cbeta-html', '/temp/cbeta-text')
|
9
9
|
# h2t.convert("T01") # 轉換大正藏第一冊
|
@@ -15,7 +15,7 @@ class CBETA::HTMLToText
|
|
15
15
|
@out_root = out_root
|
16
16
|
end
|
17
17
|
|
18
|
-
#
|
18
|
+
# Example:
|
19
19
|
#
|
20
20
|
# convert("T01")
|
21
21
|
def convert(arg)
|
data/lib/cbeta/p5a_to_html.rb
CHANGED
@@ -33,12 +33,12 @@ class CBETA::P5aToHTML
|
|
33
33
|
|
34
34
|
# 將 CBETA XML P5a 轉為 HTML
|
35
35
|
#
|
36
|
-
#
|
36
|
+
# Example for convert 大正藏第一冊:
|
37
37
|
#
|
38
38
|
# x2h = CBETA::P5aToHTML.new('/PATH/TO/CBETA/XML/P5a', '/OUTPUT/FOLDER')
|
39
39
|
# x2h.convert('T01')
|
40
40
|
#
|
41
|
-
#
|
41
|
+
# Example for convert 大正藏全部:
|
42
42
|
#
|
43
43
|
# x2h = CBETA::P5aToHTML.new('/PATH/TO/CBETA/XML/P5a', '/OUTPUT/FOLDER')
|
44
44
|
# x2h.convert('T')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cbeta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ray Chou
|
@@ -10,7 +10,7 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2015-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description: Ruby gem for use CBETA
|
13
|
+
description: Ruby gem for use Chinese Buddhist Text resources made by CBETA (http://www.cbeta.org).
|
14
14
|
email: zhoubx@gmail.com
|
15
15
|
executables: []
|
16
16
|
extensions: []
|
@@ -23,7 +23,7 @@ files:
|
|
23
23
|
- lib/cbeta/html_to_text.rb
|
24
24
|
- lib/cbeta/p5a_to_html.rb
|
25
25
|
- lib/cbeta/unicode-1.1.json
|
26
|
-
homepage:
|
26
|
+
homepage: https://github.com/RayCHOU/ruby-cbeta
|
27
27
|
licenses:
|
28
28
|
- MIT
|
29
29
|
metadata: {}
|