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 CHANGED
@@ -1,3 +1,7 @@
1
+ == 1.0.1 / 2007-12-05
2
+
3
+ * Command-line tool now less talkative, more informative.
4
+
1
5
  == 1.0.0 / 2007-11-29
2
6
 
3
7
  * 1 major enhancement
data/Manifest.txt CHANGED
@@ -4,4 +4,5 @@ README.txt
4
4
  Rakefile
5
5
  bin/picasaweb
6
6
  lib/picasaweb.rb
7
- test/test_picasaweb.rb
7
+ test/test_picasaweb.rb
8
+
data/README.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  picasaweb
2
2
  by Logan Koester
3
- http://logankoester.com/tools/picasaweb
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 FIX
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
- `mkdir #{username}`
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
@@ -14,7 +14,7 @@
14
14
  %w{rubygems rss/1.0 rss/2.0 open-uri hpricot}.each { |requirement| require requirement }
15
15
 
16
16
  class Picasaweb
17
- VERSION = '1.0.0'
17
+ VERSION = '1.0.1'
18
18
  def parse_rss (source)
19
19
  # Parse an RSS feed
20
20
  # See http://www.rubyrss.com/
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.0
7
- date: 2007-11-29 00:00:00 -05:00
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