multistockphoto 0.6.0 → 0.6.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,6 @@
1
+ == 0.6.1 2008-06-13
2
+ * 1 bug fix
3
+ * hm, das Schreiben von Keywords scheint nicht aktiviert gewesen zu sein...
1
4
  == 0.6.0 2008-06-10
2
5
  * 4 enhancements
3
6
  * Sendedauer fuer jedes Photo beim Senden auflisten
@@ -65,7 +65,7 @@ class Photo
65
65
  puts "tags file #{fn} found"
66
66
  tags = Photo.to_tags(lines)
67
67
  self.tags = tags
68
- #puts "writing tags to file"
68
+ puts "writing tags to file"
69
69
  write_keywords
70
70
  rescue Errno::ENOENT
71
71
  warn "WARNING: no tags file #{fn}"
@@ -7,6 +7,7 @@ class Fotolia < GenericSite
7
7
 
8
8
  @@errors = 0
9
9
 
10
+ attr_reader :total_per_day
10
11
  attr_accessor :ftp_user, :ftp_password, :max_errors
11
12
 
12
13
  FTP_HOST = 'submit.fotolia.com'
@@ -53,6 +54,9 @@ class Fotolia < GenericSite
53
54
  photo.drehen
54
55
  end
55
56
  end
57
+ if site_can_handle_keywords?
58
+ photo.set_keywords
59
+ end
56
60
  if ! dont_send
57
61
  begin
58
62
  ftp = Net::FTP.new(FTP_HOST)
@@ -77,24 +81,23 @@ class Fotolia < GenericSite
77
81
  true
78
82
  end
79
83
 
80
- def total_per_day
81
- @total_per_day
82
- end
83
-
84
+ # def total_per_day
85
+ # @total_per_day
86
+ # end
87
+ #
84
88
  def sent_today
85
89
  site = 'fotolia'
86
90
  return sent_today_site(site)
87
91
  end
88
92
 
89
93
  def already_sent?(photo)
90
- already_sent_site?(photo,'fotolia')
91
- # unless photo.class == Photo
92
- # raise 'not a Photo object'
93
- # end
94
- # unless File.exist?(photo.filename)
95
- # raise "file #{photo.filename} does not exist"
96
- # end
97
- # g = grep(SENDLIST, /fotolia\t#{photo.filename}/)
98
- # return g.size > 0
94
+ already_sent_site?(photo,'fotolia')
95
+ end
96
+
97
+ private
98
+
99
+ def site_can_handle_keywords?
100
+ true
99
101
  end
100
- end
102
+
103
+ end # class
@@ -5,6 +5,8 @@ include Grep
5
5
 
6
6
  class Photocase < GenericSite
7
7
  @@errors = 0
8
+
9
+ attr_reader :total_per_day
8
10
  attr_accessor :user, :password, :max_errors
9
11
 
10
12
  def initialize(name)
@@ -44,6 +46,10 @@ class Photocase < GenericSite
44
46
  photo.drehen
45
47
  end
46
48
  end
49
+ if site_can_handle_keywords?
50
+ photo.set_keywords
51
+ end
52
+
47
53
  if ! dont_send
48
54
  agent = WWW::Mechanize.new
49
55
  agent.user_agent_alias = 'Linux Mozilla'
@@ -108,9 +114,9 @@ class Photocase < GenericSite
108
114
  true
109
115
  end
110
116
 
111
- def total_per_day
112
- @total_per_day
113
- end
117
+ # def total_per_day
118
+ # @total_per_day
119
+ # end
114
120
 
115
121
  def sent_today
116
122
  site = 'photocase'
@@ -129,4 +135,10 @@ class Photocase < GenericSite
129
135
  # g = grep(SENDLIST, /photocase\t#{photo.filename}/)
130
136
  # return g.size > 0
131
137
  end
138
+
139
+ private
140
+
141
+ def site_can_handle_keywords?
142
+ true # TODO: ueberpruefen, ob richtig?
143
+ end
132
144
  end
@@ -7,6 +7,7 @@ class Zoonar < GenericSite
7
7
 
8
8
  @@errors = 0
9
9
 
10
+ attr_reader :total_per_day
10
11
  attr_accessor :user, :password, :max_errors
11
12
 
12
13
  def initialize(name)
@@ -47,6 +48,10 @@ class Zoonar < GenericSite
47
48
  photo.drehen
48
49
  end
49
50
  end
51
+ if site_can_handle_keywords?
52
+ photo.set_keywords
53
+ end
54
+
50
55
  unless dont_send
51
56
  agent = WWW::Mechanize.new
52
57
  agent.user_agent_alias = 'Linux Mozilla'
@@ -110,9 +115,9 @@ Falls wir das Bild ablehnen sollten, werden Sie eine Benachrichtigung per E-Mail
110
115
  true
111
116
  end
112
117
 
113
- def total_per_day
114
- @total_per_day
115
- end
118
+ # def total_per_day
119
+ # @total_per_day
120
+ # end
116
121
 
117
122
  def sent_today
118
123
  site = 'zoonar'
@@ -120,15 +125,12 @@ Falls wir das Bild ablehnen sollten, werden Sie eine Benachrichtigung per E-Mail
120
125
  end
121
126
 
122
127
  def already_sent?(photo)
123
- already_sent_site?(photo,'zoonar')
124
- #
125
- # unless photo.class == Photo
126
- # raise 'not a Photo object'
127
- # end
128
- # unless File.exist?(photo.filename)
129
- # raise "file #{photo.filename} does not exist"
130
- # end
131
- # g = grep(SENDLIST, /zoonar\t#{photo.filename}/)
132
- # return g.size > 0
128
+ already_sent_site?(photo,'zoonar')
129
+ end
130
+
131
+ private
132
+
133
+ def site_can_handle_keywords?
134
+ true
133
135
  end
134
136
  end
@@ -2,7 +2,7 @@ module Multistockphoto #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 6
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/website/index.html CHANGED
@@ -33,7 +33,7 @@
33
33
  <h1>multistockphoto</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/multistockphoto"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/multistockphoto" class="numbers">0.6.0</a>
36
+ <a href="http://rubyforge.org/projects/multistockphoto" class="numbers">0.6.1</a>
37
37
  </div>
38
38
  <h1>&#x2192; &#8216;multistockphoto&#8217;</h1>
39
39
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multistockphoto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Preymesser
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-06-11 00:00:00 +02:00
12
+ date: 2008-06-13 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15