rwdmovies 0.92 → 0.93
Sign up to get free protection for your applications and to get access to all the features.
- data/Readme.txt +96 -394
- data/code/01rwdcore/uploadreturns.rb +1 -0
- data/code/superant.com.rwdmovies/amazonsearch.rb +9 -10
- data/code/superant.com.rwdmovies/attachtmpmoviepicture.rb +4 -3
- data/code/superant.com.rwdmovies/createmovierecord.rb +20 -0
- data/code/superant.com.rwdmovies/deletemovierecord.rb +1 -1
- data/code/superant.com.rwdmovies/downloadpic.rb +28 -0
- data/code/superant.com.rwdmovies/eo2viewmoviephoto.rb +17 -2
- data/code/superant.com.rwdmovies/helptexthashrwdmovies.rb +12 -4
- data/code/superant.com.rwdmovies/loadconfigurationrecord.rb +1 -1
- data/code/superant.com.rwdmovies/openhelpwindowrwdmovies.rb +9 -2
- data/code/superant.com.rwdmovies/openmoviedata.rb +1 -0
- data/code/superant.com.rwdmovies/returntomain.rb +2 -3
- data/code/superant.com.rwdmovies/runrwdmoviesbackwindow.rb +1 -2
- data/code/superant.com.rwdmovies/saveconfigurationrecord.rb +1 -1
- data/code/superant.com.rwdmovies/showamazonsettings.rb +5 -0
- data/code/superant.com.rwdmovies/viewrwdmoviesconfiguration.rb +1 -0
- data/configuration/rwdmovies.dist +2 -2
- data/gui/frontwindow0/superant.com.rwdmovies/6moviesearch.rwd +8 -2
- data/gui/frontwindow0/superant.com.rwdmovies/7moviesutilities.rwd +16 -6
- data/gui/tinkerbackwindows/superant.com.rwdmoviespicture/xx8moviephotoview.rwd +1 -1
- data/rwd_files/HowTo_Movies.txt +7 -0
- data/rwd_files/moviestmp.jpg +0 -0
- metadata +5 -12
- data/gui/tinkerbackwindows/superant.com.rwdmovies/1openmoviedata.rwd +0 -18
- data/gui/tinkerbackwindows/superant.com.rwdmovies/2openmoviephoto.rwd +0 -8
- data/gui/tinkerbackwindows/superant.com.rwdmovies/3listmoviegfiles.rwd +0 -12
- data/gui/tinkerbackwindows/superant.com.rwdmovies/6editrecord.rwd +0 -35
- data/gui/tinkerbackwindows/superant.com.rwdmovies/6moviesearch.rwd +0 -27
- data/gui/tinkerbackwindows/superant.com.rwdmovies/7moviesutilities.rwd +0 -33
- data/gui/tinkerbackwindows/superant.com.rwdmovies/8viewconfiguration.rwd +0 -37
- data/gui/tinkerbackwindows/superant.com.rwdmovies/9returntab.rwd +0 -11
- data/gui/tinkerbackwindows/superant.com.rwdmovies/z9end.rwd +0 -6
data/Readme.txt
CHANGED
@@ -1,400 +1,102 @@
|
|
1
|
-
=
|
2
|
-
|
3
|
-
RwdTinker is a web brower interface to and system for developing programs
|
4
|
-
|
5
|
-
== Usage
|
6
|
-
|
7
|
-
How to Use the Tinker framework Program (rwdtinker)
|
8
|
-
|
9
|
-
1. stand alone application
|
10
|
-
2. framework for building applications
|
11
|
-
3. Open brower windows with html documents
|
12
|
-
|
13
|
-
The GUI interface used is RubyWebDialogs
|
14
|
-
|
15
|
-
|
16
|
-
Start the program by typing
|
17
|
-
ruby init.rb
|
18
|
-
|
19
|
-
Then point your web browser to:
|
20
|
-
http://localhost:7705/
|
21
|
-
|
22
|
-
== Viewing installed Applets:
|
23
|
-
|
24
|
-
Go to "List Scripts" tab
|
25
|
-
|
26
|
-
You can get a list of all installed applets by clicking the listfiles button
|
27
|
-
|
28
|
-
To see the text of a install file
|
29
|
-
Type in the name of the file you want.
|
30
|
-
|
31
|
-
type it without the inf ending
|
32
|
-
rwdapplet-0.1
|
33
|
-
|
34
|
-
Then click the "View Installed File" button
|
35
|
-
|
36
|
-
If it finds the file it will open it. It displays the text the search box.
|
37
|
-
|
38
|
-
You can uninstall applets on this screen
|
39
|
-
|
40
|
-
== Installing Applets
|
41
|
-
|
42
|
-
click on the "Selection Panel"
|
43
|
-
click on Rwdtinker Back Window
|
44
|
-
|
45
|
-
You can download an applet created by someone else
|
46
|
-
put the file in the zips directory
|
47
|
-
|
48
|
-
click on the "list zips" tab
|
49
|
-
click on "list applets available for installing"
|
50
|
-
|
51
|
-
chose the applet you want
|
52
|
-
click on "install applet"
|
53
|
-
If all goes well the applet should be installed.
|
54
|
-
You will need to restart rwdtinker to see the new screens
|
55
|
-
|
56
|
-
|
57
|
-
== Changing configuration file
|
58
|
-
|
59
|
-
click on "Edit Configuration"
|
60
|
-
You can view the configuration file
|
61
|
-
|
62
|
-
You can edit the configuration
|
63
|
-
|
64
|
-
Remember to reload the configuration variables if you want your
|
65
|
-
changes used.
|
66
|
-
|
67
|
-
== Manually installing applets
|
68
|
-
|
69
|
-
* unzip an applet
|
70
|
-
|
71
|
-
unzip the applet into the program directoy
|
72
|
-
unzip randomapplet.zip
|
73
|
-
|
74
|
-
This should place the needed files in the correct directories
|
75
|
-
|
76
|
-
|
77
|
-
== Creating Applets
|
78
|
-
|
79
|
-
To add code, commands and gui tabs
|
80
|
-
|
81
|
-
Move program files into a directory under the code directory.
|
82
|
-
Move gui files into a directory under the gui directory.
|
83
|
-
The gui directory name you create is important, because the gui
|
84
|
-
rwd file is built in alpha order by directory name
|
85
|
-
|
86
|
-
|
87
|
-
There are two ways to add applets to the directories.
|
88
|
-
|
89
|
-
Creating code
|
90
|
-
|
91
|
-
|
92
|
-
* Manually write code and gui files
|
93
|
-
|
94
|
-
The files go into your code directory
|
95
|
-
the filenames for code do not matter
|
96
|
-
|
97
|
-
The gui files go into your gui directory
|
98
|
-
The gui files need to be in order by name and end with .rwd
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
If you need a config file that goes in the configuration directory
|
103
|
-
|
104
|
-
internationalization and localization are helped by replacing the
|
105
|
-
gui files in the subdirectories under gui
|
106
|
-
|
107
|
-
|
108
|
-
== Documents
|
109
|
-
|
110
|
-
|
111
|
-
when you click on a document name, the document should pop up in a
|
112
|
-
browser window, or in another browser tab.
|
113
|
-
|
114
|
-
To exit, press the x inside the browser window.
|
115
|
-
|
116
|
-
== To add context sensitive help
|
117
|
-
|
118
|
-
You need to add a hash file that just needs to contain
|
119
|
-
Helptext.update( :myapplet_generalhelp => " This is the general help
|
120
|
-
You can add help text hear")
|
121
|
-
|
122
|
-
And you need to add a help run script that will call runhelpwindow
|
123
|
-
This should have a method that includes:
|
124
|
-
setting $help_topic, and adds to $helptopicsarray, saves the calling window and calls runhelpwindow which will render the help message.
|
125
|
-
|
126
|
-
if @rwd_tab == "gemservescan"
|
127
|
-
$help_topic = "gemdocs_help"
|
128
|
-
end
|
129
|
-
$helptopicsarray = $helptopicsarray | ["rubyslippers_generalhelp", "Install_Gem","GemCommands_help", "gemfilesinstalled","gemdocs_help"]
|
130
|
-
if @rwd_window != "rwdtinkerhelpwindow"
|
131
|
-
$previouswindow = @rwd_window
|
132
|
-
$previoustab = @rwd_tab
|
133
|
-
end
|
134
|
-
runhelpwindow
|
135
|
-
end
|
136
|
-
|
137
|
-
== Languages
|
138
|
-
|
139
|
-
|
140
|
-
You can add tranlations in the lang subdirectory
|
141
|
-
You change the $lang constant in Tinker config file in the configuration directory
|
142
|
-
You can see one translation on the install applet tab, after you have installed and applet
|
143
|
-
|
144
|
-
== Using over a Network
|
145
|
-
|
146
|
-
To serve the application over your local LAN,change the last line in the
|
147
|
-
init.rb file to something like:
|
148
|
-
RwdTinker.file(RWDFile).serve(8080, "-r" ? ".rwduids" : nil)
|
149
|
-
Then you should be able to login at: http://yourhostname:8080
|
150
|
-
|
151
|
-
You have to authorize yourself. The .rwuids example is a string with
|
152
|
-
the name of the authorization file, relative to the home directory
|
153
|
-
of the user that started the service. This file has to be in the form of:
|
154
|
-
|
155
|
-
user1 = password
|
156
|
-
user2 = pass phrase
|
157
|
-
|
158
|
-
Thus the file .rwduids might contain:
|
159
|
-
|
160
|
-
erik = secret
|
161
|
-
|
162
|
-
== Requirements:
|
163
|
-
RubyWebDialogs - I am using 0.1.2
|
164
|
-
This package you downloaded should have a runtime version of
|
165
|
-
the needed rubywebdialog files
|
166
|
-
|
167
|
-
Ruby I am using version 1.8.2
|
168
|
-
|
169
|
-
I have tested this under Linux-Debian kernel 2.6.9
|
170
|
-
|
171
|
-
= Operation:
|
172
|
-
The code files reside in the code directory and are combined before
|
173
|
-
the main Class is loaded
|
174
|
-
|
175
|
-
The rwd files in gui are combined before the gui is activated
|
176
|
-
|
177
|
-
Translated text reside in the lang directory
|
178
|
-
|
179
|
-
== Installing:
|
180
|
-
|
181
|
-
untar the file
|
182
|
-
tar zxvf rwdtinker-x.y.tar.gz
|
183
|
-
then cd to the directory
|
184
|
-
cd rwdshell-x.y
|
185
|
-
then start the init.rb program file
|
186
|
-
ruby init.rb
|
187
|
-
Then point your browser at http://localhost:7705
|
188
|
-
or where it tells you.
|
189
|
-
Trouble shooting:
|
190
|
-
|
191
|
-
If the program is not working, try looking at the ev subdirectory. That is where
|
192
|
-
the runtime of rubywebdialogs are.
|
193
|
-
|
194
|
-
for long term installation, I would suggest putting most files in a lib directory
|
195
|
-
like /usr/lib/rwdshell
|
196
|
-
then make a writable directory the local directory for command files to be written
|
197
|
-
like ~/rwdshell
|
198
|
-
|
199
|
-
|
200
|
-
Closing the browser doesn't terminate the application. You have to use the application's close-button And terminating the application doesn't terminate the application when running in network mode. You just log out.
|
201
|
-
|
202
|
-
Don't use the back-button of the browser! Strange and unpredictable things may and will happen!
|
203
|
-
|
204
|
-
RubyWebDialogs is a platform independent graphical user interface for Ruby applications. It generates HTML and serves it with an internal HTTP server, so you can use your favorite web browser as the front end for your Ruby application. All this means, that it can be used on almost every platform, like Ruby itself. http://www.erikveen.dds.nl/rubywebdialogs/
|
205
|
-
|
206
|
-
== Credits
|
207
|
-
|
208
|
-
Thanks go to:
|
209
|
-
|
210
|
-
* Matz, for creating Ruby in the first place.
|
211
|
-
* Erik, for creating RubyWebDialogs.
|
212
|
-
* Charlotte, my wife for coming up for the name Tinker.
|
213
|
-
|
214
|
-
== License
|
215
|
-
|
216
|
-
rwdtinker is copyright (c) 2004 Steven Gibson. It is free software, and may be redistributed
|
217
|
-
under the terms of the GPL licence:
|
218
|
-
|
219
|
-
== Contact
|
220
|
-
For more information see:
|
221
|
-
http://rwdapplications.rubyforge.org/wiki/wiki.pl
|
222
|
-
|
223
|
-
|
224
|
-
For more information about RubyWebDialogs see:
|
225
|
-
http://www.erikveen.dds.nl/rubywebdialogs/index.html
|
226
|
-
|
227
|
-
Thanks, Steven Gibson
|
228
|
-
|
229
|
-
== Changelog
|
230
|
-
version 1.60
|
231
|
-
add rwdapplication info to diagnostic
|
232
|
-
turn rescue on in diagnostic upload
|
233
|
-
|
234
|
-
version 1.59
|
235
|
-
removed rwdtinkerwin2 inf file
|
236
|
-
refactored diagnotic page - one button to see all information
|
237
|
-
added bug report upload to diagnostic page
|
238
|
-
|
239
|
-
version 1.58
|
240
|
-
check for zlib
|
241
|
-
check for files to delete
|
242
|
-
|
243
|
-
version 1.57
|
244
|
-
added rconftool use to update configuration files
|
245
|
-
changed applets remove to not used external rm
|
246
|
-
|
247
|
-
version 1.56
|
248
|
-
refactored gui files to load without intermediate files
|
249
|
-
refactored code files to load without intermediate files
|
250
|
-
|
251
|
-
version 1.55
|
252
|
-
refactored language files to load without intermediate files
|
253
|
-
refactored language files to load without intermediate files
|
254
|
-
|
255
|
-
version 1.54
|
256
|
-
refactored rwdtinker applet installation tab - remote gem and local installs share menu buttons
|
257
|
-
corrected some program logic errors in remote control code including close socket
|
258
|
-
|
259
|
-
version 1.53
|
260
|
-
added search of Gems repository for rwdtinker gems
|
261
|
-
download and install of Gems
|
1
|
+
= rwdmovies - for rwdtinker and RubyWebDialogs
|
262
2
|
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
version
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
version 1.3
|
323
|
-
refactored gui files to do easier i10n
|
324
|
-
removed lang directories under gui
|
325
|
-
added lang files under lang dir
|
326
|
-
removed redundant code files left from moving applet handling to back window
|
327
|
-
removed zipped applets not yet refactored
|
3
|
+
rwdmovies is meant to be used to keep track of your DVD and VHS collection.
|
4
|
+
|
5
|
+
The GUI interface used is RubyWebDialogs
|
6
|
+
|
7
|
+
RubyWebDialogs is a platform independent graphical user interface for Ruby applications. It generates HTML and serves it with an internal HTTP server, so you can use your favorite web browser as the front end for your Ruby application. All this means, that it can be used on almost every platform, like Ruby itself. http://www.erikveen.dds.nl/rubywebdialogs/
|
8
|
+
|
9
|
+
Install rwdtinker<br>
|
10
|
+
unzip this applet in the directory where you put rwdtinker
|
11
|
+
|
12
|
+
Start the program by typing<br>
|
13
|
+
ruby init.rb
|
14
|
+
|
15
|
+
Then point your web browser to:<br>
|
16
|
+
http://localhost:7701/
|
17
|
+
|
18
|
+
The rwdtinker framework is used by:<br>
|
19
|
+
|
20
|
+
Spliting the source code and the gui code into atomic parts and use init.rb to merge the parts together.
|
21
|
+
With the framework, we are able to ship a "plugin" or as I calling them "applet" that can be dropped into a directory and installed automatically. Also uninstalled. I am calling this framework Tinker, so the core program I call rwdtinker. My wife, Charlotte. suggested the name. It relates to the the "Tinker Toys" that has blocks and dowls and shapes that can be assembled by children and take different shapes. Without the word toy, it reminds us if the older English meaning of "a person who repairs pots and household devices by soldering and hammering.
|
22
|
+
The delivered applet is setup in the required directory structure with code configueration gui including help files location of documentation rwd_files = where documention for the applet can go. installed = a inf file that lists the manifest of files
|
23
|
+
This package is zipped up and uploaded as a file like rwdashedule-0.2.zip
|
24
|
+
The enduser who has the rwdtinker program drops the zip file into a directory called zips. I have parts of rwdtinker now (for Linux) that can install it automatically and remove it (based on the .inf file)
|
25
|
+
|
26
|
+
Requirements:
|
27
|
+
RubyWebDialogs - I am using 0.1.1 2004-12-5
|
28
|
+
|
29
|
+
Ruby I am using version 1.8.2
|
30
|
+
|
31
|
+
|
32
|
+
I have tested this under Linux-Debian kernel 2.6.9
|
33
|
+
|
34
|
+
PROBLEMS:
|
35
|
+
you should consult what beginning 3 characters for you files.
|
36
|
+
|
37
|
+
|
38
|
+
don't type in the extension .sch
|
39
|
+
|
40
|
+
Closing the browser doesn't terminate the application. You have to use the application's close-button And terminating the application doesn't terminate the application when running in network mode. You just log out.
|
41
|
+
|
42
|
+
Don't use the back-button of the browser! Strange and unpredictable things may and will happen!
|
43
|
+
|
44
|
+
Steven Gibson
|
45
|
+
steven@superant.com
|
46
|
+
|
47
|
+
|
48
|
+
http://rwdapplications.rubyforge.org/wiki/wiki.pl
|
49
|
+
|
50
|
+
== Changelog
|
51
|
+
version 0.93
|
52
|
+
some code comments
|
53
|
+
search screen help
|
54
|
+
amazon search improvements
|
55
|
+
add download movie picture from url
|
56
|
+
add create record on utilities screen
|
57
|
+
|
58
|
+
version 0.92
|
59
|
+
updated for rwdtinker version 1.60
|
60
|
+
one button bug report submissions
|
328
61
|
|
329
|
-
version
|
330
|
-
|
331
|
-
|
332
|
-
added
|
333
|
-
changed
|
334
|
-
|
335
|
-
version 1.23
|
336
|
-
moving diagnostic tab and applet handling tabs to second window
|
337
|
-
added selection panel tab to choose secondary windows.
|
338
|
-
|
339
|
-
version 1.21
|
340
|
-
changing version on help screen to be button
|
341
|
-
added version window
|
342
|
-
added diagnostic tab
|
62
|
+
version 0.91
|
63
|
+
movie poster opens on from page
|
64
|
+
updated for rwdtinker version 1.58
|
65
|
+
added rconftool use to update configuration files
|
66
|
+
changed applets removal to not use external rm
|
67
|
+
removed version number from directory name
|
343
68
|
|
344
|
-
version
|
345
|
-
added
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
version 1.1
|
350
|
-
changed order of elements on install applet tab
|
351
|
-
Add more i81n ablility - added lang directorys for language hash files
|
352
|
-
added in test file using WATIR stands for "Web Application Testing In Ruby,
|
353
|
-
|
354
|
-
version 1.0
|
355
|
-
Improved name selection in zips and applet screens
|
356
|
-
added rubyslippers applet and rwdrefreshacpi applets as zips
|
357
|
-
|
358
|
-
version 0.9
|
359
|
-
Fixed bug introduced in 0.8 - code files not sorted correctly - class end was not in correct location
|
360
|
-
updated RubyWebDialogs for people who do not have it installed
|
361
|
-
added rwdschedule applet as zip file
|
69
|
+
version 0.9
|
70
|
+
added back Amazon search
|
71
|
+
changed width of text fields
|
72
|
+
updated for rwdtinker version 1.50 - remote control and finding free ports
|
362
73
|
|
363
74
|
version 0.8
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
Added constants in conf file for code location and gui location
|
369
|
-
removed all zips not yt updated to new directory layout
|
370
|
-
change loading of conf files to not need intermediate file
|
371
|
-
and favicon.ico
|
372
|
-
|
75
|
+
added return from picture window
|
76
|
+
added features to configuration screen
|
77
|
+
added context sensitive help
|
78
|
+
|
373
79
|
version 0.7
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
zips directories
|
398
|
-
installed directory
|
399
|
-
installed applet lister
|
400
|
-
|
80
|
+
updated for rwdtinker 1.44
|
81
|
+
|
82
|
+
version 0.6
|
83
|
+
updated for rwdtinker version 1.4
|
84
|
+
added configuration screen
|
85
|
+
added rename movie filename
|
86
|
+
added delete movie record
|
87
|
+
added edit movie record
|
88
|
+
added attach picture
|
89
|
+
|
90
|
+
version 0.5
|
91
|
+
changed directory structure for rwdtinker 0.9 and later
|
92
|
+
added conf file for movie record directory location
|
93
|
+
split inf file for sample data
|
94
|
+
added nophoto.jpg and code to handle no jpg found
|
95
|
+
improved name selection on the main screen
|
96
|
+
|
97
|
+
version 0.4
|
98
|
+
Deleted Amazon search. Converted to be an
|
99
|
+
applet drop in for rwdtinker
|
100
|
+
|
101
|
+
|
102
|
+
|
@@ -1,19 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
1
|
require 'amazon/search'
|
5
2
|
include Amazon::Search
|
6
|
-
|
3
|
+
#amazon search
|
7
4
|
def runmoviesearch
|
8
|
-
req = Request.new(DEV_TOKEN)
|
9
|
-
testmovie = @a_moviefilename
|
10
|
-
s = ['keyword_search', "#{testmovie}", '
|
5
|
+
req = Request.new(DEV_TOKEN)
|
6
|
+
testmovie = @a_moviefilename
|
7
|
+
s = ['keyword_search', "#{testmovie}", 'dvd', HEAVY, ALL_PAGES,'Name']
|
11
8
|
|
12
9
|
|
13
|
-
s.pop
|
14
|
-
|
10
|
+
s.pop
|
11
|
+
begin
|
15
12
|
# parse and display the results of each search
|
16
13
|
response = req.send(*s) { |prod| @moviesearchdisplay = prod, '' }
|
17
14
|
# printf("Arguments returned from search were:\n\n%s\n", response.args.inspect)
|
18
|
-
|
15
|
+
rescue
|
16
|
+
print "result error"
|
17
|
+
end
|
19
18
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# this code is to attach a photo from the tmp directory
|
2
2
|
def attachtmpmoviepicture
|
3
|
-
if @a_moviefilename
|
3
|
+
if ! @a_moviefilename.empty?
|
4
4
|
$currentmovietext = @a_moviefilename
|
5
5
|
end
|
6
6
|
if $currentmovietext
|
@@ -10,9 +10,10 @@
|
|
10
10
|
newmoviepictureName = $tmpmoviepicture_directory + "/" + $currentmovietext + ".jpg"
|
11
11
|
if ! (tmpmoviepictureName == newmoviepictureName )
|
12
12
|
File.rename(tmpmoviepictureName, newmoviepictureName)
|
13
|
-
end
|
13
|
+
end
|
14
|
+
FileUtils.cp(newmoviepictureName , $rwdmovies_directory)
|
14
15
|
@listpicturesfromtmp = "Picture attached"
|
15
|
-
|
16
|
+
|
16
17
|
else
|
17
18
|
@listpicturesfromtmp = "attachment failed"
|
18
19
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# this method adds a new record
|
2
|
+
def createmovierecord
|
3
|
+
require 'fileutils'
|
4
|
+
if @a_moviefilename
|
5
|
+
newname = "%s" % [@a_moviefilename] # grab the new filename to create
|
6
|
+
newdata =@a_moviefilename.to_s # make the filename the first line of data
|
7
|
+
|
8
|
+
fullnewname = newname + ".nam"
|
9
|
+
begin # exception trapped block
|
10
|
+
fileName = File.join( $rwdmovies_directory, fullnewname )
|
11
|
+
fd = File.open(fileName,"w")
|
12
|
+
fd.print(newdata) # save the record info to the file
|
13
|
+
fd.close
|
14
|
+
@listpicturesfromtmp=newdata + " file created" #show the record info in the browser
|
15
|
+
rescue SystemCallError, StandardError
|
16
|
+
@listpicturesfromtmp = "file creation error: " + $!
|
17
|
+
$stderr.print "system call error: " + $!
|
18
|
+
end # exception rescue
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
|
2
|
+
# download picture
|
3
|
+
def downloadpicture
|
4
|
+
require 'net/http'
|
5
|
+
require 'uri'
|
6
|
+
uri = @a_urlpicturename
|
7
|
+
begin
|
8
|
+
uri_parse = URI.parse(uri)
|
9
|
+
host = uri_parse.host
|
10
|
+
path = uri_parse.path
|
11
|
+
response = nil
|
12
|
+
|
13
|
+
http = Net::HTTP.start(host)
|
14
|
+
|
15
|
+
|
16
|
+
response = http.get(path)
|
17
|
+
|
18
|
+
data = response.body
|
19
|
+
File.open("/tmp/test.jpg", "w") { |f| f.write(data) }
|
20
|
+
@listpicturesfromtmp = "picture downloaded"
|
21
|
+
|
22
|
+
rescue
|
23
|
+
@listpicturesfromtmp = "error retrieving #{uri}:"
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
end
|
@@ -1,4 +1,19 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# show picture
|
2
|
+
def viewmoviephoto
|
3
|
+
path_to = File.join( "rwd_files", "moviestmp.jpg" )
|
4
|
+
begin
|
5
|
+
if ! @a_tmppicturename.empty?
|
6
|
+
path_from = File.join( $tmpmoviepicture_directory, @a_tmppicturename.to_s )
|
7
|
+
print path_from.to_s
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
FileUtils.cp(path_from, path_to)
|
12
|
+
@rwd_window = "moviephoto"
|
13
|
+
|
14
|
+
end
|
15
|
+
rescue
|
16
|
+
print "picture copy error"
|
17
|
+
end
|
3
18
|
|
4
19
|
end
|
@@ -16,9 +16,17 @@
|
|
16
16
|
You can edit the configuration
|
17
17
|
|
18
18
|
Remember to reload the configuration variables if you want your
|
19
|
-
changes used."
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
changes used.",
|
20
|
+
:rwdmovies_amazonsearch => " You can search
|
21
|
+
Amazon
|
22
|
+
",
|
23
|
+
:rwdmovies_utilities => "On this tab you can
|
24
|
+
1. create a movie record - it will create a one line record with the file name
|
25
|
+
2. rename a movie record
|
26
|
+
3. delete a moview record
|
27
|
+
4. attach a picture to a record - you can list the jpg files in your tmp directory
|
28
|
+
5. download a picture from a url - it will create test.jpg in your tmp directory
|
29
|
+
6. view a picture in the tmp directory
|
30
|
+
"
|
23
31
|
|
24
32
|
)
|
@@ -7,8 +7,15 @@ def runhelpwindowrwdmovies
|
|
7
7
|
end
|
8
8
|
if @rwd_tab == "viewrwdmoviesconfiguration"
|
9
9
|
$help_topic = "rwdmovies_configuration"
|
10
|
-
end
|
11
|
-
|
10
|
+
end
|
11
|
+
if @rwd_tab == "moviesearch"
|
12
|
+
$help_topic = "rwdmovies_amazonsearch"
|
13
|
+
end
|
14
|
+
if @rwd_tab == "movieutilitiesrwdmovies"
|
15
|
+
$help_topic = "rwdmovies_utilities"
|
16
|
+
end
|
17
|
+
|
18
|
+
$helptopicsarray = $helptopicsarray | ["rwdmovies_configuration","rwdmovies_generalhelp","rwdmovies_help","rwdmovies_utilities","rwdmovies_amazonsearch"]
|
12
19
|
|
13
20
|
|
14
21
|
|
@@ -1,10 +1,9 @@
|
|
1
|
-
# Application
|
2
|
-
# This application is a contact book
|
1
|
+
# Application Rwdtinker orginally (c) 2004 Steven Gibson under GPL.
|
3
2
|
# For more information about see http://www.rubyforge.net/projects/rwdapplications
|
4
3
|
|
5
4
|
# return to main
|
6
5
|
def returntomain
|
7
6
|
@rwd_window = "main"
|
8
|
-
|
7
|
+
|
9
8
|
end
|
10
9
|
|
@@ -1,5 +1,4 @@
|
|
1
|
-
# Application
|
2
|
-
# This application is a contact book
|
1
|
+
# Application Rwdtinker orginally (c) 2004 Steven Gibson under GPL.
|
3
2
|
# For more information about see http://www.rubyforge.net/projects/rwdapplications
|
4
3
|
|
5
4
|
# call the window
|
@@ -1,4 +1,4 @@
|
|
1
|
-
##VERSION:0.
|
1
|
+
##VERSION:0.93
|
2
2
|
##NAME:$rwdmovies_directory:0
|
3
3
|
$rwdmovies_directory="movies"
|
4
4
|
##NAME:$tmpmoviepicture_directory:0
|
@@ -7,4 +7,4 @@ $tmpmoviepicture_directory = "/tmp"
|
|
7
7
|
|
8
8
|
DEV_TOKEN = "D23XFCO2UKJY82" # your development token
|
9
9
|
|
10
|
-
RwdMoviesVersion = "0.
|
10
|
+
RwdMoviesVersion = "0.93"
|
@@ -4,13 +4,19 @@ $rwdguivar=
|
|
4
4
|
<table>
|
5
5
|
<row> <p> </row>
|
6
6
|
<row> <p align=\"center\">You can search Amazon for movie details - you need ruby-amazon modules installed</row>
|
7
|
-
<row> <p> </row>
|
7
|
+
<row> <p> </row>
|
8
|
+
</table>
|
9
|
+
<horizontal>
|
10
|
+
<button caption=\"Show Ruby-Amazon Version\" action=\"showamazonsettings\"/>
|
11
|
+
</horizontal>
|
12
|
+
<p>%amazonsettings%</p>
|
13
|
+
<table>
|
8
14
|
<row><p> FileName:</p> <text name=\"a_moviefilename\"/> </row>
|
9
15
|
</table>
|
10
16
|
<horizontal>
|
11
17
|
<button caption=\"Search\" action=\"runmoviesearch\"/>
|
12
18
|
|
13
|
-
<button caption=\"Help\" action=\"
|
19
|
+
<button caption=\"Help\" action=\"runhelpwindowrwdmovies\"/>
|
14
20
|
|
15
21
|
|
16
22
|
|
@@ -3,24 +3,34 @@ $rwdguivar=
|
|
3
3
|
<tab name=\"movieutilitiesrwdmovies\" caption=\"Movie Utilities\">
|
4
4
|
|
5
5
|
<table>
|
6
|
-
<row> <p align=\"right\">Movie Name:</p> <text name=\"a_moviefilename\"/> </row>
|
7
|
-
<row> <p align=\"right\">New Name:</p> <text name=\"a_changemoviedata\"/> </row>
|
6
|
+
<row> <p align=\"right\">Movie Name:</p> <text size=70 name=\"a_moviefilename\"/> </row>
|
7
|
+
<row> <p align=\"right\">New Name:</p> <text size=70 name=\"a_changemoviedata\"/> </row>
|
8
8
|
|
9
9
|
</table>
|
10
10
|
|
11
|
-
<horizontal>
|
11
|
+
<horizontal>
|
12
|
+
<button caption=\"Create Record\" action=\"createmovierecord\"/>
|
12
13
|
<button caption=\"Rename Record\" action=\"changemoviedata\"/>
|
13
14
|
<button caption=\"Delete Record\" action=\"deletemovierecord\"/>
|
14
|
-
|
15
|
+
<button caption=\"Help\" action=\"runhelpwindowrwdmovies\"/>
|
16
|
+
</horizontal>
|
15
17
|
<table>
|
16
18
|
|
17
|
-
<row> <p align=\"right\">Picture Name:</p> <text name=\"a_tmppicturename\"/> </row>
|
19
|
+
<row> <p align=\"right\">Picture Name:</p> <text size=70 name=\"a_tmppicturename\"/> </row>
|
18
20
|
</table>
|
19
21
|
|
20
22
|
<horizontal>
|
21
23
|
<button caption=\"Attach Picture\" action=\"attachtmpmoviepicture\"/>
|
22
|
-
|
24
|
+
<button caption=\"View Picture\" action=\"viewmoviephoto\"/>
|
25
|
+
|
26
|
+
</horizontal>
|
27
|
+
<table>
|
23
28
|
|
29
|
+
<row> <p align=\"right\">Picture URL:</p> <text size=70 name=\"a_urlpicturename\"/> </row>
|
30
|
+
</table>
|
31
|
+
<horizontal>
|
32
|
+
<button caption=\"Download Picture from URL\" action=\"downloadpicture\"/>
|
33
|
+
</horizontal>
|
24
34
|
<horizontal>
|
25
35
|
<button caption=\"List Movies\" action=\"listmovierecordfiles\"/>
|
26
36
|
|
data/rwd_files/HowTo_Movies.txt
CHANGED
@@ -48,6 +48,13 @@ steven@superant.com
|
|
48
48
|
http://rwdapplications.rubyforge.org/wiki/wiki.pl
|
49
49
|
|
50
50
|
== Changelog
|
51
|
+
version 0.93
|
52
|
+
some code comments
|
53
|
+
search screen help
|
54
|
+
amazon search improvements
|
55
|
+
add download movie picture from url
|
56
|
+
add create record on utilities screen
|
57
|
+
|
51
58
|
version 0.92
|
52
59
|
updated for rwdtinker version 1.60
|
53
60
|
one button bug report submissions
|
data/rwd_files/moviestmp.jpg
CHANGED
Binary file
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.6
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rwdmovies
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: "0.
|
7
|
-
date: 2005-03-
|
6
|
+
version: "0.93"
|
7
|
+
date: 2005-03-19
|
8
8
|
summary: rwdmovies application is a movie database using RubyWebDialogs.
|
9
9
|
require_paths:
|
10
10
|
- "."
|
@@ -79,6 +79,9 @@ files:
|
|
79
79
|
- code/superant.com.rwdmovies/helptexthashrwdmovies.rb
|
80
80
|
- code/superant.com.rwdmovies/openhelpwindowrwdmovies.rb
|
81
81
|
- code/superant.com.rwdmovies/amazonsearch.rb
|
82
|
+
- code/superant.com.rwdmovies/showamazonsettings.rb
|
83
|
+
- code/superant.com.rwdmovies/downloadpic.rb
|
84
|
+
- code/superant.com.rwdmovies/createmovierecord.rb
|
82
85
|
- configuration/tinkerwin2variables.dist
|
83
86
|
- configuration/rwdtinker.dist
|
84
87
|
- configuration/language.dist
|
@@ -140,7 +143,6 @@ files:
|
|
140
143
|
- gui/tinkerbackwindows/superant.com.tinkerbackwindow
|
141
144
|
- gui/tinkerbackwindows/superant.com.tinkerhelpwindow
|
142
145
|
- gui/tinkerbackwindows/superant.com.versionwindow
|
143
|
-
- gui/tinkerbackwindows/superant.com.rwdmovies
|
144
146
|
- gui/tinkerbackwindows/superant.com.rwdmoviespicture
|
145
147
|
- gui/tinkerbackwindows/superant.com.tinkerbackwindow/1appname.rwd
|
146
148
|
- gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd
|
@@ -154,15 +156,6 @@ files:
|
|
154
156
|
- gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd
|
155
157
|
- gui/tinkerbackwindows/superant.com.tinkerhelpwindow/9end.rwd
|
156
158
|
- gui/tinkerbackwindows/superant.com.versionwindow/1appname.rwd
|
157
|
-
- gui/tinkerbackwindows/superant.com.rwdmovies/1openmoviedata.rwd
|
158
|
-
- gui/tinkerbackwindows/superant.com.rwdmovies/2openmoviephoto.rwd
|
159
|
-
- gui/tinkerbackwindows/superant.com.rwdmovies/3listmoviegfiles.rwd
|
160
|
-
- gui/tinkerbackwindows/superant.com.rwdmovies/6editrecord.rwd
|
161
|
-
- gui/tinkerbackwindows/superant.com.rwdmovies/7moviesutilities.rwd
|
162
|
-
- gui/tinkerbackwindows/superant.com.rwdmovies/9returntab.rwd
|
163
|
-
- gui/tinkerbackwindows/superant.com.rwdmovies/z9end.rwd
|
164
|
-
- gui/tinkerbackwindows/superant.com.rwdmovies/8viewconfiguration.rwd
|
165
|
-
- gui/tinkerbackwindows/superant.com.rwdmovies/6moviesearch.rwd
|
166
159
|
- gui/tinkerbackwindows/superant.com.rwdmoviespicture/xx8moviephotoview.rwd
|
167
160
|
- gui/zzcoreguiend/tinkerapplicationguiend/yy9rwdend.rwd
|
168
161
|
- rwd_files/favicon.ico
|
@@ -1,18 +0,0 @@
|
|
1
|
-
$rwdguivar=
|
2
|
-
"
|
3
|
-
|
4
|
-
<tab name=\"viewrwdmovielist\" caption=\"View Movie\">
|
5
|
-
<row> <p align=\"right\">Click on List Movies to see your Movies</row>
|
6
|
-
<row><p></row>
|
7
|
-
<table>
|
8
|
-
<row> <p align=\"right\">Movie Name:</p> <text name=\"a_moviefilename\"/> </row>
|
9
|
-
|
10
|
-
</table>
|
11
|
-
|
12
|
-
<horizontal>
|
13
|
-
<button caption=\"Open\" action=\"openmoviedata\"/>
|
14
|
-
<button caption=\"Help\" action=\"runhelpwindowrwdmovies\"/>
|
15
|
-
|
16
|
-
</horizontal>"
|
17
|
-
|
18
|
-
|
@@ -1,35 +0,0 @@
|
|
1
|
-
$rwdguivar=
|
2
|
-
"
|
3
|
-
<tab name=\"editmovierecordfile\" caption=\"Edit Movie\">
|
4
|
-
<table>
|
5
|
-
<row> <p> </row>
|
6
|
-
<row> <p align=\"right\">You can create a new record here or edit one</row>
|
7
|
-
<row> <p> </row>
|
8
|
-
<horizontal>
|
9
|
-
<button caption=\"Fill Record\" action=\"loadmovierecord\"/>
|
10
|
-
<button caption=\"Save Changes\" action=\"savemovierecord\"/>
|
11
|
-
<button caption=\"Clear\" action=\"clearmoviescreendisplay\"/>
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
</horizontal>
|
17
|
-
<table>
|
18
|
-
<row> <p align=\"right\">FileName:</p> <text size=70 name=\"a_moviefilename\"/> </row>
|
19
|
-
<row> <p align=\"right\">Movie Name:</p> <text size=70 name=\"a_moviename\"/> </row>
|
20
|
-
<row> <p align=\"right\">Director:</p> <text size=70 name=\"a_moviedirector\"/> </row>
|
21
|
-
<row> <p align=\"right\">Actors:</p> <text size=70 name=\"a_movieactors\"/> </row>
|
22
|
-
<row> <p align=\"right\">Year:</p> <text size=70 name=\"a_movieyear\"/> </row>
|
23
|
-
<row> <p align=\"right\">Studio:</p> <text size=70 name=\"a_moviestudio\"/> </row>
|
24
|
-
<row> <p align=\"right\">Comment1:</p> <text size=70 name=\"a_moviecomment1\"/> </row>
|
25
|
-
<row> <p align=\"right\">Comment2:</p> <text size=70 name=\"a_moviecomment2\"/> </row>
|
26
|
-
<row> <p align=\"right\">Comment3:</p> <text size=70 name=\"a_moviecomment3\"/> </row>
|
27
|
-
</table>
|
28
|
-
<p>%extramoviedatadisplay%</p>
|
29
|
-
<p>
|
30
|
-
<p>%changedmovieresult%</p>
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
</tab>"
|
35
|
-
|
@@ -1,27 +0,0 @@
|
|
1
|
-
$rwdguivar=
|
2
|
-
"
|
3
|
-
<tab name=\"moviesearch\" caption=\"Movie Search\">
|
4
|
-
<table>
|
5
|
-
<row> <p> </row>
|
6
|
-
<row> <p align=\"right\">You can search</row>
|
7
|
-
<row> <p> </row>
|
8
|
-
<row> <p align=\"right\">Search Term:</p> <text name=\"a_moviefilename\"/> </row>
|
9
|
-
</table>
|
10
|
-
<horizontal>
|
11
|
-
<button caption=\"Search\" action=\"runmoviesearch\"/>
|
12
|
-
|
13
|
-
<button caption=\"Help\" action=\"clearmoviescreendisplay\"/>
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
</horizontal>
|
19
|
-
|
20
|
-
<p><textarea name=\"moviesearchdisplay\"/></p>
|
21
|
-
<p>
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
</tab>"
|
27
|
-
|
@@ -1,33 +0,0 @@
|
|
1
|
-
$rwdguivar=
|
2
|
-
"
|
3
|
-
<tab name=\"movieutilitiesrwdmovies\" caption=\"Movie Utilities\">
|
4
|
-
|
5
|
-
<table>
|
6
|
-
<row> <p align=\"right\">Movie Name:</p> <text name=\"a_moviefilename\"/> </row>
|
7
|
-
<row> <p align=\"right\">New Name:</p> <text name=\"a_changemoviedata\"/> </row>
|
8
|
-
|
9
|
-
</table>
|
10
|
-
|
11
|
-
<horizontal>
|
12
|
-
<button caption=\"Rename Record\" action=\"changemoviedata\"/>
|
13
|
-
<button caption=\"Delete Record\" action=\"deletemovierecord\"/>
|
14
|
-
</horizontal>
|
15
|
-
<table>
|
16
|
-
|
17
|
-
<row> <p align=\"right\">Picture Name:</p> <text name=\"a_tmppicturename\"/> </row>
|
18
|
-
</table>
|
19
|
-
|
20
|
-
<horizontal>
|
21
|
-
<button caption=\"Attach Picture\" action=\"attachtmpmoviepicture\"/>
|
22
|
-
</horizontal>
|
23
|
-
|
24
|
-
<horizontal>
|
25
|
-
<button caption=\"List Movies\" action=\"listmovierecordfiles\"/>
|
26
|
-
|
27
|
-
|
28
|
-
<button caption=\"List Pictures\" action=\"viewtmppicture\"/>
|
29
|
-
</horizontal>
|
30
|
-
|
31
|
-
<p>%%moviefilelistresult%%</p>
|
32
|
-
<p>%%listpicturesfromtmp%%</p>
|
33
|
-
</tab>"
|
@@ -1,37 +0,0 @@
|
|
1
|
-
$rwdguivar=
|
2
|
-
"
|
3
|
-
<tab name=\"viewrwdmoviesconfiguration\" caption=\"RwdMovies Configuration\">
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
<table>
|
8
|
-
<row> <p> </row>
|
9
|
-
<row> <p align=\"right\">You can view or edit the rwdmovies configuration file here</row>
|
10
|
-
<row> <p> </row>
|
11
|
-
<horizontal>
|
12
|
-
<button caption=\"Fill Record\" action=\"loadrwdmoviesconfiguration\"/>
|
13
|
-
<button caption=\"Save Changes\" action=\"saverwdmoviesconfiguration\"/>
|
14
|
-
<button caption=\"Reload Variables\" action=\"loadrwdmoviesconfigurationvariables\"/>
|
15
|
-
<button caption=\"Help\" action=\"runhelpwindowrwdmovies\"/>
|
16
|
-
</horizontal>
|
17
|
-
<table>
|
18
|
-
|
19
|
-
<row> <p align=\"right\">FileName:</p> <text size=70 name=\"a_movconfigurationfilename\"/> </row>
|
20
|
-
<row> <p align=\"right\">1:</p> <text size=70 name=\"a_movconfigline1\"/> </row>
|
21
|
-
<row> <p align=\"right\">2:</p> <text size=70 name=\"a_movconfigline2\"/> </row>
|
22
|
-
<row> <p align=\"right\">3:</p> <text size=70 name=\"a_movconfigline3\"/> </row>
|
23
|
-
<row> <p align=\"right\">4:</p> <text size=70 name=\"a_movconfigline4\"/> </row>
|
24
|
-
<row> <p align=\"right\">5:</p> <text size=70 name=\"a_movconfigline5\"/> </row>
|
25
|
-
<row> <p align=\"right\">6:</p> <text size=70 name=\"a_movconfigline6\"/> </row>
|
26
|
-
<row> <p align=\"right\">7:</p> <text size=70 name=\"a_movconfigline7\"/> </row>
|
27
|
-
<row> <p align=\"right\">8:</p> <text size=70 name=\"a_movconfigline8\"/> </row>
|
28
|
-
<row> <p align=\"right\">9:</p> <text size=70 name=\"a_movconfigline9\"/> </row>
|
29
|
-
|
30
|
-
</table>
|
31
|
-
<p>%extramovconfigdatadisplay%</p>
|
32
|
-
<p>
|
33
|
-
<p>%newmovconfigurationresult%</p>
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
</tab>"
|