flickr_airlift 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/flickr_airlift.rb +5 -4
- metadata +35 -8
data/lib/flickr_airlift.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
require 'flickraw'
|
2
2
|
require 'net/http'
|
3
3
|
require 'cgi'
|
4
|
+
require 'launchy'
|
4
5
|
|
5
6
|
module FlickrAirlift
|
6
|
-
|
7
|
+
|
7
8
|
UPLOADABLE_FORMATS = [".jpg", ".jpeg", ".gif", ".png", ".mov", ".avi"]
|
8
|
-
|
9
|
+
|
9
10
|
def self.download
|
10
11
|
begin
|
11
12
|
establish_session
|
@@ -48,7 +49,7 @@ module FlickrAirlift
|
|
48
49
|
|
49
50
|
def self.upload(relative_url)
|
50
51
|
establish_session("write")
|
51
|
-
|
52
|
+
|
52
53
|
image_file_names = Dir.entries(".").find_all{ |file_name| UPLOADABLE_FORMATS.any?{ |extension| file_name.downcase.include?(extension)} }
|
53
54
|
uploaded_ids = []
|
54
55
|
puts "Uploading #{image_file_names.length} files:"
|
@@ -75,7 +76,7 @@ module FlickrAirlift
|
|
75
76
|
sleep 1
|
76
77
|
puts "Come back and press Enter when you are finished"
|
77
78
|
sleep 2
|
78
|
-
|
79
|
+
Launchy.open(auth_url)
|
79
80
|
else
|
80
81
|
puts "Open this url in your process to complete the authication process:"
|
81
82
|
puts auth_url
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flickr_airlift
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 8
|
10
|
+
version: 0.0.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Stephen Schor
|
@@ -15,11 +15,38 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-05-
|
18
|
+
date: 2011-05-23 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
|
-
dependencies:
|
21
|
-
|
22
|
-
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: launchy
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: flickraw
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
version: "0"
|
47
|
+
type: :runtime
|
48
|
+
version_requirements: *id002
|
49
|
+
description: A Command-Line tool for scraping any user's original photos
|
23
50
|
email:
|
24
51
|
- beholdthepanda@gmail.com
|
25
52
|
executables:
|
@@ -66,6 +93,6 @@ rubyforge_project: nowarning
|
|
66
93
|
rubygems_version: 1.3.7
|
67
94
|
signing_key:
|
68
95
|
specification_version: 3
|
69
|
-
summary: A Command-Line tool for scraping any user's original photos
|
96
|
+
summary: A Command-Line tool for scraping any user's original photos
|
70
97
|
test_files: []
|
71
98
|
|