trellist 0.7.0 → 0.8.0
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 +5 -5
- data/Gemfile.lock +18 -15
- data/README.md +1 -1
- data/bin/trellist +18 -6
- data/lib/trellist.rb +1 -0
- data/lib/trellist/client.rb +16 -1
- data/lib/trellist/version.rb +1 -1
- data/trellist.gemspec +1 -0
- metadata +17 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 1afed9ea7edcac1653059283ef9054ca2ab5d0f8172952f1eb906ccf38ff9bbb
|
|
4
|
+
data.tar.gz: 7519aefc790fcfc96ee5bf3383de7d05d7f6c2ddfdb5c61f797bcfbe209ee0c5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a1287b4c2e9294411495fd889be629959757aa983ea1b105da57185261dc4fdd6ff22707f802566b543a9a710a7e5ecbb6f31db31af56714efd57a7612d273b2
|
|
7
|
+
data.tar.gz: b921e75080ba4ca0d4b2bee16be6fead34119fe4de57d13489bd8f250c3611d729222945a8b99c054187db67e22924cb22ec382fbd1bb66d499c19099f5f5b5d
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
trellist (0.
|
|
4
|
+
trellist (0.8.0)
|
|
5
|
+
clipboard (~> 1.1.1)
|
|
5
6
|
gli (= 2.15.0)
|
|
6
7
|
highline (= 1.7.8)
|
|
7
8
|
paint (= 2.0.0)
|
|
@@ -10,9 +11,9 @@ PATH
|
|
|
10
11
|
GEM
|
|
11
12
|
remote: https://rubygems.org/
|
|
12
13
|
specs:
|
|
13
|
-
activemodel (5.
|
|
14
|
-
activesupport (= 5.
|
|
15
|
-
activesupport (5.
|
|
14
|
+
activemodel (5.1.5)
|
|
15
|
+
activesupport (= 5.1.5)
|
|
16
|
+
activesupport (5.1.5)
|
|
16
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
17
18
|
i18n (~> 0.7)
|
|
18
19
|
minitest (~> 5.1)
|
|
@@ -29,7 +30,8 @@ GEM
|
|
|
29
30
|
builder (3.2.2)
|
|
30
31
|
childprocess (0.5.9)
|
|
31
32
|
ffi (~> 1.0, >= 1.0.11)
|
|
32
|
-
|
|
33
|
+
clipboard (1.1.1)
|
|
34
|
+
concurrent-ruby (1.0.5)
|
|
33
35
|
contracts (0.14.0)
|
|
34
36
|
crack (0.4.3)
|
|
35
37
|
safe_yaml (~> 1.0.0)
|
|
@@ -45,7 +47,7 @@ GEM
|
|
|
45
47
|
gherkin (~> 4.0)
|
|
46
48
|
cucumber-wire (0.0.1)
|
|
47
49
|
diff-lcs (1.2.5)
|
|
48
|
-
domain_name (0.5.
|
|
50
|
+
domain_name (0.5.20170404)
|
|
49
51
|
unf (>= 0.0.5, < 1.0.0)
|
|
50
52
|
ffi (1.9.14)
|
|
51
53
|
gherkin (4.0.0)
|
|
@@ -54,21 +56,22 @@ GEM
|
|
|
54
56
|
highline (1.7.8)
|
|
55
57
|
http-cookie (1.0.3)
|
|
56
58
|
domain_name (~> 0.5)
|
|
57
|
-
i18n (0.
|
|
58
|
-
|
|
59
|
+
i18n (0.9.5)
|
|
60
|
+
concurrent-ruby (~> 1.0)
|
|
61
|
+
json (2.1.0)
|
|
59
62
|
mime-types (3.1)
|
|
60
63
|
mime-types-data (~> 3.2015)
|
|
61
64
|
mime-types-data (3.2016.0521)
|
|
62
|
-
minitest (5.
|
|
65
|
+
minitest (5.11.3)
|
|
63
66
|
multi_json (1.12.1)
|
|
64
67
|
multi_test (0.1.2)
|
|
65
68
|
netrc (0.11.0)
|
|
66
|
-
oauth (0.5.
|
|
69
|
+
oauth (0.5.4)
|
|
67
70
|
paint (2.0.0)
|
|
68
71
|
public_suffix (2.0.5)
|
|
69
72
|
rake (12.0.0)
|
|
70
73
|
rdoc (5.0.0)
|
|
71
|
-
rest-client (2.0.
|
|
74
|
+
rest-client (2.0.2)
|
|
72
75
|
http-cookie (>= 1.0.2, < 2.0)
|
|
73
76
|
mime-types (>= 1.16, < 4.0)
|
|
74
77
|
netrc (~> 0.8)
|
|
@@ -93,12 +96,12 @@ GEM
|
|
|
93
96
|
rest-client (>= 1.8.0)
|
|
94
97
|
safe_yaml (1.0.4)
|
|
95
98
|
thor (0.19.4)
|
|
96
|
-
thread_safe (0.3.
|
|
97
|
-
tzinfo (1.2.
|
|
99
|
+
thread_safe (0.3.6)
|
|
100
|
+
tzinfo (1.2.5)
|
|
98
101
|
thread_safe (~> 0.1)
|
|
99
102
|
unf (0.1.4)
|
|
100
103
|
unf_ext
|
|
101
|
-
unf_ext (0.0.7.
|
|
104
|
+
unf_ext (0.0.7.5)
|
|
102
105
|
vcr (3.0.3)
|
|
103
106
|
webmock (2.3.2)
|
|
104
107
|
addressable (>= 2.3.6)
|
|
@@ -118,4 +121,4 @@ DEPENDENCIES
|
|
|
118
121
|
webmock (= 2.3.2)
|
|
119
122
|
|
|
120
123
|
BUNDLED WITH
|
|
121
|
-
1.
|
|
124
|
+
1.16.0
|
data/README.md
CHANGED
|
@@ -30,7 +30,7 @@ Otherwise you'll need to supply your key and token as flags such as:
|
|
|
30
30
|
- `trellist cards --format=markdown` **same as above**
|
|
31
31
|
- `trellist cards --format=plain` **just links**
|
|
32
32
|
- `trellist cards --format=html` **html**
|
|
33
|
-
- `trellist cards --format=
|
|
33
|
+
- `trellist cards --format=titles-only` **titles only**
|
|
34
34
|
|
|
35
35
|
#### Link prefix and suffix
|
|
36
36
|
|
data/bin/trellist
CHANGED
|
@@ -65,10 +65,12 @@ end
|
|
|
65
65
|
desc 'Get cards from a list on your board'
|
|
66
66
|
command :cards do |c|
|
|
67
67
|
c.desc 'Gets cards from a selection of lists from the provided Trello board'
|
|
68
|
-
c.flag [:f, :format], must_match: ["markdown", "plain", "html", "markdown-with-logo", "titles-only"], default_value: 'markdown'
|
|
68
|
+
c.flag [:f, :format], must_match: ["markdown", "plain", "html", "markdown-with-logo", "titles-only", "slides"], default_value: 'markdown'
|
|
69
69
|
c.flag [:p, :prefix]
|
|
70
70
|
c.flag [:s, :suffix]
|
|
71
71
|
c.flag [:l, :label]
|
|
72
|
+
|
|
73
|
+
c.switch [:c, :clipboard], desc: 'copy output to the clipboard'
|
|
72
74
|
c.action do |global_options,options,args|
|
|
73
75
|
puts Paint["fetching lists...", COLORS[:blue]]
|
|
74
76
|
@client = Client.new(key: global_options[:key],
|
|
@@ -103,15 +105,25 @@ command :cards do |c|
|
|
|
103
105
|
if list=@client.lists[stringed_number.to_i]
|
|
104
106
|
puts Paint["OK. Here are the cards for #{list.name}:", COLORS[:cyan]]
|
|
105
107
|
puts Paint["---", COLORS[:cyan]]
|
|
108
|
+
|
|
106
109
|
@client.list_cards(list.id, label: options[:label] || nil)
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
|
|
111
|
+
if options[:format].include?('markdown-with-logo')
|
|
112
|
+
options[:format] = 'markdown'
|
|
113
|
+
options[:prefix] += ' '
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
card_data = @client.generate_links(format: options[:format], prefix: options[:prefix], suffix: options[:suffix])
|
|
117
|
+
card_data.each do |card|
|
|
118
|
+
puts Paint[card, COLORS[:white]]
|
|
110
119
|
end
|
|
111
|
-
|
|
112
|
-
|
|
120
|
+
|
|
121
|
+
if options[:clipboard]
|
|
122
|
+
Clipboard.copy(card_data.join('\n'))
|
|
113
123
|
end
|
|
124
|
+
|
|
114
125
|
puts Paint["---", COLORS[:cyan]]
|
|
126
|
+
|
|
115
127
|
break
|
|
116
128
|
else
|
|
117
129
|
error_prompt = "Your choice, #{@answer}," \
|
data/lib/trellist.rb
CHANGED
data/lib/trellist/client.rb
CHANGED
|
@@ -6,7 +6,7 @@ require 'trello'
|
|
|
6
6
|
# 4. receive choice
|
|
7
7
|
# 5. output list as markdown (or other format)
|
|
8
8
|
|
|
9
|
-
# could put this module in trellist/ext and require relative
|
|
9
|
+
# NOTE(chaserx): could put this module in trellist/ext and require relative
|
|
10
10
|
module TrelloCardRefinements
|
|
11
11
|
refine Trello::Card do
|
|
12
12
|
def as_markdown(prefix: '', suffix: '')
|
|
@@ -20,6 +20,19 @@ module TrelloCardRefinements
|
|
|
20
20
|
def as_plain_title(prefix: '', suffix: '')
|
|
21
21
|
"#{prefix}#{name}#{suffix}"
|
|
22
22
|
end
|
|
23
|
+
|
|
24
|
+
def as_deckset_markdown
|
|
25
|
+
# NOTE(chaserx): I don't like this although functional. Maybe use erb?
|
|
26
|
+
"\n# #{name}\n" + # slide title; required to start slide
|
|
27
|
+
"\n#{desc}\n" + # slide body
|
|
28
|
+
"\n[#{short_url}](#{short_url})\n" + # link back to card
|
|
29
|
+
"\n#{formatted_attachments.join("\n")}\n" + # list of card attachements
|
|
30
|
+
"\n---\n" # required to end slide
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def formatted_attachments
|
|
34
|
+
attachments.map { |attachment| "\n[#{attachment.name}](#{attachment.url})\n" }
|
|
35
|
+
end
|
|
23
36
|
end
|
|
24
37
|
end
|
|
25
38
|
|
|
@@ -61,6 +74,8 @@ class Client
|
|
|
61
74
|
@cards.map { |card| card.as_html(prefix: prefix, suffix: suffix) }
|
|
62
75
|
when 'titles-only'
|
|
63
76
|
@cards.map { |card| card.as_plain_title(prefix: prefix, suffix: suffix) }
|
|
77
|
+
when 'slides'
|
|
78
|
+
@cards.map { |card| card.as_deckset_markdown }
|
|
64
79
|
else
|
|
65
80
|
@cards.map(&:inspect)
|
|
66
81
|
end
|
data/lib/trellist/version.rb
CHANGED
data/trellist.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: trellist
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chase Southard
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-03-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -150,6 +150,20 @@ dependencies:
|
|
|
150
150
|
- - '='
|
|
151
151
|
- !ruby/object:Gem::Version
|
|
152
152
|
version: 2.0.0
|
|
153
|
+
- !ruby/object:Gem::Dependency
|
|
154
|
+
name: clipboard
|
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
|
156
|
+
requirements:
|
|
157
|
+
- - "~>"
|
|
158
|
+
- !ruby/object:Gem::Version
|
|
159
|
+
version: 1.1.1
|
|
160
|
+
type: :runtime
|
|
161
|
+
prerelease: false
|
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
163
|
+
requirements:
|
|
164
|
+
- - "~>"
|
|
165
|
+
- !ruby/object:Gem::Version
|
|
166
|
+
version: 1.1.1
|
|
153
167
|
description:
|
|
154
168
|
email: chase.southard@gmail.com
|
|
155
169
|
executables:
|
|
@@ -205,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
205
219
|
version: '0'
|
|
206
220
|
requirements: []
|
|
207
221
|
rubyforge_project:
|
|
208
|
-
rubygems_version: 2.6
|
|
222
|
+
rubygems_version: 2.7.6
|
|
209
223
|
signing_key:
|
|
210
224
|
specification_version: 4
|
|
211
225
|
summary: A little CLI tool for getting Trello card titles and links in various formats.
|