rwdmovies 0.93 → 0.94
Sign up to get free protection for your applications and to get access to all the features.
- data/Readme.txt +3 -0
- data/code/01rwdcore/01rwdcore.rb +15 -13
- data/code/01rwdcore/openhelpwindow.rb +26 -26
- data/code/01rwdcore/returntomain.rb +8 -8
- data/code/01rwdcore/rwdtinkerversion.rb +12 -13
- data/code/01rwdcore/rwdwindowreturn.rb +3 -5
- data/code/01rwdcore/test_cases.rb +115 -0
- data/code/01rwdcore/test_harness.rb +12 -0
- data/code/01rwdcore/uploadreturns.rb +60 -61
- data/code/superant.com.rwdmovies/amazonsearch.rb +8 -2
- data/code/superant.com.rwdmovies/attachtmpmoviepicture.rb +24 -24
- data/code/superant.com.rwdmovies/createmovierecord.rb +20 -20
- data/code/superant.com.rwdmovies/deletemovierecord.rb +21 -21
- data/code/superant.com.rwdmovies/downloadpic.rb +21 -23
- data/code/superant.com.rwdmovies/eo2viewmoviephoto.rb +13 -18
- data/code/superant.com.rwdmovies/gl7clearscreendisplay.rb +12 -15
- data/code/superant.com.rwdmovies/listmoviefiles.rb +10 -14
- data/code/superant.com.rwdmovies/loadconfigurationrecord.rb +28 -33
- data/code/superant.com.rwdmovies/loadconfigurationvariables.rb +13 -13
- data/code/superant.com.rwdmovies/openhelpwindowrwdmovies.rb +21 -26
- data/code/superant.com.rwdmovies/openmoviedata.rb +27 -27
- data/code/superant.com.rwdmovies/renamemovie.rb +11 -12
- data/code/superant.com.rwdmovies/returntomain.rb +7 -7
- data/code/superant.com.rwdmovies/runrwdmoviesbackwindow.rb +8 -8
- data/code/superant.com.rwdmovies/rwdmovieshelpabout.rb +10 -12
- data/code/superant.com.rwdmovies/saveconfigurationrecord.rb +18 -18
- data/code/superant.com.rwdmovies/savemoviechanges.rb +18 -18
- data/code/superant.com.rwdmovies/showamazonsettings.rb +7 -4
- data/code/superant.com.rwdmovies/viewrwdmoviesconfiguration.rb +21 -21
- data/code/superant.com.rwdmovies/viewtmppictures.rb +5 -5
- data/code/superant.com.rwdtinkerbackwindow/controlclient.rb +89 -92
- data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +15 -21
- data/code/superant.com.rwdtinkerbackwindow/installapplet.rb +19 -18
- data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +20 -19
- data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +19 -18
- data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +7 -7
- data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +48 -49
- data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +8 -7
- data/code/superant.com.rwdtinkerbackwindow/listzips.rb +22 -26
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +32 -31
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +14 -13
- data/code/superant.com.rwdtinkerbackwindow/network.rb +82 -82
- data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +18 -17
- data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +37 -37
- data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +20 -20
- data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +33 -32
- data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +8 -9
- data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +10 -11
- data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +19 -18
- data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +21 -20
- data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +23 -20
- data/configuration/language.dist +1 -1
- data/configuration/rwdapplicationidentity.dist +1 -1
- data/configuration/rwdmovies.dist +2 -2
- data/configuration/rwdtinker.dist +2 -2
- data/configuration/tinkerwin2variables.dist +1 -1
- data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/3copyright.rwd +1 -1
- data/init.rb +231 -228
- data/installed/rwdviewlogo-0.4.inf +4 -0
- data/rwd_files/HowTo_Movies.txt +3 -0
- data/rwd_files/HowTo_Tinker.txt +10 -0
- data/rwd_files/moviestmp.jpg +0 -0
- data/rwdconfig.dist +6 -2
- data/tests/makedist.rb +37 -8
- metadata +7 -9
- data/gui/helpaboutinstalled/superant.com.rwdwin2helpabout/1appname.rwd +0 -4
- data/gui/helpaboutinstalled/superant.com.rwdwin2helpabout/3copyright.rwd +0 -3
- data/gui/helpaboutinstalled/superant.com.rwdwin2helpabout/5version.rwd +0 -10
- data/rwd_files/tinker.png +0 -0
@@ -1,15 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
end
|
1
|
+
# this method clears the on screen variables
|
2
|
+
def clearmoviescreendisplay
|
3
|
+
@a_moviefilename = ""
|
4
|
+
@a_moviename = ""
|
5
|
+
@a_moviedirector = ""
|
6
|
+
@a_movieactors = ""
|
7
|
+
@a_movieyear = ""
|
8
|
+
@a_moviestudio = ""
|
9
|
+
@a_moviecomment1 = ""
|
10
|
+
@a_moviecomment2 =""
|
11
|
+
@a_moviecomment3 = ""
|
12
|
+
end
|
@@ -1,19 +1,15 @@
|
|
1
1
|
# this code is to list the movie names
|
2
2
|
def listmovierecordfiles
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
begin
|
4
|
+
fileList = Dir.new($rwdmovies_directory).entries.sort.delete_if { |x| ! (x =~ /nam$/) }
|
5
|
+
@moviefilelistresult = fileList.rwd_method("fillrwdmovierecordname")
|
6
|
+
rescue
|
7
|
+
@moviefilelistresult = "file error"
|
8
|
+
end
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
def fillrwdmovierecordname(inffile)
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
applet = inffile.gsub(/\.nam$/, "")
|
13
|
+
@a_moviefilename = applet
|
14
|
+
@a_moviedisplay = applet
|
15
15
|
end
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
@@ -1,34 +1,29 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
|
6
|
-
@a_movconfigurationfilename = "rwdmovies.cnf"
|
7
|
-
|
8
|
-
|
9
|
-
begin # exception trapped block
|
10
|
-
|
11
|
-
Dir.chdir($progdir)
|
12
|
-
fileName = File.join(ConfigurationDir, "rwdmovies.cnf")
|
13
|
-
|
14
|
-
|
15
|
-
fd = File.open(fileName,"r")
|
16
|
-
@a_movconfigline1= fd.readline.chomp
|
17
|
-
@a_movconfigline2 = fd.readline.chomp
|
18
|
-
@a_movconfigline3 = fd.readline.chomp
|
19
|
-
@a_movconfigline4 = fd.readline.chomp
|
20
|
-
@a_movconfigline5 = fd.readline.chomp
|
21
|
-
@a_movconfigline6 = fd.readline.chomp
|
22
|
-
@a_movconfigline7 =fd.readline.chomp
|
23
|
-
@a_movconfigline8 = fd.readline.chomp
|
24
|
-
@a_movconfigline9 = fd.readline.chomp
|
25
|
-
|
26
|
-
while ! fd.eof?
|
27
|
-
@extramovconfigdatadisplay = fd.readline
|
28
|
-
end
|
29
|
-
fd.close
|
30
|
-
rescue SystemCallError, StandardError
|
31
|
-
$stderr.print "system call error: " + $!
|
32
|
-
end # exception rescue
|
1
|
+
# this method puts the configuration record on the screen
|
2
|
+
def loadrwdmoviesconfiguration
|
33
3
|
|
34
|
-
|
4
|
+
require 'fileutils'
|
5
|
+
|
6
|
+
@a_movconfigurationfilename = "rwdmovies.cnf"
|
7
|
+
|
8
|
+
begin # exception trapped block
|
9
|
+
Dir.chdir($progdir)
|
10
|
+
fileName = File.join(ConfigurationDir, "rwdmovies.cnf")
|
11
|
+
fd = File.open(fileName,"r")
|
12
|
+
@a_movconfigline1= fd.readline.chomp
|
13
|
+
@a_movconfigline2 = fd.readline.chomp
|
14
|
+
@a_movconfigline3 = fd.readline.chomp
|
15
|
+
@a_movconfigline4 = fd.readline.chomp
|
16
|
+
@a_movconfigline5 = fd.readline.chomp
|
17
|
+
@a_movconfigline6 = fd.readline.chomp
|
18
|
+
@a_movconfigline7 =fd.readline.chomp
|
19
|
+
@a_movconfigline8 = fd.readline.chomp
|
20
|
+
@a_movconfigline9 = fd.readline.chomp
|
21
|
+
|
22
|
+
while ! fd.eof?
|
23
|
+
@extramovconfigdatadisplay = fd.readline
|
24
|
+
end
|
25
|
+
fd.close
|
26
|
+
rescue SystemCallError, StandardError
|
27
|
+
$stderr.print "system call error: " + $!
|
28
|
+
end # exception rescue
|
29
|
+
end
|
@@ -1,13 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
@newmovconfigurationresult = "Config Variables loaded"
|
9
|
-
rescue
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
1
|
+
# this method loads the on screen variables into the running class
|
2
|
+
def loadrwdmoviesconfigurationvariables
|
3
|
+
|
4
|
+
configfiletoload = File.join(ConfigurationDir,"rwdmovies.cnf")
|
5
|
+
begin
|
6
|
+
load configfiletoload
|
7
|
+
@extramovconfigdatadisplay = ""
|
8
|
+
@newmovconfigurationresult = "Config Variables loaded"
|
9
|
+
rescue
|
10
|
+
@extramovconfigdatadisplay = ""
|
11
|
+
@newmovconfigurationresult = "loading error"
|
12
|
+
end
|
13
|
+
end
|
@@ -1,29 +1,24 @@
|
|
1
1
|
# this code is to call the help window
|
2
2
|
def runhelpwindowrwdmovies
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
$previoustab = @rwd_tab
|
25
|
-
end
|
26
|
-
runhelpwindow
|
3
|
+
|
4
|
+
$help_topic = "rwdmovies_generalhelp"
|
5
|
+
if @rwd_tab == "viewnamedata"
|
6
|
+
$help_topic = "rwdmovies_help"
|
7
|
+
end
|
8
|
+
if @rwd_tab == "viewrwdmoviesconfiguration"
|
9
|
+
$help_topic = "rwdmovies_configuration"
|
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"]
|
19
|
+
if @rwd_window != "rwdtinkerhelpwindow"
|
20
|
+
$previouswindow = @rwd_window
|
21
|
+
$previoustab = @rwd_tab
|
22
|
+
end
|
23
|
+
runhelpwindow
|
27
24
|
end
|
28
|
-
|
29
|
-
|
@@ -1,28 +1,28 @@
|
|
1
1
|
#open the record
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
2
|
+
def openmoviedata
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
$currentmovietext = "%s" % [@a_moviefilename]
|
6
|
+
photoname = $currentmovietext + ".jpg"
|
7
|
+
begin # exception trapped block
|
8
|
+
path_to = File.join( "rwd_files", "moviestmp.jpg" )
|
9
|
+
path_from = File.join( $rwdmovies_directory, photoname )
|
10
|
+
if ! File.exist?(path_from)
|
11
|
+
path_from = File.join($rwdmovies_directory,"nophoto.jpg" )
|
12
|
+
end
|
13
|
+
if File.exist?(path_from)
|
14
|
+
FileUtils.cp(path_from, path_to)
|
15
|
+
end
|
16
|
+
fileName = $rwdmovies_directory + "/" + $currentmovietext + ".nam"
|
17
|
+
|
18
|
+
fd = File.open(fileName,"r")
|
19
|
+
@moviedatadisplay = " "
|
20
|
+
while ! fd.eof?
|
21
|
+
@moviedatadisplay = fd.read
|
22
|
+
end
|
23
|
+
fd.close
|
24
|
+
rescue SystemCallError, StandardError
|
25
|
+
$stderr.print "system call error: " + $!
|
26
|
+
end # exception rescue
|
27
|
+
|
28
|
+
end
|
@@ -1,13 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
# this code is to change the record name
|
2
|
+
def changemoviedata
|
3
|
+
oldName = $rwdmovies_directory + "/" + @a_moviefilename + ".nam"
|
4
|
+
newName = $rwdmovies_directory + "/" + @a_changemoviedata + ".nam"
|
5
|
+
File.rename(oldName, newName)
|
6
|
+
oldphotoName = $rwdmovies_directory + "/" + @a_moviefilename + ".jpg"
|
7
|
+
newphotoName = $rwdmovies_directory + "/" + @a_changemoviedata + ".jpg"
|
8
|
+
if File.exist?(oldphotoName)
|
9
|
+
File.rename(oldphotoName, newphotoName)
|
10
|
+
end
|
11
|
+
end
|
13
12
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# Application Rwdtinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
-
# For
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
# For information see http://www.rubyforge.net/projects/rwdapplications
|
3
|
+
|
4
|
+
# return to main
|
5
|
+
def returntomain
|
6
|
+
@rwd_window = "main"
|
7
|
+
|
8
|
+
end
|
7
9
|
|
8
|
-
end
|
9
|
-
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# Application Rwdtinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
-
# For
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
2
|
+
# For information see http://www.rubyforge.net/projects/rwdapplications
|
3
|
+
|
4
|
+
# call the window
|
5
|
+
def runrwdmoviesbackwindow
|
6
|
+
@rwd_window = "rwdmovieswindow"
|
7
|
+
@rwd_tab= "viewrwdmovielist"
|
8
|
+
end
|
9
|
+
|
@@ -1,14 +1,12 @@
|
|
1
1
|
# Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
-
#
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
2
|
+
# For information see http://www.rubyforge.net/projects/rwdapplications
|
3
|
+
|
4
|
+
# return the version constant defined in the config file
|
5
|
+
def runrwdmoviesversion
|
6
|
+
@rwd_window = "applicationversion"
|
7
|
+
@versionappnamedisplay = "RwdMovies"
|
8
|
+
@versioncopyrightdisplay = "(c) 2004 Steven Gibson "
|
9
|
+
@versionnumberdisplay = "Version " + RwdMoviesVersion
|
10
|
+
|
11
|
+
end
|
12
12
|
|
13
|
-
end
|
14
|
-
|
@@ -1,18 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
1
|
+
# this method adds a new record
|
2
|
+
def saverwdmoviesconfiguration
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
newname = "rwdmovies.cnf" # grab the filename to create
|
6
|
+
newdata =@a_movconfigline1.to_s + "\n" + @a_movconfigline2.to_s + "\n" + @a_movconfigline3.to_s + "\n" + @a_movconfigline4.to_s + "\n" + @a_movconfigline5.to_s + "\n" + @a_movconfigline6.to_s + "\n" + @a_movconfigline7.to_s + "\n" + @a_movconfigline8.to_s + "\n" + @a_movconfigline9.to_s + "\n"
|
7
|
+
|
8
|
+
begin # exception trapped block
|
9
|
+
fileName = File.join( ConfigurationDir, newname )
|
10
|
+
fd = File.open(fileName,"w")
|
11
|
+
fd.print(newdata) # save the record info to the file
|
12
|
+
fd.close
|
13
|
+
@newmovconfigurationresult=newdata # show the record info in the browser
|
14
|
+
rescue SystemCallError, StandardError
|
15
|
+
$stderr.print "system call error: " + $!
|
16
|
+
end # exception rescue
|
17
|
+
|
18
|
+
end
|
@@ -1,19 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
# this method adds a new record
|
2
|
+
def savemovierecord
|
3
|
+
require 'fileutils'
|
4
|
+
if @a_moviefilename
|
5
|
+
newname = "%s" % [@a_moviefilename] # grab the new filename to create
|
6
|
+
newdata =@a_moviename.to_s + "\n" + @a_moviedirector.to_s + "\n" + @a_movieactors.to_s + "\n" + @a_movieyear.to_s + "\n" + @a_moviestudio.to_s + "\n" + @a_moviecomment1.to_s + "\n" + @a_moviecomment2.to_s + "\n" + @a_moviecomment3.to_s + "\n"
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
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
|
+
@changedmovieresult=newdata # show the record info in the browser
|
15
|
+
rescue SystemCallError, StandardError
|
16
|
+
$stderr.print "system call error: " + $!
|
17
|
+
end # exception rescue
|
18
|
+
end
|
19
|
+
end
|
@@ -1,22 +1,22 @@
|
|
1
1
|
#view the configuration record
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
2
|
+
def viewrwdmoviesconfiguration
|
3
|
+
require 'fileutils'
|
4
|
+
begin # exception trapped block
|
5
|
+
|
6
|
+
Dir.chdir($progdir)
|
7
|
+
rwdmoviesconfigurationfile = File.join( "configuration", "rwdmovies.cnf" )
|
8
|
+
if File.exist?(rwdmoviesconfigurationfile)
|
9
|
+
fd = File.open(rwdmoviesconfigurationfile,"r")
|
10
|
+
@rwdmoviesconfigurationtext = " "
|
11
|
+
while ! fd.eof?
|
12
|
+
@rwdmoviesconfigurationtext = fd.read
|
13
|
+
end
|
14
|
+
fd.close
|
15
|
+
else
|
16
|
+
@rwdmoviesconfigurationtext = "File error"
|
17
|
+
end
|
18
|
+
rescue SystemCallError, StandardError
|
19
|
+
$stderr.print "system call error: " + $!
|
20
|
+
@rwdmoviesconfigurationtext = "File error"
|
21
|
+
end # exception rescue
|
22
|
+
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# this code is to list the picture names
|
2
2
|
def viewtmppicture
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
fileList = Dir.new($tmpmoviepicture_directory).entries.sort.delete_if { |x| ! (x =~ /jpg$/) }
|
4
|
+
@moviefilelistresult = ""
|
5
|
+
@listpicturesfromtmp = fileList.rwd_method("filltmpmoviespicture")
|
6
6
|
end
|
7
7
|
|
8
8
|
def filltmpmoviespicture(inffile)
|
9
|
-
|
10
|
-
|
9
|
+
applet = inffile.gsub(/\.nam$/, "")
|
10
|
+
@a_tmppicturename = applet
|
11
11
|
end
|
12
12
|
|