flickr_airlift 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/flickr_airlift.rb +5 -2
- metadata +5 -5
data/lib/flickr_airlift.rb
CHANGED
@@ -3,7 +3,9 @@ require 'net/http'
|
|
3
3
|
require 'cgi'
|
4
4
|
|
5
5
|
module FlickrAirlift
|
6
|
-
|
6
|
+
|
7
|
+
UPLOADABLE_FORMATS = [".jpg", ".jpeg", ".gif", ".png", ".mov", ".avi"]
|
8
|
+
|
7
9
|
def self.download
|
8
10
|
begin
|
9
11
|
establish_session
|
@@ -46,7 +48,8 @@ module FlickrAirlift
|
|
46
48
|
|
47
49
|
def self.upload(relative_url)
|
48
50
|
establish_session("write")
|
49
|
-
|
51
|
+
|
52
|
+
image_file_names = Dir.entries(".").find_all{ |file_name| UPLOADABLE_FORMATS.any?{ |extension| file_name.downcase.include?(extension)} }
|
50
53
|
uploaded_ids = []
|
51
54
|
puts "Uploading #{image_file_names.length} files:"
|
52
55
|
sleep 1
|
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: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 7
|
10
|
+
version: 0.0.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Stephen Schor
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-05-04 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -66,6 +66,6 @@ rubyforge_project: nowarning
|
|
66
66
|
rubygems_version: 1.3.7
|
67
67
|
signing_key:
|
68
68
|
specification_version: 3
|
69
|
-
summary: A Command-Line tool for scraping any user's original photos
|
69
|
+
summary: A Command-Line tool for scraping any user's original photos, or uploading all media in a given directory
|
70
70
|
test_files: []
|
71
71
|
|