cbeta 3.5.1 → 3.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cbeta.rb +44 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 724a67a39ae4c60974ebdb12ef5ae1a8e907abb38628eb670aabf67624e7b82f
|
4
|
+
data.tar.gz: 68addb85c98f56d225407d0c231dcea8415b49bd453bcdde0d751d8fbee01745
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: deb00bf3f2ec8e5257c1defb00830b84da485bc136d88b4d44275978885a8d1851f3a483835dbd52648b75d9d87c840a1464558a419b05c1fdf3b10be7cc541a
|
7
|
+
data.tar.gz: fb8bdde0cd8e6cdebd74024fa5cff8ed802678969ebc29a83541ad04e09f5873e251be6fbb165d4d4cd40cc296e07b735785f5cbcfd25331f77a733eee8db667
|
data/lib/cbeta.rb
CHANGED
@@ -56,18 +56,56 @@ class CBETA
|
|
56
56
|
end
|
57
57
|
|
58
58
|
# 如果 卷跨冊,回傳 冊號範圍
|
59
|
-
def self.
|
59
|
+
def self.work_juan_vol_range(work, juan)
|
60
60
|
case work
|
61
61
|
when 'GA0037'
|
62
|
-
(
|
62
|
+
(36..37) if juan == 2
|
63
63
|
when 'L1557'
|
64
64
|
case juan
|
65
|
-
when 17 then (
|
66
|
-
when 34 then (
|
67
|
-
when 51 then (
|
65
|
+
when 17 then (130..131)
|
66
|
+
when 34 then (131..132)
|
67
|
+
when 51 then (132..133)
|
68
68
|
end
|
69
69
|
when 'X0714'
|
70
|
-
(
|
70
|
+
(39..40) if juan == 3
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# 卷跨冊
|
75
|
+
# @return [Numeric] 1: 卷跨冊的上半部; 2: 卷跨冊的下半部
|
76
|
+
def self.juan_across_vol(vol, work, juan=nil)
|
77
|
+
case work
|
78
|
+
when 'GA0037'
|
79
|
+
case vol
|
80
|
+
when 'GA036'
|
81
|
+
1 if juan == 2
|
82
|
+
when 'GA037'
|
83
|
+
2 if juan.nil? or juan == 2
|
84
|
+
end
|
85
|
+
when 'L1557'
|
86
|
+
case vol
|
87
|
+
when 'L130'
|
88
|
+
1 if juan == 17 # 上半卷
|
89
|
+
when 'L131'
|
90
|
+
case juan
|
91
|
+
when 17, nil then 2
|
92
|
+
when 34 then 1
|
93
|
+
end
|
94
|
+
when 'L132'
|
95
|
+
case juan
|
96
|
+
when 34, nil then 2
|
97
|
+
when 51 then 1
|
98
|
+
end
|
99
|
+
when 'L133'
|
100
|
+
2 if juan.nil? or juan == 51
|
101
|
+
end
|
102
|
+
when 'X0714'
|
103
|
+
case vol
|
104
|
+
when 'X39'
|
105
|
+
1 if juan == 3
|
106
|
+
when 'X40'
|
107
|
+
2 if juan.nil? or juan == 3
|
108
|
+
end
|
71
109
|
end
|
72
110
|
end
|
73
111
|
|