slack_export 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/slack_export +6 -6
- data/lib/slack_export/exporter.rb +2 -2
- data/lib/slack_export/version.rb +1 -1
- metadata +2 -18
- data/spec/slack_export/slack_client_spec.rb +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2bc9b609ad56354f4831431a9adaa3ae1ec7c72c
|
4
|
+
data.tar.gz: 95dbeb7ff4c03c13aa6cf1c9096229cacec4c1ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8a21b02a8ca0abf09d9b0c5d80c34a64b2d02cb5b7246ea974adfce199a1133297e81d67b11e3a8ee76094bae2475ed9427a88e4bbc4125a1e02fcb06c2991f
|
7
|
+
data.tar.gz: 79ef1d173294a27433add9aa8765ac0d6eaf47a608452f00bd3867aec24c26854f55f9e922f60cec606d3932990f191aaa7f3388f96f1af1f9c2fa94b48dc4fe
|
data/bin/slack_export
CHANGED
@@ -6,7 +6,7 @@ require "slack_export"
|
|
6
6
|
options = {}
|
7
7
|
|
8
8
|
optparse = OptionParser.new do |opts|
|
9
|
-
opts.banner = "Usage: slack_export --key
|
9
|
+
opts.banner = "Usage: slack_export --key your-slack-api-key --channel private-channel-name --path folder-to-create-export"
|
10
10
|
|
11
11
|
opts.on("-h", "--help", "Display this screen") do
|
12
12
|
puts opts
|
@@ -17,11 +17,11 @@ optparse = OptionParser.new do |opts|
|
|
17
17
|
options[:key] = key
|
18
18
|
end
|
19
19
|
|
20
|
-
opts.on("-c", "--channel CHANNEL", "Private Channel name (required)") do |channel|
|
20
|
+
opts.on("-c", "--channel CHANNEL", "Private Channel name (required). ONLY Private channels are supported") do |channel|
|
21
21
|
options[:channel] = channel
|
22
22
|
end
|
23
23
|
|
24
|
-
opts.on("-p", "--path PATH", "Local folder path to write export file (required)") do |path|
|
24
|
+
opts.on("-p", "--path PATH", "Local folder path to write export file (required). Path must already exist") do |path|
|
25
25
|
options[:path] = path
|
26
26
|
end
|
27
27
|
end
|
@@ -34,10 +34,10 @@ optparse.parse!
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
-
exporter = SlackExport::Exporter.new(options[:key], options[:channel], options[:path])
|
38
|
-
exporter.logger = -> (message) { puts message }
|
39
|
-
|
40
37
|
begin
|
38
|
+
exporter = SlackExport::Exporter.new(options[:key], options[:channel], options[:path])
|
39
|
+
exporter.logger = -> (message) { puts message }
|
40
|
+
|
41
41
|
exporter.export
|
42
42
|
rescue => e
|
43
43
|
puts e.message
|
@@ -15,8 +15,8 @@ module SlackExport
|
|
15
15
|
self.logger = logger
|
16
16
|
end
|
17
17
|
|
18
|
-
def export
|
19
|
-
raise StandardError
|
18
|
+
def export
|
19
|
+
raise StandardError, "Directory #{base_path} does not exist" unless Dir.exist?(base_path)
|
20
20
|
log "Exporting #{channel} to folder #{base_path}"
|
21
21
|
|
22
22
|
# CHANNELS
|
data/lib/slack_export/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slack_export
|
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
|
- Michael Tucker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -80,20 +80,6 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '3.0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: vcr
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '2.9'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '2.9'
|
97
83
|
description: Export private Slack channels in the standard Slack export format
|
98
84
|
email:
|
99
85
|
- mtucker@godaddy.com
|
@@ -107,7 +93,6 @@ files:
|
|
107
93
|
- lib/slack_export/exporter.rb
|
108
94
|
- lib/slack_export/slack_client.rb
|
109
95
|
- lib/slack_export/version.rb
|
110
|
-
- spec/slack_export/slack_client_spec.rb
|
111
96
|
- spec/spec_helper.rb
|
112
97
|
homepage: https://github.com/mtuckergd/slack_export
|
113
98
|
licenses:
|
@@ -134,5 +119,4 @@ signing_key:
|
|
134
119
|
specification_version: 4
|
135
120
|
summary: Export private Slack channels
|
136
121
|
test_files:
|
137
|
-
- spec/slack_export/slack_client_spec.rb
|
138
122
|
- spec/spec_helper.rb
|