papercallio 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/papercallio +13 -1
- data/lib/papercallio/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9c2e52e464d261914720d3230754467c11fc776
|
4
|
+
data.tar.gz: 6c0e9fb3c2dd341c51bd900e631559639a727296
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ed9987cadc658161c692d6d2ae3e6b5cc4605edc541e922a46f6ae12b547ff97974373a515f1facb92b29374cd5901eaeb0c8ceee1d13a169101788924e9e35
|
7
|
+
data.tar.gz: cfbb81b183f33559d5bc88c8e8cfd716750089facdea63a274ef5ee491eee906bd2fa6d463504e7bb8d3b0f8f6868598caf98529a8a8ad02905d280d86905e55
|
data/Gemfile.lock
CHANGED
data/bin/papercallio
CHANGED
@@ -56,6 +56,10 @@ command :submissions do |c|
|
|
56
56
|
c.flag 'order', :default_value => nil,
|
57
57
|
:arg_name => 'order',
|
58
58
|
:desc => 'Sort results. Possible values are: state, rating, ratings_count, title, created_at, talk_format_id, audience_level, confidence'
|
59
|
+
c.flag 'filter', :default_value => [],
|
60
|
+
:arg_name => 'filter',
|
61
|
+
:desc => "Filter results based on comments by reviewers. Can use multiple, ex. --filter='top_talk' --filter='top_ignite' --filter='open_space'" ,
|
62
|
+
:multiple => true
|
59
63
|
|
60
64
|
c.action do |global_options,options,args|
|
61
65
|
pcc = PaperCallClient.new(api_token, options)
|
@@ -67,6 +71,7 @@ command :submissions do |c|
|
|
67
71
|
reviewers = {}
|
68
72
|
response.each do |submission|
|
69
73
|
line = {}
|
74
|
+
include_line = false
|
70
75
|
id = nil
|
71
76
|
submission.each do |field, value|
|
72
77
|
if value.is_a?(Hash)
|
@@ -119,9 +124,16 @@ command :submissions do |c|
|
|
119
124
|
line[:individual_ratings] = individual_ratings
|
120
125
|
line[:raters] = raters
|
121
126
|
line[:comments] = comments
|
127
|
+
if options[:filter].empty?
|
128
|
+
include_line = true
|
129
|
+
elsif options[:filter].any? { |word| comments.include?(word) }
|
130
|
+
include_line = true
|
131
|
+
end
|
132
|
+
else
|
133
|
+
include_line = true
|
122
134
|
end
|
123
135
|
headerset = true
|
124
|
-
submissions << line
|
136
|
+
submissions << line if include_line
|
125
137
|
line = {}
|
126
138
|
end
|
127
139
|
File.open(global_options[:file], 'w') do |f|
|
data/lib/papercallio/version.rb
CHANGED