Piggy 0.4.2.2 → 0.4.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.txt +12 -0
- data/INSTALL.txt +91 -36
- data/lib/piggy-core/options.rb +11 -4
- data/lib/piggy-core/thumbnail_page_generator.rb +3 -3
- data/lib/piggy-core/version.rb +1 -1
- data/lib/piggy-core/winshell.rb +12 -5
- data/lib/piggy-gui/dir_chooser.rb +46 -0
- data/lib/piggy-gui/directory_diff_widget.rb +40 -13
- data/lib/piggy-gui/ftp_browser_widget.rb +5 -1
- data/lib/piggy-gui/html_generation_dialog.rb +36 -32
- data/lib/piggy-gui/modal_dialog.rb +64 -0
- data/lib/piggy-gui/options_dialog.rb +34 -9
- data/lib/piggy-gui/piggy_image_browser.rb +5 -15
- data/lib/templates/styles/shadow_D9F5F3/lo.jpg +0 -0
- data/lib/templates/styles/shadow_D9F5F3/lu.jpg +0 -0
- data/lib/templates/styles/shadow_D9F5F3/ro.jpg +0 -0
- data/lib/templates/styles/shadow_D9F5F3/ru.jpg +0 -0
- data/lib/templates/styles/shadow_D9F5F3/style.css +73 -0
- metadata +18 -19
- data/web/IMAGE_PROCESSING.txt +0 -53
- data/web/INSTALL.txt +0 -74
- data/web/extern.gif +0 -0
- data/web/ftp-browser.png +0 -0
- data/web/index-de.html +0 -60
- data/web/index.html +0 -57
- data/web/piggy.png +0 -0
- data/web/style.css +0 -14
data/CHANGES.txt
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
Changes in 0.4.2-3
|
2
|
+
- Bugfix: Convert /^~/ to home directory
|
3
|
+
- Usability of modal dialogs (e. g. validate before accept)
|
4
|
+
- Added installation description for SUSE linux
|
5
|
+
- Added installation description for Mac OS X
|
6
|
+
- Added directory choosers for directory fields
|
7
|
+
- Added style shadow_D9F5F3
|
8
|
+
- Provide platform independent default options
|
9
|
+
- Browser is now an option
|
10
|
+
- Layout: FTP-browser fields wider
|
11
|
+
- Smaller gem without web content
|
12
|
+
|
1
13
|
Changes in Version 0.4.2-2
|
2
14
|
- Bugfix: Changing the size of the cancas had an effect
|
3
15
|
on the image view's quality
|
data/INSTALL.txt
CHANGED
@@ -17,11 +17,71 @@ You might be using the Ruby Windows Installer, so you
|
|
17
17
|
probably have FXRuby and most of the other required libraries
|
18
18
|
installed on your system.
|
19
19
|
|
20
|
-
|
20
|
+
You can now install piggy with the gem install command
|
21
|
+
|
22
|
+
gem install Piggy
|
23
|
+
|
24
|
+
|
25
|
+
Rubygems will check if the required gems rubyzip and exifr are installed on your
|
26
|
+
system.
|
21
27
|
|
22
|
-
|
23
|
-
|
24
|
-
|
28
|
+
(Note that for now the gem command won't check if FXRuby is installed
|
29
|
+
on your system, so you'll be able to install FXRuby via gem or from source.)
|
30
|
+
|
31
|
+
Gem installation might fail if you don't have the rights
|
32
|
+
to write the gem directories. You'll need to become admin
|
33
|
+
to get rid of these errors.
|
34
|
+
|
35
|
+
-------------------
|
36
|
+
openSUSE Linux 10.3
|
37
|
+
-------------------
|
38
|
+
|
39
|
+
First install some RPM packages:
|
40
|
+
- ruby 1.8.x
|
41
|
+
- rubygems
|
42
|
+
- fox16-devel
|
43
|
+
- gcc-c++
|
44
|
+
|
45
|
+
Additional recommended RPM packages:
|
46
|
+
- ruby-RMagick
|
47
|
+
- rubygem-rake
|
48
|
+
|
49
|
+
Ruby gems:
|
50
|
+
- FXRuby 1.6.x (ruby)
|
51
|
+
- Piggy
|
52
|
+
|
53
|
+
Sample installation session for these gems:
|
54
|
+
|
55
|
+
> sudo gem install fxruby
|
56
|
+
Passwort:
|
57
|
+
Select which gem to install for your platform (i586-linux)
|
58
|
+
1. fxruby 1.6.14 (universal-darwin-9)
|
59
|
+
2. fxruby 1.6.14 (mswin32)
|
60
|
+
3. fxruby 1.6.14 (ruby)
|
61
|
+
4. fxruby 1.6.13 (ruby)
|
62
|
+
5. fxruby 1.6.13 (mswin32)
|
63
|
+
6. Skip this gem
|
64
|
+
7. Cancel installation
|
65
|
+
> 3
|
66
|
+
Building native extensions. This could take a while...
|
67
|
+
Successfully installed fxruby-1.6.14
|
68
|
+
Installing ri documentation for fxruby-1.6.14...
|
69
|
+
Installing RDoc documentation for fxruby-1.6.14...
|
70
|
+
> sudo gem install piggy
|
71
|
+
Bulk updating Gem source index for: http://gems.rubyforge.org
|
72
|
+
Install required dependency rubyzip? [Yn] Y
|
73
|
+
Install required dependency exifr? [Yn] Y
|
74
|
+
Successfully installed Piggy-0.4.2.2
|
75
|
+
Successfully installed rubyzip-0.9.1
|
76
|
+
Successfully installed exifr-0.10.6
|
77
|
+
Installing ri documentation for Piggy-0.4.2.2...
|
78
|
+
Installing ri documentation for exifr-0.10.6...
|
79
|
+
Installing RDoc documentation for Piggy-0.4.2.2...
|
80
|
+
Installing RDoc documentation for exifr-0.10.6...
|
81
|
+
|
82
|
+
--------------------------------
|
83
|
+
Debian Linux (might be outdated)
|
84
|
+
--------------------------------
|
25
85
|
|
26
86
|
Use any package manager you like (apt, aptitude, kpackage,...)
|
27
87
|
to install the following debian packages:
|
@@ -30,48 +90,43 @@ libruby
|
|
30
90
|
libyaml-ruby
|
31
91
|
libzlib-ruby
|
32
92
|
rdoc
|
93
|
+
libfox-1.6-dev
|
33
94
|
|
34
|
-
|
35
|
-
|
36
|
-
There is a gem availiable but I recommend that you use a debian package
|
37
|
-
instead. You'll have to add the following lines to the sources.list:
|
95
|
+
Continue with gem installation of FXRuby:
|
96
|
+
$ sudo gem install FXRuby
|
38
97
|
|
39
|
-
|
40
|
-
|
41
|
-
deb http://freeride.rubyforge.org/debian/ deb/
|
42
|
-
deb-src http://freeride.rubyforge.org/debian/ src/
|
43
|
-
<<
|
98
|
+
Continue with gem installation of Piggy:
|
99
|
+
$ sudo gem install Piggy
|
44
100
|
|
45
|
-
|
46
|
-
|
101
|
+
-------------
|
102
|
+
Mac OS X 10.5
|
103
|
+
-------------
|
47
104
|
|
48
|
-
|
105
|
+
Leopard already includes Ruby (as a prerequisite for Ruby on Rails)
|
106
|
+
http://www.apple.com/macosx/features/300.html#unix
|
49
107
|
|
50
|
-
----------------
|
51
|
-
Gem installation
|
52
|
-
----------------
|
53
108
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
but installation is pretty easy, RubyGems comes with an install.rb
|
58
|
-
script.
|
109
|
+
FXRuby is availiable as macport (aka darwinport)
|
110
|
+
http://www.macports.org/
|
111
|
+
http://www.macports.org/ports.php?by=name&substr=fxruby
|
59
112
|
|
60
|
-
|
113
|
+
Installation of Macports:
|
114
|
+
http://www.macports.org/install.php
|
61
115
|
|
62
|
-
|
116
|
+
Installation of FXRuby:
|
117
|
+
$ sudo port install rb-fx-ruby
|
63
118
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
Rubygems will check if the required gems rubyzip and exifr are installed on your
|
68
|
-
system.
|
119
|
+
Continue with gem installation of Piggy:
|
120
|
+
$ sudo gem install Piggy
|
69
121
|
|
70
|
-
(Note that for now the gem command won't check if FXRuby is installed
|
71
|
-
on your system, so you'll be able to install FXRuby via gem or from source.)
|
72
122
|
|
73
|
-
|
74
|
-
|
75
|
-
|
123
|
+
------------------------
|
124
|
+
Things that can go wrong
|
125
|
+
------------------------
|
76
126
|
|
127
|
+
Remote gem installation may fail if you are sitting behind an internet proxy.
|
128
|
+
In most cases, setting the HTTP_PROXY environment variable will help:
|
129
|
+
http_proxy=http://URL:PORT
|
77
130
|
|
131
|
+
For more information on this topic see
|
132
|
+
http://wiki.rubyonrails.org/rails/pages/GemRails
|
data/lib/piggy-core/options.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/ruby
|
2
2
|
#$Id: options.rb 195 2008-05-29 21:32:40Z Sascha $
|
3
3
|
|
4
|
-
|
4
|
+
require 'piggy-core/winshell'
|
5
5
|
|
6
6
|
# Provide Piggy with user defined settings.
|
7
7
|
class PiggyOptions
|
@@ -15,6 +15,7 @@ class PiggyOptions
|
|
15
15
|
:preselectDirectories,
|
16
16
|
:slideshowDelay,
|
17
17
|
:style,
|
18
|
+
:browser,
|
18
19
|
:debug)
|
19
20
|
|
20
21
|
# possible values for @imageProcessor
|
@@ -46,6 +47,7 @@ class PiggyOptions
|
|
46
47
|
@slideshowDelay = nil
|
47
48
|
@style = nil
|
48
49
|
@debug = nil
|
50
|
+
@browser = nil
|
49
51
|
initializeNilsWithDefault
|
50
52
|
end
|
51
53
|
|
@@ -62,9 +64,9 @@ class PiggyOptions
|
|
62
64
|
@thumbHeight = 100 if @thumbHeight.nil?
|
63
65
|
@imageWidth = 800 if @imageWidth.nil?
|
64
66
|
@imageHeight = 600 if @imageHeight.nil?
|
65
|
-
@generateFramePage =
|
66
|
-
@useTable = generateFramePage? if @
|
67
|
-
@localDestinationPath =
|
67
|
+
@generateFramePage = false if @generateFramePage.nil?
|
68
|
+
@useTable = generateFramePage? if @uosPathseTable.nil?
|
69
|
+
@localDestinationPath = WinShell.instance.pictureDirectory if @localDestinationPath.nil?
|
68
70
|
@remoteDestinationPath = '' if @remoteDestinationPath.nil?
|
69
71
|
@ftpUser = 'anonymous' if @ftpUser.nil?
|
70
72
|
@ftpHost = 'ftp.blablabla.de' if @ftpHost.nil?
|
@@ -77,6 +79,7 @@ class PiggyOptions
|
|
77
79
|
@slideshowDelay = 5 if @slideshowDelay.nil?
|
78
80
|
@style = 'shadow' if @style.nil?
|
79
81
|
@debug = false if @debug.nil?
|
82
|
+
@browser = '' if @browser.nil?
|
80
83
|
end
|
81
84
|
|
82
85
|
def useFxruby!
|
@@ -102,6 +105,10 @@ class PiggyOptions
|
|
102
105
|
def useRmagick?
|
103
106
|
@imageProcessor == ProcessorRmagick
|
104
107
|
end
|
108
|
+
|
109
|
+
def browser?
|
110
|
+
!@browser.nil? && !@browser.empty?
|
111
|
+
end
|
105
112
|
|
106
113
|
alias :usePreview? :usePreview
|
107
114
|
alias :useLog? :useLog
|
@@ -177,13 +177,13 @@ class ThumbnailPageGenerator < HtmlGenerator
|
|
177
177
|
}
|
178
178
|
body({"class"=>"image_page"}) {
|
179
179
|
a({"HREF" => escapeHTML(pred) + HtmlExt}){
|
180
|
-
addHtml(escapeHTML(i == 0 ? '
|
180
|
+
addHtml(escapeHTML(i == 0 ? 'last' : 'previous'))
|
181
181
|
}
|
182
182
|
a({"HREF" => escapeHTML(backlink) }) {
|
183
|
-
addHtml(escapeHTML('
|
183
|
+
addHtml(escapeHTML('overview'))
|
184
184
|
}
|
185
185
|
a({"HREF" => escapeHTML(succ) + HtmlExt}) {
|
186
|
-
addHtml(escapeHTML(i == maxInd ? '
|
186
|
+
addHtml(escapeHTML(i == maxInd ? 'first' : 'next'))
|
187
187
|
}
|
188
188
|
br
|
189
189
|
img(imageName(currentInfo), escapeHTML(current))
|
data/lib/piggy-core/version.rb
CHANGED
data/lib/piggy-core/winshell.rb
CHANGED
@@ -44,14 +44,21 @@ class ShellInterface
|
|
44
44
|
"TEMPLATES" => 0x15,
|
45
45
|
"WINDOWS" => 0x24
|
46
46
|
}
|
47
|
+
initHome
|
48
|
+
end
|
49
|
+
|
50
|
+
def initHome
|
51
|
+
@home = ENV['HOME']
|
52
|
+
@home = ENV['HOMEPATH'] unless @home
|
53
|
+
unless @home
|
54
|
+
puts 'ShellInterface could not set @home - using /'
|
55
|
+
@home = '/'
|
56
|
+
end
|
47
57
|
end
|
48
58
|
|
49
59
|
# try to provide a platform independent default
|
50
60
|
def pathForSpecialFolder(name)
|
51
|
-
home
|
52
|
-
home = ENV['HOMEPATH'] unless home
|
53
|
-
home = '/' unless home
|
54
|
-
return home
|
61
|
+
return @home
|
55
62
|
end
|
56
63
|
|
57
64
|
def tmpPath
|
@@ -79,7 +86,7 @@ class ShellInterface
|
|
79
86
|
# Get a path string usable by common ruby classes such as Dir and File.
|
80
87
|
# Default: convert '\' to '/' on all systems, even on Unix
|
81
88
|
def rubyPath(pathString)
|
82
|
-
return pathString.gsub(/\\/, separator)
|
89
|
+
return pathString.gsub(/\\/, separator).gsub(/^~/, @home)
|
83
90
|
end
|
84
91
|
|
85
92
|
def pictureDirectory
|
@@ -0,0 +1,46 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
## $Id: html_generation_dialog.rb 190 2008-02-02 18:52:57Z Sascha $
|
3
|
+
|
4
|
+
require 'piggy-core/winshell'
|
5
|
+
require 'piggy-gui/require-fox'
|
6
|
+
|
7
|
+
# Combobox like input field to choose an existing directory
|
8
|
+
class DirChooser < Fox::FXHorizontalFrame
|
9
|
+
include Fox
|
10
|
+
def initialize(owner, initValue, &onChangedDir)
|
11
|
+
super(owner, FRAME_NONE, 0, 0, 0 , 0, 0, 0, 0, 0) {}
|
12
|
+
@field = FXTextField.new(self, 32)
|
13
|
+
@button = FXButton.new(self, '...')
|
14
|
+
@block = onChangedDir
|
15
|
+
@shell = WinShell.instance
|
16
|
+
connectButtonToField
|
17
|
+
initLayout
|
18
|
+
setPath(initValue)
|
19
|
+
@field.connect(SEL_COMMAND) {
|
20
|
+
@block.call(getPath)
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
def initLayout
|
25
|
+
@field.setLayoutHints(LAYOUT_LEFT|LAYOUT_FILL_X|LAYOUT_FILL_COLUMN)
|
26
|
+
end
|
27
|
+
|
28
|
+
def connectButtonToField
|
29
|
+
@button.connect(SEL_COMMAND) {
|
30
|
+
dialog = FXDirDialog.new(self, "Choose directory")
|
31
|
+
dialog.directory = @field.getText
|
32
|
+
unless dialog.execute == 0
|
33
|
+
@field.setText(dialog.directory)
|
34
|
+
@block.call(getPath)
|
35
|
+
end
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
def getPath
|
40
|
+
@shell.rubyPath(fox2Ruby(@field.getText))
|
41
|
+
end
|
42
|
+
|
43
|
+
def setPath(value)
|
44
|
+
@field.setText(ruby2Fox(@shell.osPath(value)))
|
45
|
+
end
|
46
|
+
end
|
@@ -92,8 +92,8 @@ class DirectoryDiffWidget < Fox::FXScrollWindow
|
|
92
92
|
@splitOR = FXVerticalFrame.new(@fourSplitter)
|
93
93
|
@splitUL = FXVerticalFrame.new(@fourSplitter)
|
94
94
|
@splitUR = FXVerticalFrame.new(@fourSplitter)
|
95
|
-
@leftListPropFrame = FXMatrix.new(@splitOL, 2, MATRIX_BY_COLUMNS)
|
96
|
-
@rightListPropFrame = FXMatrix.new(@splitOR, 2, MATRIX_BY_COLUMNS)
|
95
|
+
@leftListPropFrame = FXMatrix.new(@splitOL, 2, MATRIX_BY_COLUMNS|LAYOUT_FILL_X)
|
96
|
+
@rightListPropFrame = FXMatrix.new(@splitOR, 2, MATRIX_BY_COLUMNS|LAYOUT_FILL_X)
|
97
97
|
@leftButtonsFrame = FXHorizontalFrame.new(@splitUL)
|
98
98
|
@rightButtonsFrame = FXHorizontalFrame.new(@splitUR)
|
99
99
|
@leftListFrame = FXHorizontalFrame.new(@splitUL)
|
@@ -112,14 +112,33 @@ class DirectoryDiffWidget < Fox::FXScrollWindow
|
|
112
112
|
end
|
113
113
|
|
114
114
|
def initializeControlsOL
|
115
|
-
@labels.push(FXLabel.new(@leftListPropFrame,
|
116
|
-
|
117
|
-
|
115
|
+
@labels.push(FXLabel.new(@leftListPropFrame, "Dir:"))
|
116
|
+
combo = FXHorizontalFrame.new(@leftListPropFrame)
|
117
|
+
combo.setLayoutHints(LAYOUT_FILL_X|LAYOUT_FILL_COLUMN)
|
118
|
+
@leftPathField = FXTextField.new(combo, 32)
|
119
|
+
@leftPathField.setLayoutHints(LAYOUT_FILL_X)
|
120
|
+
dirChooserForField(@leftPathField, 'left')
|
118
121
|
end
|
119
122
|
|
120
123
|
def initializeControlsOR
|
121
124
|
@labels.push(FXLabel.new(@rightListPropFrame, "Dir:"))
|
122
|
-
|
125
|
+
combo = FXHorizontalFrame.new(@rightListPropFrame)
|
126
|
+
combo.setLayoutHints(LAYOUT_FILL_X|LAYOUT_FILL_COLUMN)
|
127
|
+
@rightPathField = FXTextField.new(combo, 32)
|
128
|
+
@rightPathField.setLayoutHints(LAYOUT_FILL_X)
|
129
|
+
dirChooserForField(@rightPathField, 'right')
|
130
|
+
end
|
131
|
+
|
132
|
+
def dirChooserForField(field, side)
|
133
|
+
chooserButton = FXButton.new(field.parent, '...')
|
134
|
+
chooserButton.connect(SEL_COMMAND) {
|
135
|
+
dialog = FXDirDialog.new(self, "Choose directory")
|
136
|
+
dialog.directory = field.getText
|
137
|
+
unless dialog.execute == 0
|
138
|
+
field.setText(dialog.directory)
|
139
|
+
dirChanged(side)
|
140
|
+
end
|
141
|
+
}
|
123
142
|
end
|
124
143
|
|
125
144
|
def initializeControlsUL
|
@@ -169,16 +188,24 @@ class DirectoryDiffWidget < Fox::FXScrollWindow
|
|
169
188
|
@quitButton.setLayoutHints(LAYOUT_RIGHT)
|
170
189
|
end
|
171
190
|
|
191
|
+
def dirChanged(side)
|
192
|
+
if(side == 'right')
|
193
|
+
setRightPath(@rightPathField.getText)
|
194
|
+
updateRightList
|
195
|
+
updateStatusIcons
|
196
|
+
else
|
197
|
+
setLeftPath(@leftPathField.getText)
|
198
|
+
updateLeftList
|
199
|
+
updateStatusIcons
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
172
203
|
def connectEvents
|
173
204
|
@rightPathField.connect(SEL_COMMAND) {
|
174
|
-
|
175
|
-
updateRightList
|
176
|
-
updateStatusIcons
|
205
|
+
dirChanged('right')
|
177
206
|
}
|
178
207
|
@leftPathField.connect(SEL_COMMAND) {
|
179
|
-
|
180
|
-
updateLeftList
|
181
|
-
updateStatusIcons
|
208
|
+
dirChanged('left')
|
182
209
|
}
|
183
210
|
@dirLeftUpButton.connect(SEL_COMMAND, method(:onDirUpLeftList))
|
184
211
|
@dirRightUpButton.connect(SEL_COMMAND, method(:onDirUpRightList))
|
@@ -384,7 +411,7 @@ class DirectoryDiffWidget < Fox::FXScrollWindow
|
|
384
411
|
updateLeftList
|
385
412
|
updateRightList
|
386
413
|
updateStatusIcons
|
387
|
-
@fourSplitter.setVSplit(
|
414
|
+
@fourSplitter.setVSplit(660)
|
388
415
|
end
|
389
416
|
|
390
417
|
def create
|
@@ -80,13 +80,17 @@ class FtpBrowserWidget < DirectoryDiffWidget
|
|
80
80
|
def initializeControlsOL
|
81
81
|
@labels.push(FXLabel.new(@leftListPropFrame, "FTP server:"))
|
82
82
|
@serverField = FXTextField.new(@leftListPropFrame, 32)
|
83
|
+
@serverField.setLayoutHints(LAYOUT_FILL_X|LAYOUT_FILL_COLUMN)
|
83
84
|
@labels.push(FXLabel.new(@leftListPropFrame, "User:"))
|
84
85
|
@userField = FXTextField.new(@leftListPropFrame, 32)
|
86
|
+
@userField.setLayoutHints(LAYOUT_FILL_X|LAYOUT_FILL_COLUMN)
|
85
87
|
@labels.push(FXLabel.new(@leftListPropFrame, "Password:"))
|
86
88
|
@passwordField = FXTextField.new(@leftListPropFrame, 32)
|
89
|
+
@passwordField.setLayoutHints(LAYOUT_FILL_X|LAYOUT_FILL_COLUMN)
|
87
90
|
@passwordField.setTextStyle(TEXTFIELD_PASSWD)
|
88
91
|
@labels.push(FXLabel.new(@leftListPropFrame, "Destination path:"))
|
89
92
|
@leftPathField = FXTextField.new(@leftListPropFrame, 32)
|
93
|
+
@leftPathField.setLayoutHints(LAYOUT_FILL_X|LAYOUT_FILL_COLUMN)
|
90
94
|
end
|
91
95
|
|
92
96
|
def initializeControlsUL
|
@@ -384,7 +388,7 @@ class FtpBrowserWidget < DirectoryDiffWidget
|
|
384
388
|
def inCreate
|
385
389
|
updateRightList
|
386
390
|
updateStatusIcons
|
387
|
-
@fourSplitter.setVSplit(
|
391
|
+
@fourSplitter.setVSplit(2050)
|
388
392
|
end
|
389
393
|
|
390
394
|
def prepareClosure
|
@@ -7,19 +7,18 @@
|
|
7
7
|
require 'piggy-core/options'
|
8
8
|
require 'piggy-core/winshell'
|
9
9
|
require 'piggy-gui/require-fox'
|
10
|
+
require 'piggy-gui/modal_dialog'
|
11
|
+
require 'piggy-gui/dir_chooser'
|
10
12
|
|
11
13
|
# Dialog for manipulation some of Piggy's html generation parameters.
|
12
|
-
class HtmlGenerationDialog <
|
13
|
-
include Fox
|
14
|
-
Placement = PIGGY_WINDOW_PLACEMENT
|
15
|
-
|
14
|
+
class HtmlGenerationDialog < ModalDialog
|
16
15
|
attr_reader(:options)
|
17
16
|
|
18
17
|
def initialize(owner, options = PiggyOptions.new)
|
19
18
|
title = "Thumbnail page generator options"
|
20
19
|
@options = options
|
21
20
|
@shell = WinShell.instance
|
22
|
-
super(owner, title, DECOR_TITLE|DECOR_BORDER)
|
21
|
+
super(owner, title, DECOR_TITLE|DECOR_BORDER|DECOR_CLOSE)
|
23
22
|
initializeVariables
|
24
23
|
initializeLayout
|
25
24
|
setDefaults
|
@@ -31,7 +30,9 @@ class HtmlGenerationDialog < Fox::FXDialogBox
|
|
31
30
|
@contents = FXMatrix.new(@frame, 2, MATRIX_BY_COLUMNS)
|
32
31
|
@labels = Array.new
|
33
32
|
@labels.push(FXLabel.new(@contents, "Output directory:"))
|
34
|
-
|
33
|
+
DirChooser.new(@contents, @options.localDestinationPath) { |v|
|
34
|
+
@options.localDestinationPath = v
|
35
|
+
}
|
35
36
|
@labels.push(FXLabel.new(@contents, "Framepage:"))
|
36
37
|
@genFrameRadioButtons = FXMatrix.new(@contents, 2, MATRIX_BY_COLUMNS)
|
37
38
|
@genFrameYes = FXRadioButton.new(@genFrameRadioButtons, "&Yes")
|
@@ -50,18 +51,11 @@ class HtmlGenerationDialog < Fox::FXDialogBox
|
|
50
51
|
nil, 0, COMBOBOX_INSERT_LAST)
|
51
52
|
@styleTextField.setFrameStyle(FRAME_SUNKEN|FRAME_THICK)
|
52
53
|
@styleTextField.setLayoutHints(LAYOUT_LEFT|LAYOUT_FILL_X|LAYOUT_FILL_COLUMN)
|
53
|
-
|
54
|
-
@buttons = FXHorizontalFrame.new(@frame)
|
55
|
-
@cancel = FXButton.new(@buttons, "&Cancel", nil, self, ID_CANCEL)
|
56
|
-
@accept = FXButton.new(@buttons, "&Accept", nil, self, ID_ACCEPT)
|
54
|
+
addOkCancelButtonsTo(@frame)
|
57
55
|
end
|
58
56
|
|
59
57
|
def initializeLayout
|
60
58
|
@labels.each { |label| label.setLayoutHints LAYOUT_CENTER_Y }
|
61
|
-
@buttons.setLayoutHints(LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X)
|
62
|
-
@buttons.setPackingHints(PACK_UNIFORM_WIDTH)
|
63
|
-
@accept.setLayoutHints(LAYOUT_RIGHT)
|
64
|
-
@cancel.setLayoutHints(LAYOUT_RIGHT)
|
65
59
|
end
|
66
60
|
|
67
61
|
def updateStylesList
|
@@ -77,7 +71,6 @@ class HtmlGenerationDialog < Fox::FXDialogBox
|
|
77
71
|
def setDefaults
|
78
72
|
@genFrameYes.setCheck(@options.generateFramePage)
|
79
73
|
@genFrameNo.setCheck(!@options.generateFramePage)
|
80
|
-
@outputPathField.setText(@shell.winPath(@options.localDestinationPath))
|
81
74
|
@addZipCheck.setCheck(@options.addZip?)
|
82
75
|
@addSlideshowCheck.setCheck(@options.addSlideshow?)
|
83
76
|
updateStylesList
|
@@ -92,9 +85,6 @@ class HtmlGenerationDialog < Fox::FXDialogBox
|
|
92
85
|
@genFrameYes.setCheck false
|
93
86
|
@options.generateFramePage = false
|
94
87
|
}
|
95
|
-
@outputPathField.connect(SEL_COMMAND) {
|
96
|
-
@options.localDestinationPath = @shell.rubyPath(@outputPathField.getText)
|
97
|
-
}
|
98
88
|
@addZipCheck.connect(SEL_COMMAND) { |sender, sel, ptr|
|
99
89
|
@options.addZip = ptr
|
100
90
|
}
|
@@ -106,7 +96,7 @@ class HtmlGenerationDialog < Fox::FXDialogBox
|
|
106
96
|
validateStyle
|
107
97
|
}
|
108
98
|
end
|
109
|
-
|
99
|
+
|
110
100
|
def getSubdir
|
111
101
|
return fox2Ruby(@subdirField.getText)
|
112
102
|
end
|
@@ -116,14 +106,28 @@ class HtmlGenerationDialog < Fox::FXDialogBox
|
|
116
106
|
end
|
117
107
|
|
118
108
|
def validate
|
119
|
-
validateSubdir && validateStyle
|
109
|
+
validateOutputPath && validateSubdir && validateStyle
|
120
110
|
end
|
121
|
-
|
122
|
-
def
|
123
|
-
|
111
|
+
|
112
|
+
def validateOutputPath
|
113
|
+
unless File.directory?(@options.localDestinationPath)
|
114
|
+
warnOutputPath
|
115
|
+
return false
|
116
|
+
end
|
117
|
+
return true;
|
118
|
+
end
|
119
|
+
|
120
|
+
def validateSubdir
|
121
|
+
subdir = getSubdir
|
122
|
+
if subdir.empty?
|
124
123
|
warnNoSubdirGiven
|
125
124
|
return false
|
126
125
|
end
|
126
|
+
pathToSubdir = File.join(@options.localDestinationPath, subdir)
|
127
|
+
if(File.directory? pathToSubdir)
|
128
|
+
warn("Overwrite protection!", "#{pathToSubdir} allready exists")
|
129
|
+
return false
|
130
|
+
end
|
127
131
|
return true
|
128
132
|
end
|
129
133
|
|
@@ -136,22 +140,22 @@ class HtmlGenerationDialog < Fox::FXDialogBox
|
|
136
140
|
true
|
137
141
|
end
|
138
142
|
end
|
139
|
-
|
143
|
+
|
144
|
+
def warnOutputPath
|
145
|
+
title = "Output path does not exist"
|
146
|
+
msg = "Output path does not exist"
|
147
|
+
warn(title, msg)
|
148
|
+
end
|
149
|
+
|
140
150
|
def warnNoSubdirGiven
|
141
|
-
style = MBOX_OK|DECOR_TITLE|DECOR_CLOSE|Placement
|
142
151
|
title = "No subdirectory"
|
143
152
|
msg = "Specify a subdirectory first"
|
144
|
-
|
153
|
+
warn(title, msg)
|
145
154
|
end
|
146
155
|
|
147
156
|
def warnStyleMissing
|
148
|
-
style = MBOX_OK|DECOR_TITLE|DECOR_CLOSE|Placement
|
149
157
|
title = "Style not found"
|
150
158
|
msg = "Style missing: #{@options.style}"
|
151
|
-
|
152
|
-
end
|
153
|
-
|
154
|
-
def execute(placement=Placement)
|
155
|
-
return super(placement) > 0 # TODO durch geeignete Konstante ersetzen
|
159
|
+
warn(title, msg)
|
156
160
|
end
|
157
161
|
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
## $Id: html_generation_dialog.rb 190 2008-02-02 18:52:57Z Sascha $
|
3
|
+
|
4
|
+
require 'piggy-gui/require-fox'
|
5
|
+
|
6
|
+
# Provide a validation hook for ID_ACCEPT action
|
7
|
+
class ModalDialog < Fox::FXDialogBox
|
8
|
+
include Fox
|
9
|
+
include Responder
|
10
|
+
Placement = PIGGY_WINDOW_PLACEMENT
|
11
|
+
|
12
|
+
def initialize(*args)
|
13
|
+
super(*args)
|
14
|
+
FXMAPFUNC(SEL_COMMAND, FXDialogBox::ID_ACCEPT, :onCmdAccept)
|
15
|
+
end
|
16
|
+
|
17
|
+
# utility method for use in subclasses
|
18
|
+
def addOkCancelButtonsTo(frame)
|
19
|
+
FXHorizontalSeparator.new(frame, SEPARATOR_GROOVE)
|
20
|
+
buttons = FXHorizontalFrame.new(frame)
|
21
|
+
cancel = FXButton.new(buttons, "&Cancel", nil, self, ID_CANCEL)
|
22
|
+
accept = FXButton.new(buttons, "&Accept", nil, self, ID_ACCEPT,
|
23
|
+
BUTTON_NORMAL|BUTTON_INITIAL|BUTTON_DEFAULT)
|
24
|
+
buttons.setLayoutHints(LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X)
|
25
|
+
buttons.setPackingHints(PACK_UNIFORM_WIDTH)
|
26
|
+
accept.setLayoutHints(LAYOUT_RIGHT)
|
27
|
+
cancel.setLayoutHints(LAYOUT_RIGHT)
|
28
|
+
buttons
|
29
|
+
end
|
30
|
+
|
31
|
+
# This is the overwrite that integrates the validation hook
|
32
|
+
def onCmdAccept(p1, p2, p3)
|
33
|
+
begin
|
34
|
+
view2model
|
35
|
+
rescue Error => ex
|
36
|
+
warn(ex.to_s, "Error")
|
37
|
+
end
|
38
|
+
super(p1, p2, p3) if validate
|
39
|
+
end
|
40
|
+
|
41
|
+
# this method will be sent before validation
|
42
|
+
# overwrite to perform conversions from view to model
|
43
|
+
def view2model
|
44
|
+
end
|
45
|
+
|
46
|
+
# Overwrite this hook to check conditions and warn.
|
47
|
+
# Return false to keep dialog open.
|
48
|
+
def validate
|
49
|
+
true
|
50
|
+
end
|
51
|
+
|
52
|
+
# utility method for use in validation
|
53
|
+
# usage: return condition | warn('Warning', 'Please ...')
|
54
|
+
def warn(title, msg)
|
55
|
+
style = MBOX_OK|DECOR_TITLE|DECOR_CLOSE|Placement
|
56
|
+
FXMessageBox::warning(self, style, title, msg)
|
57
|
+
return false
|
58
|
+
end
|
59
|
+
|
60
|
+
# Return a boolean
|
61
|
+
def execute(placement=Placement)
|
62
|
+
return super(placement) != 0
|
63
|
+
end
|
64
|
+
end
|
@@ -6,19 +6,19 @@
|
|
6
6
|
require 'piggy-core/environment'
|
7
7
|
require 'piggy-core/options'
|
8
8
|
require 'piggy-gui/require-fox'
|
9
|
+
require 'piggy-gui/modal_dialog'
|
9
10
|
|
10
11
|
# Dialog to change some of Piggy's options.
|
11
|
-
class OptionsDialog <
|
12
|
-
include Fox
|
13
|
-
|
12
|
+
class OptionsDialog < ModalDialog
|
14
13
|
attr_reader(:options)
|
15
14
|
|
16
15
|
def initialize(owner, piggyOptions)
|
17
16
|
title = "Piggy general options"
|
18
|
-
super(owner, title, DECOR_TITLE|DECOR_BORDER|PIGGY_WINDOW_PLACEMENT)
|
17
|
+
super(owner, title, DECOR_TITLE|DECOR_BORDER|DECOR_CLOSE|PIGGY_WINDOW_PLACEMENT)
|
19
18
|
@options = piggyOptions.clone
|
20
19
|
@fillMode = LAYOUT_LEFT|LAYOUT_FILL_X|LAYOUT_FILL_Y
|
21
20
|
@frameStyle = FRAME_NONE
|
21
|
+
@shell = WinShell.instance
|
22
22
|
initializeLayout
|
23
23
|
end
|
24
24
|
|
@@ -59,21 +59,40 @@ class OptionsDialog < Fox::FXDialogBox
|
|
59
59
|
|
60
60
|
cb = FXCheckButton.new(basicFrame,
|
61
61
|
'Show log pane',
|
62
|
-
|
62
|
+
nil, 0, cbFlags)
|
63
63
|
cb.setCheck(@options.useLog)
|
64
64
|
cb.connect(SEL_COMMAND) { |sender, sel, ptr|
|
65
65
|
@options.useLog = ptr
|
66
66
|
}
|
67
67
|
cb = FXCheckButton.new(basicFrame,
|
68
68
|
'Show preview pane (experimental)',
|
69
|
-
|
69
|
+
nil, 0, cbFlags)
|
70
70
|
cb.setCheck(@options.usePreview)
|
71
71
|
cb.connect(SEL_COMMAND) { |sender, sel, ptr|
|
72
72
|
@options.usePreview = ptr
|
73
73
|
}
|
74
|
-
|
75
|
-
|
76
|
-
@
|
74
|
+
FXLabel.new(basicFrame, "Web browser:")
|
75
|
+
combo = FXHorizontalFrame.new(basicFrame)
|
76
|
+
@browserField = FXTextField.new(combo, 32)
|
77
|
+
@browserField.setText(ruby2Fox(@shell.osPath(@options.browser)))
|
78
|
+
@browserField.connect(SEL_COMMAND) {
|
79
|
+
browserChanged
|
80
|
+
}
|
81
|
+
chooserButton = FXButton.new(combo, '...')
|
82
|
+
chooserButton.connect(SEL_COMMAND) {
|
83
|
+
dialog = FXFileDialog.new(self, "Choose browser")
|
84
|
+
dialog.filename = @browserField.getText
|
85
|
+
dialog.selectMode = SELECTFILE_EXISTING
|
86
|
+
unless dialog.execute == 0
|
87
|
+
@browserField.setText(dialog.filename)
|
88
|
+
browserChanged
|
89
|
+
end
|
90
|
+
}
|
91
|
+
addOkCancelButtonsTo(basicFrame)
|
92
|
+
end
|
93
|
+
|
94
|
+
def browserChanged
|
95
|
+
@options.browser = @shell.rubyPath(fox2Ruby(@browserField.getText))
|
77
96
|
end
|
78
97
|
|
79
98
|
def updateProcessor
|
@@ -82,4 +101,10 @@ class OptionsDialog < Fox::FXDialogBox
|
|
82
101
|
@rbRmagick.setCheck(@options.useRmagick?)
|
83
102
|
end
|
84
103
|
|
104
|
+
def validate
|
105
|
+
if @options.browser?
|
106
|
+
return warn("Browser not found", "Warning") unless File.exists?(@options.browser)
|
107
|
+
end
|
108
|
+
true
|
109
|
+
end
|
85
110
|
end
|
@@ -32,7 +32,6 @@ class PiggyImageBrowser < Fox::FXMainWindow
|
|
32
32
|
include Responder
|
33
33
|
MsgStyle = MBOX_OK|DECOR_TITLE|DECOR_CLOSE|PIGGY_WINDOW_PLACEMENT
|
34
34
|
UseImageView = false
|
35
|
-
@@browser = '"C:\Programme\Internet Explorer\IEXPLORE.exe"'
|
36
35
|
|
37
36
|
attr_reader(:imageProcessor)
|
38
37
|
|
@@ -543,10 +542,10 @@ class PiggyImageBrowser < Fox::FXMainWindow
|
|
543
542
|
if(!File.exist? generator.mainIndexWithPath)
|
544
543
|
return error("#{generator.mainIndexWithPath} doesn't exist")
|
545
544
|
end
|
546
|
-
if(
|
545
|
+
if(@options.browser?)
|
547
546
|
getApp.beginWaitCursor
|
548
547
|
begin
|
549
|
-
@pipeLog.runCommand(
|
548
|
+
@pipeLog.runCommand(@options.browser + ' ' + generator.mainIndexWithPath,
|
550
549
|
generator.mainIndexPath)
|
551
550
|
rescue
|
552
551
|
end
|
@@ -579,7 +578,7 @@ class PiggyImageBrowser < Fox::FXMainWindow
|
|
579
578
|
|
580
579
|
def onCmdOptions(sender, sel, index)
|
581
580
|
dialog = OptionsDialog.new(self, @options.clone)
|
582
|
-
optionsChanged(dialog.options)
|
581
|
+
optionsChanged(dialog.options) if dialog.execute
|
583
582
|
end
|
584
583
|
|
585
584
|
# Open a new file
|
@@ -595,7 +594,7 @@ class PiggyImageBrowser < Fox::FXMainWindow
|
|
595
594
|
patterns = ["All Files (*)" ] + @supportedImageTypes.values
|
596
595
|
openDialog.patternList = patterns
|
597
596
|
openDialog.currentPattern = @preferredFileFilter
|
598
|
-
if openDialog.execute
|
597
|
+
if openDialog.execute
|
599
598
|
@preferredFileFilter = openDialog.currentPattern
|
600
599
|
filename = openDialog.filename
|
601
600
|
setDirectory(openDialog.getDirectory)
|
@@ -696,20 +695,11 @@ class PiggyImageBrowser < Fox::FXMainWindow
|
|
696
695
|
optionsDialog = HtmlGenerationDialog.new(self, @options.clone)
|
697
696
|
return false unless optionsDialog.execute
|
698
697
|
@options = optionsDialog.options
|
699
|
-
# fixme -> options dialog should handle this
|
700
|
-
return false unless checkLocalDestinationPath
|
701
698
|
directory = @filelist.getDirectory
|
702
699
|
outputDir = optionsDialog.getSubdir
|
703
|
-
|
704
|
-
return error("no output directory given!")
|
705
|
-
end
|
706
|
-
subdir = @options.localDestinationPath + '/' + outputDir
|
707
|
-
if(File.directory? subdir)
|
708
|
-
return error("#{subdir} allready exists")
|
709
|
-
end
|
700
|
+
subdir = File.join(@options.localDestinationPath, outputDir)
|
710
701
|
title = optionsDialog.getTitle
|
711
702
|
title = "" if(!title)
|
712
|
-
# <-
|
713
703
|
generator = generatorClass.new(@options)
|
714
704
|
generator.client = @pipeLog
|
715
705
|
generator.setOutputDirectory(outputDir)
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,73 @@
|
|
1
|
+
body {
|
2
|
+
text-align: center;
|
3
|
+
background: #D9F5F3;
|
4
|
+
}
|
5
|
+
|
6
|
+
.image_page a {
|
7
|
+
margin: 10px;
|
8
|
+
}
|
9
|
+
|
10
|
+
.thumbs dl.table {
|
11
|
+
padding-left: 84px;
|
12
|
+
}
|
13
|
+
|
14
|
+
div {
|
15
|
+
margin:0;
|
16
|
+
padding:0;
|
17
|
+
}
|
18
|
+
|
19
|
+
dl {
|
20
|
+
margin-left: auto;
|
21
|
+
margin-right: auto;
|
22
|
+
max-width: 600px;
|
23
|
+
}
|
24
|
+
|
25
|
+
/* no max-width in IE < 7 */
|
26
|
+
* html dl {
|
27
|
+
width: 600px;
|
28
|
+
}
|
29
|
+
|
30
|
+
dd {
|
31
|
+
margin: 0px;
|
32
|
+
padding: 0;
|
33
|
+
width: 128px;
|
34
|
+
height: 128px;
|
35
|
+
float: left;
|
36
|
+
vertical-align: middle;
|
37
|
+
text-align: center;
|
38
|
+
}
|
39
|
+
|
40
|
+
.preview {
|
41
|
+
background:url(ro.jpg) top right no-repeat;
|
42
|
+
}
|
43
|
+
|
44
|
+
.thumb {
|
45
|
+
background:url(lo.jpg) top left no-repeat;
|
46
|
+
}
|
47
|
+
|
48
|
+
.thumb p {
|
49
|
+
margin:0;
|
50
|
+
padding:0;
|
51
|
+
background:url(ru.jpg) bottom right no-repeat;
|
52
|
+
}
|
53
|
+
|
54
|
+
.thumb p a {
|
55
|
+
display: block;
|
56
|
+
background: url(lu.jpg) bottom left no-repeat;
|
57
|
+
padding: 0px;
|
58
|
+
padding-right: 28px;
|
59
|
+
padding-bottom: 28px;
|
60
|
+
}
|
61
|
+
|
62
|
+
.thumb p a img {
|
63
|
+
border:none;
|
64
|
+
}
|
65
|
+
|
66
|
+
.image_page img {
|
67
|
+
max-width: 100%;
|
68
|
+
}
|
69
|
+
|
70
|
+
/* IE 6 image height */
|
71
|
+
* html .thumb p a {
|
72
|
+
padding-bottom: 24px;
|
73
|
+
}
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: Piggy
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.4.2.
|
7
|
-
date: 2008-06-
|
6
|
+
version: 0.4.2.3
|
7
|
+
date: 2008-06-18 00:00:00 +02:00
|
8
8
|
summary: (P)ick (i)mages and (g)enerate (g)alleries
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -29,20 +29,10 @@ post_install_message:
|
|
29
29
|
authors:
|
30
30
|
- "Sascha D\xF6rdelmann"
|
31
31
|
files:
|
32
|
-
- INSTALL.txt
|
33
32
|
- LICENCE.txt
|
34
33
|
- README.txt
|
35
34
|
- test.rb
|
36
35
|
- UNINSTALL.txt
|
37
|
-
- web
|
38
|
-
- web/IMAGE_PROCESSING.txt
|
39
|
-
- web/INSTALL.txt
|
40
|
-
- web/extern.gif
|
41
|
-
- web/ftp-browser.png
|
42
|
-
- web/index-de.html
|
43
|
-
- web/index.html
|
44
|
-
- web/piggy.png
|
45
|
-
- web/style.css
|
46
36
|
- lib
|
47
37
|
- lib/directory_diff.rb
|
48
38
|
- lib/ftp_browser.rb
|
@@ -92,25 +82,27 @@ files:
|
|
92
82
|
- lib/piggy-core/progress.rb
|
93
83
|
- lib/piggy-core/rmagick_thumbnail_page_generator.rb
|
94
84
|
- lib/piggy-core/thumbnail_generator.rb
|
95
|
-
- lib/piggy-core/thumbnail_page_generator.rb
|
96
85
|
- lib/piggy-core/upload_info.rb
|
97
|
-
- lib/piggy-core/winshell.rb
|
98
86
|
- lib/piggy-core/version.rb
|
99
|
-
- lib/piggy-core/options.rb
|
100
87
|
- lib/piggy-core/ftp_adapter.rb
|
88
|
+
- lib/piggy-core/winshell.rb
|
89
|
+
- lib/piggy-core/thumbnail_page_generator.rb
|
90
|
+
- lib/piggy-core/options.rb
|
101
91
|
- lib/piggy-gui
|
102
|
-
- lib/piggy-gui/directory_diff_widget.rb
|
103
92
|
- lib/piggy-gui/filtered_file_list.rb
|
104
93
|
- lib/piggy-gui/fox_thumbsgen.rb
|
105
|
-
- lib/piggy-gui/html_generation_dialog.rb
|
106
94
|
- lib/piggy-gui/image_processor.rb
|
107
95
|
- lib/piggy-gui/multiimagecanvas.rb
|
108
|
-
- lib/piggy-gui/options_dialog.rb
|
109
|
-
- lib/piggy-gui/piggy_image_browser.rb
|
110
96
|
- lib/piggy-gui/pipe_log.rb
|
111
97
|
- lib/piggy-gui/progress_with_dialog.rb
|
112
98
|
- lib/piggy-gui/require-fox.rb
|
99
|
+
- lib/piggy-gui/directory_diff_widget.rb
|
113
100
|
- lib/piggy-gui/ftp_browser_widget.rb
|
101
|
+
- lib/piggy-gui/piggy_image_browser.rb
|
102
|
+
- lib/piggy-gui/options_dialog.rb
|
103
|
+
- lib/piggy-gui/modal_dialog.rb
|
104
|
+
- lib/piggy-gui/dir_chooser.rb
|
105
|
+
- lib/piggy-gui/html_generation_dialog.rb
|
114
106
|
- lib/piggy.rb
|
115
107
|
- lib/templates
|
116
108
|
- lib/templates/fuss.htm
|
@@ -135,12 +127,19 @@ files:
|
|
135
127
|
- lib/templates/styles/shadow/ro.gif
|
136
128
|
- lib/templates/styles/shadow/ru.gif
|
137
129
|
- lib/templates/styles/shadow/style.css
|
130
|
+
- lib/templates/styles/shadow_D9F5F3
|
131
|
+
- lib/templates/styles/shadow_D9F5F3/style.css
|
132
|
+
- lib/templates/styles/shadow_D9F5F3/ro.jpg
|
133
|
+
- lib/templates/styles/shadow_D9F5F3/lu.jpg
|
134
|
+
- lib/templates/styles/shadow_D9F5F3/ru.jpg
|
135
|
+
- lib/templates/styles/shadow_D9F5F3/lo.jpg
|
138
136
|
- test
|
139
137
|
- test/file_info_test.rb
|
140
138
|
- bin
|
141
139
|
- bin/directory_diff
|
142
140
|
- bin/ftp_browser
|
143
141
|
- bin/piggy
|
142
|
+
- INSTALL.txt
|
144
143
|
- CHANGES.txt
|
145
144
|
test_files:
|
146
145
|
- test.rb
|
data/web/IMAGE_PROCESSING.txt
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
Piggy is capable of building thumbnail all by using plain Ruby and FXRuby but you might
|
2
|
-
want to increase the quality of the result by switching options and make Piggy use
|
3
|
-
one of the following tools:
|
4
|
-
- RMagick
|
5
|
-
- Nconvert (the batch processing application of the great image converter XNview)
|
6
|
-
|
7
|
-
*** RMagick
|
8
|
-
|
9
|
-
Homepage: http://rubyforge.org/projects/rmagick/
|
10
|
-
|
11
|
-
Installation on Windows:
|
12
|
-
|
13
|
-
This is, what worked for me:
|
14
|
-
1. Download binary distribution.
|
15
|
-
2. Unpack e. g. into something like F:\transfer
|
16
|
-
3. Open console window on the RMagick-Folder
|
17
|
-
|
18
|
-
Now the gem installation and postinstall:
|
19
|
-
>>
|
20
|
-
F:\transfer\RMAGIC~1.3-W>gem install RMagick-win32-1.9.2-mswin32.gem
|
21
|
-
Attempting local installation of 'RMagick-win32-1.9.2-mswin32.gem'
|
22
|
-
Successfully installed RMagick-win32, version 1.9.2
|
23
|
-
|
24
|
-
F:\transfer\RMAGIC~1.3-W>postinstall
|
25
|
-
RMagick 1.9.2 win32 Post Installation (see enclosed README for license informati
|
26
|
-
on)
|
27
|
-
detecting available fonts, writing to config/type-windows.xml...Warning: Ignored
|
28
|
-
file c:/winnt/fonts/micross.ttf, exception occurred.
|
29
|
-
Warning: Ignored file c:/winnt/fonts/MICN__DB.TTF, exception occurred.
|
30
|
-
[...]
|
31
|
-
Warning: Ignored file c:/winnt/fonts/21205___.TTF, exception occurred.
|
32
|
-
ok.
|
33
|
-
setting MAGICK_CONFIGURE_PATH to 'E:/ruby/lib/ruby/gems/1.8/gems/RMagick-win32-1
|
34
|
-
.9.2-mswin32/config'.
|
35
|
-
setting is only for current user.
|
36
|
-
Copying 5 dlls to E:/ruby/bin...done.
|
37
|
-
all done.
|
38
|
-
<<
|
39
|
-
|
40
|
-
Installation on Linux is most easy if you run a Debian flavoured Linux: Simply
|
41
|
-
download and install the Debian package.
|
42
|
-
|
43
|
-
|
44
|
-
*** NConvert
|
45
|
-
|
46
|
-
Homepage: http://perso.wanadoo.fr/pierre.g/xnview/en_nconvert.html
|
47
|
-
|
48
|
-
Installation on Windows:
|
49
|
-
|
50
|
-
Copy nconvert.exe into a directory of your choice which is part of the PATH variable, e. g
|
51
|
-
into C:\ruby\bin.
|
52
|
-
|
53
|
-
For Linux there are RPM packages availiable.
|
data/web/INSTALL.txt
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
------------------
|
2
|
-
Piggy Installation
|
3
|
-
------------------
|
4
|
-
|
5
|
-
Installation depends on operation system and ruby version.
|
6
|
-
|
7
|
-
Intallation includes the following applications
|
8
|
-
- piggy
|
9
|
-
- directory_diff
|
10
|
-
- ftp_browser
|
11
|
-
|
12
|
-
------------------
|
13
|
-
Windows NT/2000/XP
|
14
|
-
------------------
|
15
|
-
|
16
|
-
You might be using the Ruby Windows Installer, so you
|
17
|
-
probably have FXRuby and most of the other required libraries
|
18
|
-
installed on your system.
|
19
|
-
|
20
|
-
Continue with the gem installation.
|
21
|
-
|
22
|
-
------------
|
23
|
-
Debian Linux
|
24
|
-
------------
|
25
|
-
|
26
|
-
Use any package manager you like (apt, aptitude, kpackage,...)
|
27
|
-
to install the following debian packages:
|
28
|
-
|
29
|
-
libruby
|
30
|
-
libyaml-ruby
|
31
|
-
libzlib-ruby
|
32
|
-
rdoc
|
33
|
-
|
34
|
-
Install FXRuby.
|
35
|
-
|
36
|
-
There is a gem availiable but I recommend that you use a debian package
|
37
|
-
instead. You'll have to add the following lines to the sources.list:
|
38
|
-
|
39
|
-
>>
|
40
|
-
# FreeRIDE
|
41
|
-
deb http://freeride.rubyforge.org/debian/ deb/
|
42
|
-
deb-src http://freeride.rubyforge.org/debian/ src/
|
43
|
-
<<
|
44
|
-
|
45
|
-
(You may do this via the graphical user interface provided by kpackage.
|
46
|
-
Don't forget to update the apt package list afterwards.)
|
47
|
-
|
48
|
-
Continue with the gem installation.
|
49
|
-
|
50
|
-
----------------
|
51
|
-
Gem installation
|
52
|
-
----------------
|
53
|
-
|
54
|
-
It's quite obvious that you'll need RubyGems to be installed
|
55
|
-
for this. It is packaged with actual windows installer versions.
|
56
|
-
On other systems you'll have to download and install it yourself
|
57
|
-
but installation is pretty easy, RubyGems comes with an install.rb
|
58
|
-
script.
|
59
|
-
|
60
|
-
You can now install piggy with the gem install command
|
61
|
-
|
62
|
-
gem install Piggy-x.x.x.x.gem
|
63
|
-
|
64
|
-
where x.x.x.x is a
|
65
|
-
placeholder for the downloaded version of Piggy.
|
66
|
-
|
67
|
-
(Note that for now the gem command won't check if
|
68
|
-
FXRuby is installed on your system.)
|
69
|
-
|
70
|
-
Gem installation might fail if you don't have the rights
|
71
|
-
to write the gem directories. You'll need to become root/admin
|
72
|
-
to get rid of these errors.
|
73
|
-
|
74
|
-
|
data/web/extern.gif
DELETED
Binary file
|
data/web/ftp-browser.png
DELETED
Binary file
|
data/web/index-de.html
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Piggy</title>
|
5
|
-
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
|
6
|
-
<meta name="author" content="Sascha Doerdelmann">
|
7
|
-
<link rel="stylesheet" type="text/css" href="style.css">
|
8
|
-
</head>
|
9
|
-
<body>
|
10
|
-
<h1>Piggy</h1>
|
11
|
-
<div class="languages"><a href="index.html">englisch (english)</a>
|
12
|
-
</div>
|
13
|
-
<div class="content">
|
14
|
-
<p>Am Anfang habe ich die Bildseiten händisch mit Hilfe von <a
|
15
|
-
class="extern" href="http://perso.wanadoo.fr/pierre.g/" title="XNview">XNview</a>
|
16
|
-
und einiger selbstgestrickter Unix-Scripte erstellt. Inzwischen habe ich
|
17
|
-
mir ein kleines Ruby-Programm geschrieben. Dies ermöglicht eine
|
18
|
-
komfortable Bildauswahl, generiert die Seiten auf Knopfdruck und hat
|
19
|
-
einen rudimentären FTP-Browser für das Hochladen in's Netz integriert.</p>
|
20
|
-
<p>Im Bildbetrachter können Bilder angesehen und ausgewählt werden.
|
21
|
-
Die jeweils angeklickte Bilddatei ist im Mittelteil des Fensters zu
|
22
|
-
sehen. Jetzt kann man entscheiden, ob es im Album enthalten sein soll:
|
23
|
-
<ul>
|
24
|
-
<li>Beim Wechsel in ein anderes Verzeichnis wird die aktuelle
|
25
|
-
Auswahl verworfen und durch die Bilddateien im neu gewählten Verzeichns
|
26
|
-
ersetzt.</li>
|
27
|
-
<li>Über die Schaltfläche "-" lassen sich Bilder aus dem
|
28
|
-
Album löschen. Dabei wird nicht das Bild selbst gelöscht.</li>
|
29
|
-
<li>Analog fügt man über die Schaltfläche "+" das
|
30
|
-
aktuelle Bild dem Album zu.</li>
|
31
|
-
</ul>
|
32
|
-
<p>Man kann über Pfeiltasten durch die gewählten Bilder blättern, um
|
33
|
-
sicher zu gehen, dass das Album nur Bilder enthält, die man wirklich
|
34
|
-
veröffentlichen möchte. Es gibt auch eine Vorschau. Diese lässt sich
|
35
|
-
über den Optionen-Dialog aktivieren. Die Vorschau verlangsamt allerdings
|
36
|
-
Verzeichniswechsel deutlich.</p>
|
37
|
-
<p>Das jeweils aktuelle Bilde kann gedreht und unter neuem Namen
|
38
|
-
gespeichert werden. Beim Drehen verringert sich etwas die Bildqualität,
|
39
|
-
man sollte also das Original aufbewahren.</p>
|
40
|
-
<p>Um das so vorbereitete Album zu erzeugen klickt man auf die
|
41
|
-
Schaltfläche "HTML". Es öffnet sich ein Eingabefenster. Dort
|
42
|
-
wählt man einen Seitentitel und den Namen für ein noch nicht
|
43
|
-
vorhandenes(!), unter C:\temp\bild zu erstellendes Unterverzeichnis.
|
44
|
-
Nach dem "Accept" werden die ausgewählten Bilder kopiert,
|
45
|
-
verkleinert und evtl. in einen anderen Dateityp konvertiert oder
|
46
|
-
nachgeschärft. Index, Frameseite und Bilderübersicht werden neu
|
47
|
-
erstellt, die Navigationsseite aktualisiert.</p>
|
48
|
-
<ul>
|
49
|
-
<li>Screenshots: <a href="piggy.png">piggy</a>, <a
|
50
|
-
href="ftp-browser.png">ftp-browser</a></li>
|
51
|
-
<li><a href="INSTALL.txt">Installationsanweisung (englisch)</a></li>
|
52
|
-
<li><a class="extern"
|
53
|
-
href="http://www.gnu.de/documents/gpl.de.html">Lizenz (GPL)</a></li>
|
54
|
-
<li>Download, Newsfeed, Bugtracker und mehr:
|
55
|
-
<a href="http://rubyforge.org/projects/piggy/">Rubyforge: Piggy</a></li>
|
56
|
-
<li><a href="http://sourceforge.net/projects/piggy/">Ältere Versionen</a></li>
|
57
|
-
</ul>
|
58
|
-
</div>
|
59
|
-
</body>
|
60
|
-
</html>
|
data/web/index.html
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Piggy</title>
|
5
|
-
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
|
6
|
-
<meta name="author" content="Sascha Doerdelmann">
|
7
|
-
<link href="style.css" rel="stylesheet" type="text/css">
|
8
|
-
</head>
|
9
|
-
<body>
|
10
|
-
<h1>Piggy</h1>
|
11
|
-
<div class="languages"><a href="index-de.html">german
|
12
|
-
(deutsch)</a></div>
|
13
|
-
<div class="content">
|
14
|
-
<p>In the beginning I created internet picture albums step by step
|
15
|
-
using <a class="extern" href="http://perso.wanadoo.fr/pierre.g/"
|
16
|
-
title="XNview">XNview</a> and some quick and dirty Unix
|
17
|
-
scripts.Meanwhile I wrote a little Ruby program. This allows a
|
18
|
-
comfortable selection of pictures, generates web pages and includes a
|
19
|
-
very basic FTP browser which can be used to upload the album to the
|
20
|
-
webspace of your choice.</p>
|
21
|
-
<p>The main view of the application is a kind of image viewer.
|
22
|
-
Select an image file and it will be shown in the middle frame of the
|
23
|
-
application. You may decide if you want this image to be included in the
|
24
|
-
internet picture album:
|
25
|
-
<ul>
|
26
|
-
<li>Changing the directory will clear the list of chosen images
|
27
|
-
and choose all image files found in the actual folder.</li>
|
28
|
-
<li>Remove images with the button "-".</li>
|
29
|
-
<li>Add images with the button "+".</li>
|
30
|
-
</ul>
|
31
|
-
<p>Step through the chosen images with the next and previous buttons
|
32
|
-
to be sure that only images you really want to publish are chosen. You
|
33
|
-
can also enable a preview table on the right side but image loading into
|
34
|
-
the preview will slow down directory changes.</p>
|
35
|
-
<p>You may rotate the currently shown image and then save it under a
|
36
|
-
new name. Rotation will introduce a loss in quality which is acceptable
|
37
|
-
for the internet picture album but please, keep the original image.</p>
|
38
|
-
<p>Html-generation is done by clicking the generation button. You'll
|
39
|
-
be prompted for page title, destination path and a name for a
|
40
|
-
subdirectory. Piggy will create two resized copies of every preselected
|
41
|
-
image into the subdirectory of the destination and html-pages to show
|
42
|
-
them.</p>
|
43
|
-
<ul>
|
44
|
-
<li>Screenshots: <a href="piggy.png">piggy</a>, <a
|
45
|
-
href="ftp-browser.png">ftp-browser</a></li>
|
46
|
-
<li><a href="INSTALL.txt">How to install</a></li>
|
47
|
-
<li><a class="extern" href="http://www.gnu.org/licenses/gpl.html">Licence
|
48
|
-
(GPL)</a></li>
|
49
|
-
<li>Download, Newsfeed, Bugtracker and more:
|
50
|
-
<a href="http://rubyforge.org/projects/piggy/">Rubyforge: Piggy</a></li>
|
51
|
-
<li><a href="http://sourceforge.net/projects/piggy/">Older releases</a></li>
|
52
|
-
<li><a href="IMAGE_PROCESSING.txt">Further notes on image
|
53
|
-
processing tools</a></li>
|
54
|
-
</ul>
|
55
|
-
</div>
|
56
|
-
</body>
|
57
|
-
</html>
|
data/web/piggy.png
DELETED
Binary file
|