descartes 0.7.6 → 0.7.7
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/descartes/modules/crunchyroll.rb +1 -1
- data/lib/descartes/modules/pigro.rb +79 -51
- data/lib/descartes/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aa24e3fe9b0658199bcda4a7b76ca63bb49b0c4a
|
|
4
|
+
data.tar.gz: b906bdb3f2fd49cc6a5f6d51a8c05a7e3d34dfc4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e21fc1ff1cde7b46c0c901296e4b910d192eb0dd2a32afa56a1d9346a34f3a7c3a9ef4677b572cfd33d15cae30e59d23a695cf5a8a56dc0cd5fb8285bdc2e234
|
|
7
|
+
data.tar.gz: d011db6dcb203e2d153415deedba3fdb9de9cd8252fb4821d291995134d51899134705e865c5c0a26eb3d09a53f234773265ad439c6edcaa9c69642c644ed39f
|
|
@@ -28,7 +28,7 @@ class Descartes
|
|
|
28
28
|
m.reply "Gli anime di oggi su #{'Crunchyroll'.colorize}:"
|
|
29
29
|
|
|
30
30
|
not_aired.each { |series|
|
|
31
|
-
m.reply "#{series[:title].colorize} (tra #{series[:left].to_ita.colorize})
|
|
31
|
+
m.reply "#{series[:title].colorize} (tra #{series[:left].to_ita.colorize})"
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
m.reply "Sono stati già trasmessi: #{already_aired}."
|
|
@@ -17,18 +17,17 @@ require 'assonnato'
|
|
|
17
17
|
class Descartes
|
|
18
18
|
class Pigro
|
|
19
19
|
include Cinch::Plugin
|
|
20
|
-
match /show (.+)/
|
|
21
|
-
match /staff (.+)/, method: :by_staff
|
|
22
20
|
|
|
21
|
+
match /staff (.+)/, method: :by_staff
|
|
23
22
|
def by_staff(m, user)
|
|
24
|
-
user = user.split
|
|
23
|
+
user = user.split
|
|
25
24
|
role = user.last.to_sym.downcase
|
|
26
25
|
|
|
27
26
|
if [ :translator, :editor, :checker, :timer, :typesetter, :encoder, :qchecker ].include? role
|
|
28
27
|
user.pop
|
|
29
|
-
options = { user: user.join
|
|
28
|
+
options = { user: user.join, role: role }
|
|
30
29
|
else
|
|
31
|
-
options = { user: user.join
|
|
30
|
+
options = { user: user.join }
|
|
32
31
|
end
|
|
33
32
|
|
|
34
33
|
host = get_host 'pigro.txt'
|
|
@@ -58,10 +57,11 @@ class Descartes
|
|
|
58
57
|
}[0..-3]
|
|
59
58
|
end
|
|
60
59
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
match /show (.+)/, method: :by_show
|
|
61
|
+
def by_show(m, keyword)
|
|
62
|
+
s = keyword.split
|
|
63
|
+
n_ep = (s.last == 'last' || s.last.numeric?) ? s.pop : nil
|
|
64
|
+
keyword = s.join
|
|
65
65
|
|
|
66
66
|
host = get_host 'pigro.txt'
|
|
67
67
|
shows = Assonnato::Show.new host
|
|
@@ -70,43 +70,40 @@ class Descartes
|
|
|
70
70
|
series = shows.search! keyword
|
|
71
71
|
|
|
72
72
|
if series.empty?
|
|
73
|
-
m.reply 'Series not found'
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
else
|
|
97
|
-
episodes = episodes.get! show.name, n_ep.to_i
|
|
73
|
+
m.reply 'Series not found.'
|
|
74
|
+
else
|
|
75
|
+
series.take(5).each { |s|
|
|
76
|
+
show = shows.get!(s.name).first
|
|
77
|
+
|
|
78
|
+
if n_ep.nil?
|
|
79
|
+
a = show.status.downcase.start_with?(?o) ? 'an' : ?a
|
|
80
|
+
m.reply "[#{show.fansub.colorize}] #{show.name.colorize} is #{a} #{show.status} series of #{show.tot_episodes.colorize} episodes."
|
|
81
|
+
m.reply ''.tap { |staff|
|
|
82
|
+
{
|
|
83
|
+
:Translator => show.translator,
|
|
84
|
+
:Editor => show.editor,
|
|
85
|
+
:Checker => show.checker,
|
|
86
|
+
:Timer => show.timer,
|
|
87
|
+
:Typesetter => show.typesetter,
|
|
88
|
+
:Encoder => show.encoder,
|
|
89
|
+
:QC => show.qchecker
|
|
90
|
+
}.each_pair { |key, val|
|
|
91
|
+
staff << "#{key.to_s.colorize}: #{val} / " unless val.empty?
|
|
92
|
+
}
|
|
93
|
+
}[0..-4]
|
|
94
|
+
elsif n_ep == 'last'
|
|
95
|
+
episode = episodes.last!(:ongoing).select { |ep| ep.show_name == s.name }.last
|
|
98
96
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
m.reply ("#{show.name.colorize} ##{ep.episode}".colorize + ' - ').tap { |staff|
|
|
97
|
+
if episode
|
|
98
|
+
m.reply ("#{show.name.colorize} ##{episode.episode}".colorize + ' - ').tap { |staff|
|
|
102
99
|
activities = {
|
|
103
|
-
:Translation =>
|
|
104
|
-
:Editing =>
|
|
105
|
-
:Check =>
|
|
106
|
-
:Timing =>
|
|
107
|
-
:Typesetting =>
|
|
108
|
-
:Encoding =>
|
|
109
|
-
:QC =>
|
|
100
|
+
:Translation => episode.translation,
|
|
101
|
+
:Editing => episode.editing,
|
|
102
|
+
:Check => episode.checking,
|
|
103
|
+
:Timing => episode.timing,
|
|
104
|
+
:Typesetting => episode.typesetting,
|
|
105
|
+
:Encoding => episode.encoding,
|
|
106
|
+
:QC => episode.qchecking
|
|
110
107
|
}
|
|
111
108
|
|
|
112
109
|
if activities.select { |k, v| v != :done }.any?
|
|
@@ -118,16 +115,47 @@ class Descartes
|
|
|
118
115
|
else
|
|
119
116
|
staff << 'Already released. '
|
|
120
117
|
end
|
|
121
|
-
staff << "#{'Download'.colorize}: #{
|
|
118
|
+
staff << "#{'Download'.colorize}: #{episode.download}" unless episode.download.strip.empty?
|
|
122
119
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
120
|
+
else
|
|
121
|
+
m.reply "#{show.name.colorize} has no episodes yet."
|
|
122
|
+
end
|
|
126
123
|
else
|
|
127
|
-
|
|
124
|
+
episodes = episodes.get! show.name, n_ep.to_i
|
|
125
|
+
|
|
126
|
+
if episodes.any?
|
|
127
|
+
episodes.each { |ep|
|
|
128
|
+
m.reply ("#{show.name.colorize} ##{ep.episode}".colorize + ' - ').tap { |staff|
|
|
129
|
+
activities = {
|
|
130
|
+
:Translation => ep.translation,
|
|
131
|
+
:Editing => ep.editing,
|
|
132
|
+
:Check => ep.checking,
|
|
133
|
+
:Timing => ep.timing,
|
|
134
|
+
:Typesetting => ep.typesetting,
|
|
135
|
+
:Encoding => ep.encoding,
|
|
136
|
+
:QC => ep.qchecking
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if activities.select { |k, v| v != :done }.any?
|
|
140
|
+
staff << ''.tap { |s|
|
|
141
|
+
activities.each_pair { |key, val|
|
|
142
|
+
s << "#{key.to_s.colorize}: #{val} / "
|
|
143
|
+
}
|
|
144
|
+
}[0..-3]
|
|
145
|
+
else
|
|
146
|
+
staff << 'Already released. '
|
|
147
|
+
end
|
|
148
|
+
staff << "#{'Download'.colorize}: #{ep.download}" unless ep.download.strip.empty?
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
elsif n_ep.to_i > show.tot_episodes
|
|
152
|
+
m.reply "#{m.user.nick.colorize} pls go and http://just-believe.in."
|
|
153
|
+
else
|
|
154
|
+
m.reply "The episode #{n_ep.colorize} has not been added yet to #{show.name.colorize}."
|
|
155
|
+
end
|
|
128
156
|
end
|
|
129
|
-
|
|
130
|
-
|
|
157
|
+
}
|
|
158
|
+
end
|
|
131
159
|
end
|
|
132
160
|
|
|
133
161
|
def get_host(f)
|
data/lib/descartes/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: descartes
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Giovanni Capuano
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-02-
|
|
11
|
+
date: 2014-02-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cinch
|