multistockphoto 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +4 -0
- data/License.txt +20 -0
- data/Manifest.txt +33 -0
- data/PostInstall.txt +7 -0
- data/README.txt +48 -0
- data/Rakefile +4 -0
- data/bin/multistockphoto +69 -0
- data/config/hoe.rb +75 -0
- data/config/requirements.rb +15 -0
- data/config.yaml +9 -0
- data/lib/multistockphoto/generic_site.rb +9 -0
- data/lib/multistockphoto/multistockphoto.rb +7 -0
- data/lib/multistockphoto/photo.rb +7 -0
- data/lib/multistockphoto/site_aldi.rb +82 -0
- data/lib/multistockphoto/site_fotolia.rb +58 -0
- data/lib/multistockphoto/site_zoonar.rb +86 -0
- data/lib/multistockphoto/version.rb +9 -0
- data/lib/multistockphoto.rb +15 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/script/txt2html +82 -0
- data/setup.rb +1585 -0
- data/tasks/deployment.rake +34 -0
- data/tasks/environment.rake +7 -0
- data/tasks/website.rake +17 -0
- data/test/test_helper.rb +6 -0
- data/test/test_multistockphoto.rb +177 -0
- data/website/index.html +257 -0
- data/website/index.txt +188 -0
- data/website/javascripts/rounded_corners_lite.inc.js +285 -0
- data/website/stylesheets/screen.css +138 -0
- data/website/template.html.erb +48 -0
- metadata +100 -0
@@ -0,0 +1,34 @@
|
|
1
|
+
desc 'Release the website and new gem version'
|
2
|
+
task :deploy => [:check_version, :website, :release] do
|
3
|
+
puts "Remember to create SVN tag:"
|
4
|
+
puts "svn copy svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/trunk " +
|
5
|
+
"svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} "
|
6
|
+
puts "Suggested comment:"
|
7
|
+
puts "Tagging release #{CHANGES}"
|
8
|
+
end
|
9
|
+
|
10
|
+
desc 'Runs tasks website_generate and install_gem as a local deployment of the gem'
|
11
|
+
task :local_deploy => [:website_generate, :install_gem]
|
12
|
+
|
13
|
+
task :check_version do
|
14
|
+
unless ENV['VERSION']
|
15
|
+
puts 'Must pass a VERSION=x.y.z release version'
|
16
|
+
exit
|
17
|
+
end
|
18
|
+
unless ENV['VERSION'] == VERS
|
19
|
+
puts "Please update your version.rb to match the release version, currently #{VERS}"
|
20
|
+
exit
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
desc 'Install the package as a gem, without generating documentation(ri/rdoc)'
|
25
|
+
task :install_gem_no_doc => [:clean, :package] do
|
26
|
+
sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
|
27
|
+
end
|
28
|
+
|
29
|
+
namespace :manifest do
|
30
|
+
desc 'Recreate Manifest.txt to include ALL files'
|
31
|
+
task :refresh do
|
32
|
+
`rake check_manifest | patch -p0 > Manifest.txt`
|
33
|
+
end
|
34
|
+
end
|
data/tasks/website.rake
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
desc 'Generate website files'
|
2
|
+
task :website_generate => :ruby_env do
|
3
|
+
(Dir['website/**/*.txt'] - Dir['website/version*.txt']).each do |txt|
|
4
|
+
sh %{ #{RUBY_APP} script/txt2html #{txt} > #{txt.gsub(/txt$/,'html')} }
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
desc 'Upload website files to rubyforge'
|
9
|
+
task :website_upload do
|
10
|
+
host = "#{rubyforge_username}@rubyforge.org"
|
11
|
+
remote_dir = "/var/www/gforge-projects/#{PATH}/"
|
12
|
+
local_dir = 'website'
|
13
|
+
sh %{rsync -aCv #{local_dir}/ #{host}:#{remote_dir}}
|
14
|
+
end
|
15
|
+
|
16
|
+
desc 'Generate and upload website files'
|
17
|
+
task :website => [:website_generate, :website_upload, :publish_docs]
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,177 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/test_helper.rb'
|
2
|
+
|
3
|
+
|
4
|
+
class TestMultistockphoto < Test::Unit::TestCase
|
5
|
+
|
6
|
+
REAL_TRANSFER = false
|
7
|
+
|
8
|
+
def setup
|
9
|
+
@fotolia_user = ENV['FOTOLIA_USER']
|
10
|
+
@fotolia_password = ENV['FOTOLIA_PASSWORD']
|
11
|
+
@fotolia_ftp_user = ENV['FOTOLIA_FTP_USER']
|
12
|
+
@fotolia_ftp_password = ENV['FOTOLIA_FTP_PASSWORD']
|
13
|
+
@zoonar_user = ENV['ZOONAR_USER']
|
14
|
+
@zoonar_password = ENV['ZOONAR_PASSWORD']
|
15
|
+
@aldi_user = ENV['ALDI_USER']
|
16
|
+
@aldi_password = ENV['ALDI_PASSWORD']
|
17
|
+
end
|
18
|
+
|
19
|
+
|
20
|
+
def test_call_msp
|
21
|
+
assert_equal "multistockphoto 0.0.1\n", `ruby bin/multistockphoto --version`
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_transfer_all
|
25
|
+
if false
|
26
|
+
expected = "multistockphoto V. 0.1.0
|
27
|
+
end
|
28
|
+
end
|
29
|
+
transfering all photos
|
30
|
+
== transfering to fotolia.de
|
31
|
+
sending foto1.jpg ... OK
|
32
|
+
sending foto2.jpg ... OK
|
33
|
+
sending foto3.jpg ... OK
|
34
|
+
== transfering to site2.de
|
35
|
+
sending foto1.jpg ... OK
|
36
|
+
sending foto2.jpg ... OK
|
37
|
+
sending foto3.jpg ... OK
|
38
|
+
== transfering to site3.de
|
39
|
+
sending foto1.jpg ... OK
|
40
|
+
sending foto2.jpg ... OK
|
41
|
+
sending foto3.jpg ... OK
|
42
|
+
"
|
43
|
+
|
44
|
+
output = `system bin/multistockphoto --transfer-all`
|
45
|
+
|
46
|
+
assert_equal expected, output
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def after(d)
|
51
|
+
yield if DateTime.now > d
|
52
|
+
end
|
53
|
+
|
54
|
+
def test_site_object
|
55
|
+
if false
|
56
|
+
site1 = Site.new("Fotolia")
|
57
|
+
assert_kind_of Site, site1
|
58
|
+
assert_equal "Fotolia", site1.name
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def test_multistockphoto_group
|
63
|
+
if false
|
64
|
+
#msp = Multistockphoto::Transfer.new
|
65
|
+
fotolia = Fotolia.new
|
66
|
+
zoonar = Zoonar.new
|
67
|
+
msp.add_site fotolia
|
68
|
+
msp.add_site zoonar
|
69
|
+
msp.send_directory('upload')
|
70
|
+
assert ['fotolia','zoonar'], msp.sites
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
def test_fotolia
|
75
|
+
fotolia = Fotolia.new("Fotolia")
|
76
|
+
fotolia.ftp_user = @fotolia_ftp_user
|
77
|
+
fotolia.ftp_password = @fotolia_ftp_password
|
78
|
+
|
79
|
+
assert_kind_of Fotolia, fotolia
|
80
|
+
assert_equal "Fotolia", fotolia.name
|
81
|
+
|
82
|
+
fotolia.user = @fotolia_user
|
83
|
+
fotolia.password = @fotolia_password
|
84
|
+
|
85
|
+
assert_equal @fotolia_user, fotolia.user
|
86
|
+
assert_equal @fotolia_password, fotolia.password
|
87
|
+
|
88
|
+
end
|
89
|
+
|
90
|
+
def test_photo
|
91
|
+
photo = Photo.new("123.jpg")
|
92
|
+
assert_kind_of Photo, photo
|
93
|
+
assert_equal "123.jpg", photo.filename
|
94
|
+
end
|
95
|
+
|
96
|
+
def test_fotolia_transfer_1
|
97
|
+
if REAL_TRANSFER
|
98
|
+
fotolia = Fotolia.new("Fotolia")
|
99
|
+
fotolia.user = @fotolia_user
|
100
|
+
fotolia.password = @fotolia_password
|
101
|
+
photo = Photo.new("test/1234.jpg")
|
102
|
+
#assert fotolia.transfer(photo)
|
103
|
+
#TODO: zwei Gruende, warum das fehlschlagen kann:
|
104
|
+
# 1. Datei nicht vorhanden
|
105
|
+
# 2. Argument kein Photo-Objekt
|
106
|
+
# => bessere Tests
|
107
|
+
# assert_raise (RuntimeError) {
|
108
|
+
# fotolia.transfer("123.jpg")
|
109
|
+
# }
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
# def test_fotolia_transfer_existing_picture
|
114
|
+
# fotolia = Fotolia.new("Fotolia")
|
115
|
+
# fotolia.user = @fotolia_user
|
116
|
+
# fotolia.password = @fotolia_password
|
117
|
+
# photo = Photo.new("/media/LACIE/private/CF-Card/DCIM/119CANON/IMG_3267_zugeschnitten_blank_names.jpg")
|
118
|
+
# assert fotolia.transfer(photo)
|
119
|
+
# end
|
120
|
+
|
121
|
+
def test_fotolia_transfer_existing_no_duplicate_picture
|
122
|
+
if REAL_TRANSFER
|
123
|
+
fotolia = Fotolia.new("Fotolia")
|
124
|
+
fotolia.user = @fotolia_user
|
125
|
+
fotolia.password = @fotolia_password
|
126
|
+
fotolia.ftp_user = @fotolia_ftp_user
|
127
|
+
fotolia.ftp_password = @fotolia_ftp_password
|
128
|
+
photo = Photo.new("/media/LACIE/private/CF-Card/DCIM/119CANON/IMG_3267_zugeschnitten_blank_names.jpg")
|
129
|
+
assert_equal :duplicate, fotolia.transfer(photo)
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
def test_config_params_fotolia
|
134
|
+
fotolia = Fotolia.new("Fotolia Site")
|
135
|
+
assert fotolia.user
|
136
|
+
assert fotolia.password
|
137
|
+
assert fotolia.ftp_user
|
138
|
+
assert fotolia.ftp_password
|
139
|
+
assert_equal @fotolia_user, fotolia.user
|
140
|
+
assert_equal @fotolia_password, fotolia.password
|
141
|
+
assert_equal @fotolia_ftp_user, fotolia.ftp_user
|
142
|
+
assert_equal @fotolia_ftp_password, fotolia.ftp_password
|
143
|
+
end
|
144
|
+
|
145
|
+
def test_config_params_zoonar
|
146
|
+
zoonar = Zoonar.new("zoonar Site")
|
147
|
+
assert zoonar.user
|
148
|
+
assert zoonar.password
|
149
|
+
assert_equal @zoonar_user, zoonar.user
|
150
|
+
assert_equal @zoonar_password, zoonar.password
|
151
|
+
#kein ftp assert_equal @zoonar_ftp_user, zoonar.ftp_user
|
152
|
+
#kein ftp assert_equal @zoonar_ftp_password, zoonar.ftp_password
|
153
|
+
end
|
154
|
+
|
155
|
+
def test_aldi
|
156
|
+
site = Aldi.new("ALDI")
|
157
|
+
|
158
|
+
assert_kind_of Aldi, site
|
159
|
+
assert_equal "ALDI", site.name
|
160
|
+
|
161
|
+
site.user = @aldi_user
|
162
|
+
site.password = @aldi_password
|
163
|
+
|
164
|
+
assert site.user
|
165
|
+
assert site.password
|
166
|
+
|
167
|
+
assert_equal @aldi_user, site.user
|
168
|
+
assert_equal @aldi_password, site.password
|
169
|
+
end
|
170
|
+
|
171
|
+
def test_aldi_transfer
|
172
|
+
site = Aldi.new("ALDI")
|
173
|
+
photo = Photo.new("/media/LACIE/private/CF-Card/DCIM/119CANON/IMG_3267_zugeschnitten_blank_names.jpg")
|
174
|
+
site.transfer(photo)
|
175
|
+
|
176
|
+
end
|
177
|
+
end
|
data/website/index.html
ADDED
@@ -0,0 +1,257 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
|
+
<title>
|
8
|
+
multistockphoto
|
9
|
+
</title>
|
10
|
+
<script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
|
11
|
+
<style>
|
12
|
+
|
13
|
+
</style>
|
14
|
+
<script type="text/javascript">
|
15
|
+
window.onload = function() {
|
16
|
+
settings = {
|
17
|
+
tl: { radius: 10 },
|
18
|
+
tr: { radius: 10 },
|
19
|
+
bl: { radius: 10 },
|
20
|
+
br: { radius: 10 },
|
21
|
+
antiAlias: true,
|
22
|
+
autoPad: true,
|
23
|
+
validTags: ["div"]
|
24
|
+
}
|
25
|
+
var versionBox = new curvyCorners(settings, document.getElementById("version"));
|
26
|
+
versionBox.applyCornersToAll();
|
27
|
+
}
|
28
|
+
</script>
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="main">
|
32
|
+
|
33
|
+
<h1>multistockphoto</h1>
|
34
|
+
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/multistockphoto"; return false'>
|
35
|
+
<p>Get Version</p>
|
36
|
+
<a href="http://rubyforge.org/projects/multistockphoto" class="numbers">0.1.0</a>
|
37
|
+
</div>
|
38
|
+
<h1>→ ‘multistockphoto’</h1>
|
39
|
+
|
40
|
+
|
41
|
+
<h2>What</h2>
|
42
|
+
|
43
|
+
|
44
|
+
<p>This program is intended to work with the german versions of the photo sites fotolia.de and zoonar.de.
|
45
|
+
Photographers can upload their photos to this sites.
|
46
|
+
Currently it works only with the german version. If you’re interested to adapt
|
47
|
+
it to other languages please email me.</p>
|
48
|
+
|
49
|
+
|
50
|
+
<p>Dieses Programm bietet bequemen Upload von eigenen Photos zu Photo-Seiten wie
|
51
|
+
fotolia.de, zoonar.de oder anderen, bei denen man eigene Bilder zum Verkauf
|
52
|
+
anbieten kann.
|
53
|
+
Neue Photos werden automatisch zu allen Seiten hochgeladen, bei denen man
|
54
|
+
registriert ist.</p>
|
55
|
+
|
56
|
+
|
57
|
+
<h2>Installing</h2>
|
58
|
+
|
59
|
+
|
60
|
+
<p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">multistockphoto</span></pre></p>
|
61
|
+
|
62
|
+
|
63
|
+
<h2>The basics</h2>
|
64
|
+
|
65
|
+
|
66
|
+
<p>Nach der Installation lege irgendwo einen Ordner namens ‘multistockphoto’ an!
|
67
|
+
Innerhalb dieses Ordners lege bitte einen weiteren Ordner namens ‘upload’ an!</p>
|
68
|
+
|
69
|
+
|
70
|
+
<p>Du benötigst jetzt noch eine Datei namens ‘config.yaml’ mit folgendem Inhalt:</p>
|
71
|
+
|
72
|
+
|
73
|
+
<pre>
|
74
|
+
---
|
75
|
+
:zoonar:
|
76
|
+
:password: 'lalala'
|
77
|
+
:user: 'hugo'
|
78
|
+
:fotolia:
|
79
|
+
:user: 'hugo'
|
80
|
+
:password: 'lalal9589'
|
81
|
+
:ftp_user: '34567798'
|
82
|
+
:ftp_password: 'hugolala19589'
|
83
|
+
</pre>
|
84
|
+
|
85
|
+
<p>Trage dort deine Zugangsdaten ein! Achtung: Die Einrückung links ist wichtig.
|
86
|
+
Im Gem-Directory ist eine Vorlage, die du kopieren kannst.
|
87
|
+
Wenn du nicht bei allen aufgelisteten Sites Mitglied bist oder die Bilder dort
|
88
|
+
hochladen möchtest, dann lösche einfach
|
89
|
+
die entsprechenden Abschnitte – du ersparst dir und den jeweiligen Servern
|
90
|
+
unnötige Last, die bei fehlerhaften Einloggversuchen vergeudet wird.</p>
|
91
|
+
|
92
|
+
|
93
|
+
<p>Wenn du ein oder mehrere neue Bilder hochladen willst, kopiere die Bilddateien
|
94
|
+
in den upload-Ordner!
|
95
|
+
Dann rufe (innerhalb des multistockphoto-Ordners) das Kommando</p>
|
96
|
+
|
97
|
+
|
98
|
+
<pre>
|
99
|
+
multistockphoto --send-all
|
100
|
+
</pre>
|
101
|
+
|
102
|
+
<p>auf! Dieses erledigt den Upload aller neuen Photos zu allen definierten
|
103
|
+
Photo-Sites.</p>
|
104
|
+
|
105
|
+
|
106
|
+
<p>Die Photo-Dateien im upload-Ordner müssen nach dem Upload nicht gelöscht
|
107
|
+
werden – bei einem weiteren Aufruf werden bereits gesendete Photos nicht noch
|
108
|
+
einmal gesendet.</p>
|
109
|
+
|
110
|
+
|
111
|
+
<p>Alle Dateien mit den Endungen .PNG, .JPG, .GIF, .JPEG werden hochgeladen. Groß-
|
112
|
+
oder Kleinschreibung ist egal.</p>
|
113
|
+
|
114
|
+
|
115
|
+
<p>Das Programm erstellt (im Directory multistockphoto) eine Datei namens
|
116
|
+
‘sendeliste.dat’, in der die erfolgreichen Uploads mit Site, Dateiname und
|
117
|
+
Datum/Uhrzeit protokolliert werden. Diese Datei darf nicht gelöscht werden,
|
118
|
+
da diese Datei auch dazu dient, festzustellen, ob ein Datei schon gesendet
|
119
|
+
wurde.
|
120
|
+
Kurz: falls eine Photo-Datei in dieser Datei noch nicht auftaucht, wird
|
121
|
+
sie an die betreffende Seit gesendet. Bei Problemen bei einzelnen Uploads kann
|
122
|
+
man aber in dieser Datei z.B. eine Zeile löschen, was zur Folge hat, daß
|
123
|
+
diese Datei beim nächsten Aufruf erneut hochgeladen wird.</p>
|
124
|
+
|
125
|
+
|
126
|
+
<p>Je nach Photo-Site mußt du dann dort online noch Stichworte und ggf. andere
|
127
|
+
Daten zu den einzelnen Bildern eintragen.</p>
|
128
|
+
|
129
|
+
|
130
|
+
<p>Einzelne Sites handhaben dies unterschiedlich.</p>
|
131
|
+
|
132
|
+
|
133
|
+
<p>Beispiel: Bei fotolia.de mußt du deine Photos hochladen, dann noch Stichworte
|
134
|
+
und verschiedene Vertragsbedingungen festlegen. Dann erst werden deine Bilder
|
135
|
+
geprüft und entweder angenommen oder abgelehnt.</p>
|
136
|
+
|
137
|
+
|
138
|
+
<p>Bei zoonar.de wiederum läuft es so, daß du erst nur die Bilder hochlädst, dann
|
139
|
+
werden sie begutachtet; angenommen oder abgelehnt und erst wenn sie
|
140
|
+
angenommen wurden, kannst du Schlagworte vergeben. Dies hat natürlich den
|
141
|
+
Vorteil, daß man für abgelehnte Photos erst gar keine Schlagworte vergeben muß
|
142
|
+
(kann).</p>
|
143
|
+
|
144
|
+
|
145
|
+
<p>Diese Nachbearbeitung auf der jeweiligen Seite ist derzeit noch nötig, es ist aber
|
146
|
+
geplant, daß auch z.B. die Schlagworte von diesem Programm schon gesetzt werden
|
147
|
+
können.</p>
|
148
|
+
|
149
|
+
|
150
|
+
<h2>Demonstration of usage</h2>
|
151
|
+
|
152
|
+
|
153
|
+
<p>Wechseln in Arbeitsdirectory:</p>
|
154
|
+
|
155
|
+
|
156
|
+
<pre>$ cd multistockphoto
|
157
|
+
</pre>
|
158
|
+
|
159
|
+
<pre>
|
160
|
+
$ multistockphoto --help
|
161
|
+
Usage: multistockphoto [-hvsa]
|
162
|
+
|
163
|
+
Specific options:
|
164
|
+
|
165
|
+
Common options:
|
166
|
+
-h, --help Show this message
|
167
|
+
-v, --version Show version
|
168
|
+
-sa, --send-all Send all files
|
169
|
+
</pre>
|
170
|
+
|
171
|
+
<p>Senden aller noch nicht hochgeladenen Photos:</p>
|
172
|
+
|
173
|
+
|
174
|
+
<pre>
|
175
|
+
$ multistockphoto --send-all
|
176
|
+
send-all
|
177
|
+
upload/img_2746.jpg
|
178
|
+
fotolia:upload/img_2746.jpg
|
179
|
+
zoonar:upload/img_2746.jpg
|
180
|
+
</pre>
|
181
|
+
|
182
|
+
<h2>Forum</h2>
|
183
|
+
|
184
|
+
|
185
|
+
<p><a href="http://groups.google.com/group/multistockphoto">http://groups.google.com/group/multistockphoto</a></p>
|
186
|
+
|
187
|
+
|
188
|
+
<h2>How to submit patches</h2>
|
189
|
+
|
190
|
+
|
191
|
+
<p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people’s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
|
192
|
+
|
193
|
+
|
194
|
+
<p><span class="caps">TODO</span> – pick <span class="caps">SVN</span> or Git instructions</p>
|
195
|
+
|
196
|
+
|
197
|
+
<p>The trunk repository is <code>svn://rubyforge.org/var/svn/multistockphoto/trunk</code> for anonymous access.</p>
|
198
|
+
|
199
|
+
|
200
|
+
<p><span class="caps">OOOORRRR</span></p>
|
201
|
+
|
202
|
+
|
203
|
+
<p>You can fetch the source from either:</p>
|
204
|
+
|
205
|
+
|
206
|
+
<ul>
|
207
|
+
<li>rubyforge: <a href="http://rubyforge.org/scm/?group_id=6180">http://rubyforge.org/scm/?group_id=6180</a></li>
|
208
|
+
</ul>
|
209
|
+
|
210
|
+
|
211
|
+
<pre>git clone git://rubyforge.org/multistockphoto.git</pre>
|
212
|
+
|
213
|
+
<ul>
|
214
|
+
<li>github: <a href="http://github.com/GITHUB_USERNAME/multistockphoto/tree/master">http://github.com/GITHUB_USERNAME/multistockphoto/tree/master</a></li>
|
215
|
+
</ul>
|
216
|
+
|
217
|
+
|
218
|
+
<pre>git clone git://github.com/GITHUB_USERNAME/multistockphoto.git</pre>
|
219
|
+
|
220
|
+
<p><span class="caps">TODO</span> – add “github_username: username” to ~/.rubyforge/user-config.yml and newgem will reuse it for future projects.</p>
|
221
|
+
|
222
|
+
|
223
|
+
<ul>
|
224
|
+
<li>gitorious: <a href="git://gitorious.org/multistockphoto/mainline.git">git://gitorious.org/multistockphoto/mainline.git</a></li>
|
225
|
+
</ul>
|
226
|
+
|
227
|
+
|
228
|
+
<pre>git clone git://gitorious.org/multistockphoto/mainline.git</pre>
|
229
|
+
|
230
|
+
<h3>Build and test instructions</h3>
|
231
|
+
|
232
|
+
|
233
|
+
<pre>cd multistockphoto
|
234
|
+
rake test
|
235
|
+
rake install_gem</pre>
|
236
|
+
|
237
|
+
<h2>License</h2>
|
238
|
+
|
239
|
+
|
240
|
+
<p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p>
|
241
|
+
|
242
|
+
|
243
|
+
<h2>Contact</h2>
|
244
|
+
|
245
|
+
|
246
|
+
<p>Comments are welcome. Send an email to <a href="mailto:thopre@gmail.com">Thomas Preymesser</a> email
|
247
|
+
or via the <a href="http://groups.google.com/group/multistockphoto">forum</a></p>
|
248
|
+
<p class="coda">
|
249
|
+
<a href="FIXME email">FIXME full name</a>, 6th May 2008<br>
|
250
|
+
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
251
|
+
</p>
|
252
|
+
</div>
|
253
|
+
|
254
|
+
<!-- insert site tracking codes here, like Google Urchin -->
|
255
|
+
|
256
|
+
</body>
|
257
|
+
</html>
|
data/website/index.txt
ADDED
@@ -0,0 +1,188 @@
|
|
1
|
+
h1. multistockphoto
|
2
|
+
|
3
|
+
h1. → 'multistockphoto'
|
4
|
+
|
5
|
+
|
6
|
+
h2. What
|
7
|
+
|
8
|
+
This program is intended to work with the german versions of the photo sites fotolia.de and zoonar.de.
|
9
|
+
Photographers can upload their photos to this sites.
|
10
|
+
Currently it works only with the german version. If you're interested to adapt
|
11
|
+
it to other languages please email me.
|
12
|
+
|
13
|
+
Dieses Programm bietet bequemen Upload von eigenen Photos zu Photo-Seiten wie
|
14
|
+
fotolia.de, zoonar.de oder anderen, bei denen man eigene Bilder zum Verkauf
|
15
|
+
anbieten kann.
|
16
|
+
Neue Photos werden automatisch zu allen Seiten hochgeladen, bei denen man
|
17
|
+
registriert ist.
|
18
|
+
|
19
|
+
h2. Installing
|
20
|
+
|
21
|
+
<pre syntax="ruby">sudo gem install multistockphoto</pre>
|
22
|
+
|
23
|
+
h2. The basics
|
24
|
+
|
25
|
+
Nach der Installation lege irgendwo einen Ordner namens 'multistockphoto' an!
|
26
|
+
Innerhalb dieses Ordners lege bitte einen weiteren Ordner namens 'upload' an!
|
27
|
+
|
28
|
+
Du benötigst jetzt noch eine Datei namens 'config.yaml' mit folgendem Inhalt:
|
29
|
+
|
30
|
+
<pre>
|
31
|
+
---
|
32
|
+
:zoonar:
|
33
|
+
:password: 'lalala'
|
34
|
+
:user: 'hugo'
|
35
|
+
:fotolia:
|
36
|
+
:user: 'hugo'
|
37
|
+
:password: 'lalal9589'
|
38
|
+
:ftp_user: '34567798'
|
39
|
+
:ftp_password: 'hugolala19589'
|
40
|
+
</pre>
|
41
|
+
|
42
|
+
Trage dort deine Zugangsdaten ein! Achtung: Die Einrückung links ist wichtig.
|
43
|
+
Im Gem-Directory ist eine Vorlage, die du kopieren kannst.
|
44
|
+
Wenn du nicht bei allen aufgelisteten Sites Mitglied bist oder die Bilder dort
|
45
|
+
hochladen möchtest, dann lösche einfach
|
46
|
+
die entsprechenden Abschnitte - du ersparst dir und den jeweiligen Servern
|
47
|
+
unnötige Last, die bei fehlerhaften Einloggversuchen vergeudet wird.
|
48
|
+
|
49
|
+
Wenn du ein oder mehrere neue Bilder hochladen willst, kopiere die Bilddateien
|
50
|
+
in den upload-Ordner!
|
51
|
+
Dann rufe (innerhalb des multistockphoto-Ordners) das Kommando
|
52
|
+
|
53
|
+
<pre>
|
54
|
+
multistockphoto --send-all
|
55
|
+
</pre>
|
56
|
+
|
57
|
+
auf! Dieses erledigt den Upload aller neuen Photos zu allen definierten
|
58
|
+
Photo-Sites.
|
59
|
+
|
60
|
+
Die Photo-Dateien im upload-Ordner müssen nach dem Upload nicht gelöscht
|
61
|
+
werden - bei einem weiteren Aufruf werden bereits gesendete Photos nicht noch
|
62
|
+
einmal gesendet.
|
63
|
+
|
64
|
+
Alle Dateien mit den Endungen .PNG, .JPG, .GIF, .JPEG werden hochgeladen. Groß-
|
65
|
+
oder Kleinschreibung ist egal.
|
66
|
+
|
67
|
+
Das Programm erstellt (im Directory multistockphoto) eine Datei namens
|
68
|
+
'sendeliste.dat', in der die erfolgreichen Uploads mit Site, Dateiname und
|
69
|
+
Datum/Uhrzeit protokolliert werden. Diese Datei darf nicht gelöscht werden,
|
70
|
+
da diese Datei auch dazu dient, festzustellen, ob ein Datei schon gesendet
|
71
|
+
wurde.
|
72
|
+
Kurz: falls eine Photo-Datei in dieser Datei noch nicht auftaucht, wird
|
73
|
+
sie an die betreffende Seit gesendet. Bei Problemen bei einzelnen Uploads kann
|
74
|
+
man aber in dieser Datei z.B. eine Zeile löschen, was zur Folge hat, daß
|
75
|
+
diese Datei beim nächsten Aufruf erneut hochgeladen wird.
|
76
|
+
|
77
|
+
Je nach Photo-Site mußt du dann dort online noch Stichworte und ggf. andere
|
78
|
+
Daten zu den einzelnen Bildern eintragen.
|
79
|
+
|
80
|
+
Einzelne Sites handhaben dies unterschiedlich.
|
81
|
+
|
82
|
+
Beispiel: Bei fotolia.de mußt du deine Photos hochladen, dann noch Stichworte
|
83
|
+
und verschiedene Vertragsbedingungen festlegen. Dann erst werden deine Bilder
|
84
|
+
geprüft und entweder angenommen oder abgelehnt.
|
85
|
+
|
86
|
+
Bei zoonar.de wiederum läuft es so, daß du erst nur die Bilder hochlädst, dann
|
87
|
+
werden sie begutachtet; angenommen oder abgelehnt und erst wenn sie
|
88
|
+
angenommen wurden, kannst du Schlagworte vergeben. Dies hat natürlich den
|
89
|
+
Vorteil, daß man für abgelehnte Photos erst gar keine Schlagworte vergeben muß
|
90
|
+
(kann).
|
91
|
+
|
92
|
+
Diese Nachbearbeitung auf der jeweiligen Seite ist derzeit noch nötig, es ist aber
|
93
|
+
geplant, daß auch z.B. die Schlagworte von diesem Programm schon gesetzt werden
|
94
|
+
können.
|
95
|
+
|
96
|
+
h2. Demonstration of usage
|
97
|
+
|
98
|
+
Wechseln in Arbeitsdirectory:
|
99
|
+
|
100
|
+
<pre>$ cd multistockphoto
|
101
|
+
</pre>
|
102
|
+
|
103
|
+
<pre>
|
104
|
+
$ multistockphoto --help
|
105
|
+
Usage: multistockphoto [-hvsa]
|
106
|
+
|
107
|
+
Specific options:
|
108
|
+
|
109
|
+
Common options:
|
110
|
+
-h, --help Show this message
|
111
|
+
-v, --version Show version
|
112
|
+
-sa, --send-all Send all files
|
113
|
+
</pre>
|
114
|
+
|
115
|
+
Senden aller noch nicht hochgeladenen Photos:
|
116
|
+
|
117
|
+
<pre>
|
118
|
+
$ multistockphoto --send-all
|
119
|
+
send-all
|
120
|
+
upload/img_2746.jpg
|
121
|
+
fotolia:upload/img_2746.jpg
|
122
|
+
zoonar:upload/img_2746.jpg
|
123
|
+
</pre>
|
124
|
+
|
125
|
+
h2. Forum
|
126
|
+
|
127
|
+
"http://groups.google.com/group/multistockphoto":http://groups.google.com/group/multistockphoto
|
128
|
+
|
129
|
+
|
130
|
+
h2. How to submit patches
|
131
|
+
|
132
|
+
Read the "8 steps for fixing other people's code":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/ and for section "8b: Submit patch to Google Groups":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups, use the Google Group above.
|
133
|
+
|
134
|
+
TODO - pick SVN or Git instructions
|
135
|
+
|
136
|
+
The trunk repository is <code>svn://rubyforge.org/var/svn/multistockphoto/trunk</code> for anonymous access.
|
137
|
+
|
138
|
+
OOOORRRR
|
139
|
+
|
140
|
+
You can fetch the source from either:
|
141
|
+
|
142
|
+
<% if rubyforge_project_id %>
|
143
|
+
|
144
|
+
* rubyforge: "http://rubyforge.org/scm/?group_id=<%= rubyforge_project_id %>":http://rubyforge.org/scm/?group_id=<%= rubyforge_project_id %>
|
145
|
+
|
146
|
+
<pre>git clone git://rubyforge.org/multistockphoto.git</pre>
|
147
|
+
|
148
|
+
<% else %>
|
149
|
+
|
150
|
+
* rubyforge: MISSING IN ACTION
|
151
|
+
|
152
|
+
TODO - You can not created a RubyForge project, OR have not run <code>rubyforge config</code>
|
153
|
+
yet to refresh your local rubyforge data with this projects' id information.
|
154
|
+
|
155
|
+
When you do this, this message will magically disappear!
|
156
|
+
|
157
|
+
Or you can hack website/index.txt and make it all go away!!
|
158
|
+
|
159
|
+
<% end %>
|
160
|
+
|
161
|
+
* github: "http://github.com/GITHUB_USERNAME/multistockphoto/tree/master":http://github.com/GITHUB_USERNAME/multistockphoto/tree/master
|
162
|
+
|
163
|
+
<pre>git clone git://github.com/GITHUB_USERNAME/multistockphoto.git</pre>
|
164
|
+
|
165
|
+
|
166
|
+
TODO - add "github_username: username" to ~/.rubyforge/user-config.yml and newgem will reuse it for future projects.
|
167
|
+
|
168
|
+
|
169
|
+
* gitorious: "git://gitorious.org/multistockphoto/mainline.git":git://gitorious.org/multistockphoto/mainline.git
|
170
|
+
|
171
|
+
<pre>git clone git://gitorious.org/multistockphoto/mainline.git</pre>
|
172
|
+
|
173
|
+
h3. Build and test instructions
|
174
|
+
|
175
|
+
<pre>cd multistockphoto
|
176
|
+
rake test
|
177
|
+
rake install_gem</pre>
|
178
|
+
|
179
|
+
|
180
|
+
h2. License
|
181
|
+
|
182
|
+
This code is free to use under the terms of the MIT license.
|
183
|
+
|
184
|
+
h2. Contact
|
185
|
+
|
186
|
+
Comments are welcome. Send an email to "Thomas Preymesser":mailto:thopre@gmail.com email
|
187
|
+
or via the "forum":http://groups.google.com/group/multistockphoto
|
188
|
+
|