picasaweb 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/Manifest.txt +2 -1
- data/README.txt +5 -3
- data/bin/picasaweb +20 -3
- data/lib/picasaweb.rb +1 -1
- metadata +2 -2
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
data/README.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
picasaweb
|
2
2
|
by Logan Koester
|
3
|
-
|
4
|
-
|
3
|
+
http://picasaweb.rubyforge.org/
|
4
|
+
|
5
5
|
== DESCRIPTION:
|
6
6
|
|
7
7
|
Ruby interface to Google's Picasa Web Albums (photo sharing site). Includes a command-line tool for downloading photos from Picasa albums.
|
@@ -22,6 +22,8 @@ Ruby interface to Google's Picasa Web Albums (photo sharing site). Includes a co
|
|
22
22
|
my_album.photos.each do |photo|
|
23
23
|
puts photo.title + " at " + photo.image + "\n\n"
|
24
24
|
end
|
25
|
+
|
26
|
+
Further documentation available at http://picasaweb.rubyforge.org/
|
25
27
|
|
26
28
|
== REQUIREMENTS:
|
27
29
|
|
@@ -37,7 +39,7 @@ Ruby interface to Google's Picasa Web Albums (photo sharing site). Includes a co
|
|
37
39
|
|
38
40
|
(The MIT License)
|
39
41
|
|
40
|
-
Copyright (c) 2007
|
42
|
+
Copyright (c) 2007 Logan Koester
|
41
43
|
|
42
44
|
Permission is hereby granted, free of charge, to any person obtaining
|
43
45
|
a copy of this software and associated documentation files (the
|
data/bin/picasaweb
CHANGED
@@ -13,21 +13,38 @@
|
|
13
13
|
require 'picasaweb'
|
14
14
|
require 'optiflag'
|
15
15
|
|
16
|
+
def count_photos (albums)
|
17
|
+
count_photos = 0
|
18
|
+
albums.each do |a|
|
19
|
+
count_photos += a.photos.size
|
20
|
+
end
|
21
|
+
return count_photos
|
22
|
+
end
|
23
|
+
|
16
24
|
def download_album_images (url)
|
25
|
+
puts "Doing recon..."
|
17
26
|
my_album = PicasaAlbum.new( url )
|
27
|
+
puts "Looks good!"
|
28
|
+
puts "Album #{my_album.title} contains #{my_album.photos.size} photos."
|
18
29
|
`mkdir #{my_album.title}`
|
19
30
|
my_album.photos.each do |photo|
|
20
|
-
`wget --directory-prefix=#{my_album.title} #{photo.image}`
|
31
|
+
`wget -q --directory-prefix=#{my_album.title} #{photo.image}`
|
32
|
+
puts "Snagged #{my_album.title}/#{photo.title}"
|
21
33
|
end
|
22
34
|
end
|
23
35
|
|
24
36
|
def download_user_images (username)
|
25
|
-
|
37
|
+
puts "Doing recon..."
|
26
38
|
my_user = PicasaUser.new("http://picasaweb.google.com/" + username)
|
39
|
+
puts "Looks good!"
|
40
|
+
`mkdir #{username}`
|
41
|
+
count_albums = my_user.albums.size
|
42
|
+
puts "#{username} has #{count_albums} albums containing a total of #{count_photos(my_user.albums)} photos."
|
27
43
|
my_user.albums.each do |album|
|
28
44
|
`mkdir #{username}/#{album.title}`
|
29
45
|
album.photos.each do |photo|
|
30
|
-
`wget --directory-prefix=#{username}/#{album.title} #{photo.image}`
|
46
|
+
`wget -q --directory-prefix=#{username}/#{album.title} #{photo.image}`
|
47
|
+
puts "Snagged #{username}/#{album.title}/#{photo.title}"
|
31
48
|
end
|
32
49
|
end
|
33
50
|
end
|
data/lib/picasaweb.rb
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: picasaweb
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.0.
|
7
|
-
date: 2007-
|
6
|
+
version: 1.0.1
|
7
|
+
date: 2007-12-05 00:00:00 -05:00
|
8
8
|
summary: The author was too lazy to write a summary
|
9
9
|
require_paths:
|
10
10
|
- lib
|