rwdtorrent 0.01

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. data/Readme.txt +146 -0
  2. data/bin/rwdtorrent +19 -0
  3. data/code/01rwdcore/01rwdcore.rb +22 -0
  4. data/code/01rwdcore/02helptexthashbegin.rb +4 -0
  5. data/code/01rwdcore/03helptexthash.rb +31 -0
  6. data/code/01rwdcore/04helptextend.rb +6 -0
  7. data/code/01rwdcore/openhelpwindow.rb +31 -0
  8. data/code/01rwdcore/returntomain.rb +10 -0
  9. data/code/01rwdcore/rwdtinkerversion.rb +15 -0
  10. data/code/01rwdcore/rwdwindowreturn.rb +11 -0
  11. data/code/01rwdcore/test_cases.rb +126 -0
  12. data/code/01rwdcore/test_harness.rb +15 -0
  13. data/code/01rwdcore/uploadreturns.rb +62 -0
  14. data/code/superant.com.rwdtinkerbackwindow/controlclient.rb +99 -0
  15. data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +25 -0
  16. data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +61 -0
  17. data/code/superant.com.rwdtinkerbackwindow/installapplet.rb +24 -0
  18. data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +20 -0
  19. data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +19 -0
  20. data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +12 -0
  21. data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +54 -0
  22. data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +11 -0
  23. data/code/superant.com.rwdtinkerbackwindow/listzips.rb +31 -0
  24. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +32 -0
  25. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +13 -0
  26. data/code/superant.com.rwdtinkerbackwindow/network.rb +87 -0
  27. data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +18 -0
  28. data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +42 -0
  29. data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +24 -0
  30. data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +32 -0
  31. data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +12 -0
  32. data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +14 -0
  33. data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +18 -0
  34. data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +21 -0
  35. data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +21 -0
  36. data/code/superant.com.rwdtorrent/helptesthashrwdtorrent.rb +55 -0
  37. data/code/superant.com.rwdtorrent/listnamerecord.rb +15 -0
  38. data/code/superant.com.rwdtorrent/loadconfigurationrecord.rb +36 -0
  39. data/code/superant.com.rwdtorrent/loadconfigurationvariables.rb +13 -0
  40. data/code/superant.com.rwdtorrent/openhelpwindowtorrent.rb +32 -0
  41. data/code/superant.com.rwdtorrent/returntomain.rb +10 -0
  42. data/code/superant.com.rwdtorrent/runtorrentwindow.rb +57 -0
  43. data/code/superant.com.rwdtorrent/rwdtorrenthelpabout.rb +14 -0
  44. data/code/superant.com.rwdtorrent/saveconfigurationrecord.rb +18 -0
  45. data/code/superant.com.rwdtorrent/stoptorrentdownload.rb +12 -0
  46. data/code/superant.com.rwdtorrent/viewtorrentlist.rb +20 -0
  47. data/code/superant.com.rwdtorrent/viewtorrentmetafile.rb +36 -0
  48. data/code/zz0applicationend/zz0end.rb +4 -0
  49. data/configuration/language.dist +7 -0
  50. data/configuration/rwdapplicationidentity.dist +3 -0
  51. data/configuration/rwdtinker.dist +15 -0
  52. data/configuration/rwdtorrent.dist +11 -0
  53. data/configuration/tinkerwin2variables.dist +17 -0
  54. data/downloads/nodownloads.txt +1 -0
  55. data/ev/browser.rb +109 -0
  56. data/ev/ftools.rb +170 -0
  57. data/ev/net.rb +750 -0
  58. data/ev/ruby.rb +819 -0
  59. data/ev/rwd.rb +1849 -0
  60. data/ev/sgml.rb +236 -0
  61. data/ev/thread.rb +63 -0
  62. data/ev/tree.rb +343 -0
  63. data/ev/xml.rb +4 -0
  64. data/extras/aversa.rb +261 -0
  65. data/extras/rconftool.rb +380 -0
  66. data/extras/rubytorrent.rb +94 -0
  67. data/extras/rubytorrent/bencoding.rb +174 -0
  68. data/extras/rubytorrent/controller.rb +610 -0
  69. data/extras/rubytorrent/message.rb +128 -0
  70. data/extras/rubytorrent/metainfo.rb +214 -0
  71. data/extras/rubytorrent/package.rb +600 -0
  72. data/extras/rubytorrent/peer.rb +536 -0
  73. data/extras/rubytorrent/server.rb +166 -0
  74. data/extras/rubytorrent/tracker.rb +225 -0
  75. data/extras/rubytorrent/typedstruct.rb +132 -0
  76. data/extras/rubytorrent/util.rb +186 -0
  77. data/extras/zip/ioextras.rb +114 -0
  78. data/extras/zip/stdrubyext.rb +111 -0
  79. data/extras/zip/tempfile_bugfixed.rb +195 -0
  80. data/extras/zip/zip.rb +1377 -0
  81. data/extras/zip/zipfilesystem.rb +558 -0
  82. data/extras/zip/ziprequire.rb +61 -0
  83. data/gui/00coreguibegin/applicationguitop.rwd +4 -0
  84. data/gui/frontwindow0/10viewnote.rwd +32 -0
  85. data/gui/frontwindow0/30viewtorrent.rwd +13 -0
  86. data/gui/frontwindow0/40rwdtorrentrefresh.rwd +28 -0
  87. data/gui/frontwindow0/67viewconfiguration.rwd +38 -0
  88. data/gui/frontwindowselectionbegin/selectiontabbegin/selectiontabbegin.rwd +16 -0
  89. data/gui/frontwindowselections/superant.com.rwdtinkerwin2selectiontab/rwdwin2selectiontab.rwd +12 -0
  90. data/gui/frontwindowselectionzend/viewselectionzend/viewselectionend.rwd +3 -0
  91. data/gui/frontwindowtdocumentbegin/superant.com.documentsbegin/tt0documentbegin.rwd +6 -0
  92. data/gui/frontwindowtdocuments/superant.com.documents/uu5documents.rwd +15 -0
  93. data/gui/frontwindowtdocuments/superant.com.tinkerwin2documents/uu5documents.rwd +6 -0
  94. data/gui/frontwindowtdocuments/superant.com.torrentdocument/doctorrent.rwd +6 -0
  95. data/gui/frontwindowtdocumentzend/superant.com.documentsend/ww0documentend.rwd +12 -0
  96. data/gui/frontwindowz1end/frontwindowend/xx0rwdfirsttab.rwd +6 -0
  97. data/gui/helpaboutbegin/superant.com.helpaboutbegin/ya0helpscreenstart.rwd +3 -0
  98. data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/1appname.rwd +4 -0
  99. data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/3copyright.rwd +3 -0
  100. data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/5version.rwd +10 -0
  101. data/gui/helpaboutinstalled/superant.com.torrenthelpabout/1appname.rwd +4 -0
  102. data/gui/helpaboutinstalled/superant.com.torrenthelpabout/3copyright.rwd +3 -0
  103. data/gui/helpaboutinstalled/superant.com.torrenthelpabout/5version.rwd +9 -0
  104. data/gui/helpaboutzend/superant.com.helpaboutend/helpscreenend.rwd +3 -0
  105. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/1appname.rwd +5 -0
  106. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +42 -0
  107. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/45installremotezip.rwd +44 -0
  108. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistapplets.rwd +44 -0
  109. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/60editconfiguration.rwd +38 -0
  110. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +29 -0
  111. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/75rwdcontrol.rwd +33 -0
  112. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/80tab1.rwd +11 -0
  113. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/9backend.rwd +6 -0
  114. data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd +31 -0
  115. data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/9end.rwd +4 -0
  116. data/gui/tinkerbackwindows/superant.com.torrentdisplay/torrentdisplaywindow.rwd +31 -0
  117. data/gui/tinkerbackwindows/superant.com.versionwindow/1appname.rwd +19 -0
  118. data/gui/zzcoreguiend/tinkerapplicationguiend/yy9rwdend.rwd +4 -0
  119. data/init.rb +277 -0
  120. data/installed/rwdviewlogo-0.4.inf +4 -0
  121. data/lang/en/rwdcore/languagefile.rb +16 -0
  122. data/lang/es/rwdcore/languagefile-es.rb +14 -0
  123. data/lang/jp/rwdcore/languagefile.rb +9 -0
  124. data/lang/nl/rwdcore/languagefile.rb +19 -0
  125. data/lib/temp.rb +1 -0
  126. data/rwd_files/HowTo_Tinker.txt +405 -0
  127. data/rwd_files/HowTo_TinkerWin2.txt +202 -0
  128. data/rwd_files/HowTo_Torrent.txt +146 -0
  129. data/rwd_files/Readme.txt +57 -0
  130. data/rwd_files/favicon.ico +0 -0
  131. data/rwd_files/rdoc-style.css +175 -0
  132. data/rwd_files/rwdapplications.html +54 -0
  133. data/rwd_files/rwdindex.html +6 -0
  134. data/rwd_files/tinker.png +0 -0
  135. data/rwdconfig.dist +10 -0
  136. data/tests/checkdepends.sh +4 -0
  137. data/tests/cleancnf.sh +5 -0
  138. data/tests/makedist.rb +44 -0
  139. data/tests/rdep.rb +354 -0
  140. data/tests/rwdtinkertestEN.rb +163 -0
  141. data/tests/test.result +32 -0
  142. data/tests/totranslate.lang +93 -0
  143. data/torrentfiles/freeculture-audiobook.zip.torrent +0 -0
  144. data/torrentfiles/freeculture.zip.torrent +0 -0
  145. data/zips/rwdahelloworld-0.5.zip +0 -0
  146. metadata +199 -0
@@ -0,0 +1,13 @@
1
+ # this method loads the on screen variables into the running class
2
+ def loadconfigurationvariables
3
+
4
+ configfiletoload = File.join(ConfigurationDir,TinkerWin2ConfigurationFileName)
5
+ begin
6
+ load configfiletoload
7
+ @extraconfigdatadisplay = ""
8
+ @newconfigurationresult = "Config Variables loaded"
9
+ rescue
10
+ @extraconfigdatadisplay = ""
11
+ @newconfigurationresult = "loading error"
12
+ end
13
+ end
@@ -0,0 +1,87 @@
1
+ #!ruby
2
+ require 'socket' # Network stuff
3
+ require 'timeout' # Timeout functions
4
+
5
+ def network_start
6
+ if RUBY_PLATFORM != "i386-mswin32"
7
+ processone = fork {
8
+ network_demon }
9
+ Process.detach(processone)
10
+
11
+ else
12
+ puts "fork not tried winXP?"
13
+ end
14
+ @viewremotecommandresult = "starting controller on next available port"
15
+ end
16
+
17
+ def network_demon
18
+ # Find configuration variables
19
+ host = "127.0.0.1"
20
+ port = $rwdcontrolports[0].to_i
21
+
22
+ openportfound = false
23
+ until openportfound
24
+
25
+ # Create a socket to listen on and bind it to the host and port
26
+ begin
27
+ @socket = UDPSocket::new()
28
+ @socket.bind(host, port)
29
+ # Rescue the "Address in use" error
30
+ openportfound = true
31
+
32
+ rescue Errno::EADDRINUSE
33
+ puts "controller startup: Port #{port} on host #{host} is already in use."
34
+ port=port+1
35
+ # Rescue the "Address not available' error
36
+ rescue Errno::EADDRNOTAVAIL
37
+ puts "Network plugin: Address #{host} is not available to bind."
38
+ port=port+1
39
+ # Rescue "permission denied errors
40
+ rescue Errno::EACCES
41
+ puts "controller startup: Access denied when binding interface addresses. Did you try to bind a port under 1024 as a regular user?"
42
+ port=port+1
43
+ # Rescue all other errors
44
+ rescue
45
+ puts "Network plugin: An error occured."
46
+ port = port+1
47
+ # Rescue all other errors
48
+ end
49
+
50
+ end
51
+
52
+
53
+ # Get all acceptable hosts
54
+ hosts = ["localhost","vaio-sag"]
55
+ # Do some nice errorchecking
56
+ if(hosts.type != Array)
57
+ puts "Network plugin: No hosts found in networkConfig/acceptHosts. Shutting down plugin."
58
+ return -1 # Return the errorcode for plugin failure
59
+ end
60
+
61
+ # Main loop
62
+ while(true)
63
+ # Get data and client data from the client
64
+ data, info = @socket.recvfrom(256)
65
+
66
+ # Is this an acceptable IP address?
67
+ if(hosts.include?(info[2]) || hosts.include?(info[3]))
68
+ command, parameter = data.split(';')
69
+
70
+ # Command actions
71
+ command.downcase!()
72
+ case command
73
+
74
+ when 'stop'
75
+ @socket.send("hello world",0,info[3],info[1].to_i)
76
+
77
+ when 'query'
78
+ @socket.send("#{$rwdapplicationidentity} on port #{$port}",0,info[3],info[1].to_i)
79
+
80
+
81
+ end # case command
82
+
83
+ end # Access control if
84
+ end # while(true)
85
+
86
+ end # Network::start()
87
+
@@ -0,0 +1,18 @@
1
+ def openappletname
2
+ require 'fileutils'
3
+ nametext = "%s" % [@a_installlist]
4
+
5
+ begin # exception trapped block
6
+ fileName = "installed/" + nametext + ".inf"
7
+
8
+ fd = File.open(fileName,"r")
9
+ @displaytext = " "
10
+ while ! fd.eof?
11
+ @displaytext = fd.read
12
+ end
13
+ fd.close
14
+ rescue
15
+ @displaytext = "\n" + "error"
16
+ end # exception rescue
17
+
18
+ end
@@ -0,0 +1,42 @@
1
+ # this code is to call the help window
2
+ def runhelpwindowtinkerwin2
3
+
4
+ # $helptopicsarray = $helptopicsarray | [""]
5
+
6
+ $help_topic = "tinkerwin2_help"
7
+ if @rwd_tab == "rwdzipslister"
8
+ $help_topic = "tinkerwin2_help"
9
+ end
10
+
11
+ if @rwd_tab == "filelister"
12
+ $help_topic = "applet_viewing"
13
+
14
+ end
15
+ if @rwd_tab == "zipslister"
16
+ $help_topic = "applet_installation"
17
+
18
+ end
19
+ if @rwd_tab == "editconfigurationfile"
20
+ $help_topic = "applet_tinkerbackeditconfiguration"
21
+
22
+ end
23
+ if @rwd_tab == "rwdremotecontrol"
24
+ $help_topic = "remote_control"
25
+
26
+ end
27
+ if @rwd_tab == "superantcomremotezipsinstall"
28
+ $help_topic = "remotegemapplet_install"
29
+ end
30
+
31
+
32
+ if @rwd_window != "rwdtinkerhelpwindow"
33
+ $previouswindow = @rwd_window
34
+ $previoustab = @rwd_tab
35
+ else
36
+ $previouswindow = @rwd_window
37
+ $previoustab = @rwd_tab
38
+ end
39
+ runhelpwindow
40
+ end
41
+
42
+
@@ -0,0 +1,24 @@
1
+ # This tinker method is to retrieve the list of rwdzip applets available to install from the remote repository
2
+
3
+ def superantcomremotegemlist
4
+ gemcommandoption = "search --remote "
5
+ gemfilename = "rwdzip"
6
+ commandtext = "gem search --remote rwdzip"
7
+ commandtemp = $xpcommand + commandtext
8
+ begin # exception trapped block
9
+
10
+ tempremotegemappletsresult = `#{commandtemp} 2>&1`
11
+ @superantcomremotegemappletsfullresult = tempremotegemappletsresult
12
+ fileList = tempremotegemappletsresult.split(/\n/).delete_if { |x| ! (x =~ /\Arwdzip/) }
13
+
14
+ @superantcomremotegemappletsresult = fileList.rwd_method("superantcomremotegemappletdirsname")
15
+ rescue SystemCallError, StandardError
16
+ @superantcomremotegemappletsresult = "system call error: " + $!
17
+ end # exception rescue
18
+ end
19
+
20
+ def superantcomremotegemappletdirsname(inffile)
21
+ applet = inffile
22
+ @superantcominstallremoteappletinput = applet
23
+
24
+ end
@@ -0,0 +1,32 @@
1
+ def removeapplet
2
+ require 'fileutils'
3
+ nametext = "%s" % [@a_removeapplet]
4
+
5
+ begin # exception trapped block
6
+ fileName = "installed/" + nametext + ".inf"
7
+ count = 0
8
+ fd = File.open(fileName,"r")
9
+
10
+
11
+ fd.each { |oneline|
12
+ if count == 1
13
+ if File.exist?(oneline.chop)
14
+ FileUtils.rm_rf( oneline.chop)
15
+ end
16
+
17
+ end
18
+ count = 1
19
+ }
20
+ fd.close
21
+
22
+ FileUtils.rm_rf( fileName)
23
+
24
+
25
+ @removeapplettext = "applet files removed! - restart rwd to finish uninstalling"
26
+
27
+ rescue
28
+ @removeapplettext = "\n" + "error"
29
+
30
+ end # exception rescue
31
+
32
+ end
@@ -0,0 +1,12 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
2
+ # This application is a framework for writing programs from RubyWebDialogs
3
+ # http://www.erikveen.dds.nl/rubywebdialogs/index.html
4
+ # For more information about RwdTinker see http://www.rubyforge.net/projects/rwdapplications
5
+
6
+ # call the rwdtinker helpwindow
7
+
8
+ def runrwdtinkerbackwindow
9
+ @rwd_window = "tinkerbackwindow"
10
+ @rwd_tab = "rwdzipslister"
11
+ end
12
+
@@ -0,0 +1,14 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
2
+ # This application is a framework for writing programs from RubyWebDialogs
3
+ # http://www.erikveen.dds.nl/rubywebdialogs/index.html
4
+ # For more information about RwdTinker see http://www.rubyforge.net/projects/rwdapplications
5
+
6
+ # return the version constant defined in the config file
7
+ def runrwdtinkerwin2version
8
+ @rwd_window = "applicationversion"
9
+ @versionappnamedisplay = "RwdTinkerWin2"
10
+ @versioncopyrightdisplay = "(c) 2004 Steven Gibson "
11
+ @versionnumberdisplay = "Version " + RwdTinkerWin2Version
12
+
13
+ end
14
+
@@ -0,0 +1,18 @@
1
+ # this method saves the configuration record
2
+ def saveconfigurationrecord
3
+ require 'fileutils'
4
+ if @a_configurationfilename
5
+ newname = "%s" % [@a_configurationfilename] # grab the filename to create
6
+ newdata =@a_configline1.to_s + "\n" + @a_configline2.to_s + "\n" + @a_configline3.to_s + "\n" + @a_configline4.to_s + "\n" + @a_configline5.to_s + "\n" + @a_configline6.to_s + "\n" + @a_configline7.to_s + "\n" + @a_configline8.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
+ @newconfigurationresult=newdata # show the record info in the browser
14
+ rescue SystemCallError, StandardError
15
+ $stderr.print "system call error: " + $!
16
+ end # exception rescue
17
+ end
18
+ end
@@ -0,0 +1,21 @@
1
+ def viewappletcontents
2
+ require 'fileutils'
3
+ require 'extras/zip/zip'
4
+ nametext = "%s" % [@a_installapplet]
5
+
6
+ begin # exception trapped block
7
+ fullname = nametext + ".zip"
8
+ fileName = File.join($zipslocation,fullname)
9
+ tempfilecontents = " "
10
+ zf = Zip::ZipFile.new(fileName)
11
+ zf.sort.each {
12
+ |entry|
13
+ tempfilecontents = tempfilecontents + entry.to_s + "\n"
14
+ }
15
+ @appletcontentstext = tempfilecontents
16
+
17
+ rescue
18
+ @installapplettext = "unzip error - error opening applet"
19
+ end # exception rescue
20
+
21
+ end
@@ -0,0 +1,21 @@
1
+ def viewgemappletcontents
2
+ require 'fileutils'
3
+ require 'extras/zip/zip'
4
+ nametext = "%s" % [@a_installapplet]
5
+
6
+ begin # exception trapped block
7
+ fullname = nametext + ".zip"
8
+
9
+ tempfilecontents = " "
10
+ zf = Zip::ZipFile.new(fullname)
11
+ zf.sort.each {
12
+ |entry|
13
+ tempfilecontents = tempfilecontents + entry.to_s + "\n"
14
+ }
15
+ @appletcontentstext = tempfilecontents
16
+
17
+ rescue
18
+ @installapplettext = "unzip error - error opening applet"
19
+ end # exception rescue
20
+
21
+ end
@@ -0,0 +1,55 @@
1
+
2
+
3
+ Helptext.update( :rwdtorrent_generalhelp => "This program is torrent download GUI
4
+
5
+ You can select a torrent file in the torrentfile directory and download it
6
+
7
+ There are tabs to view file sizes and edit configurations
8
+
9
+ 'View Torrent Metafiles' - to view and select torrent files before downloading
10
+
11
+ 'View Torrent' - to view file size of downloaded file
12
+
13
+ 'Torrent Download Display' the tab to start a download and open the torrent download window
14
+
15
+ 'Edit Configuration' - to change the configuration of rwdtorrent
16
+
17
+ .",
18
+ :torrent_help => "You can view torrent metafile details
19
+ click the bottom button 'list torrent lists' to see a list
20
+ of the torrent metafiles in the torrent directory.
21
+ click on a file name with the mouse to select it.
22
+
23
+ after a file name is selected you can click 'View local Torrent Detail'
24
+ This will show the torrent detail on the same screen
25
+
26
+ You can also enter a http address with a torrent
27
+ Click on the 'View http Torrent Detail' to see the detail
28
+ of a http torrent address
29
+
30
+ You can change the address of the torrent metafile directory in the
31
+ rwdtorrent.cnf file",
32
+ :torrentsize_help => "You can see the size of downloaded files
33
+ Click 'View Torrent List'
34
+
35
+ You can change the location of the torrent download directory in the
36
+ rwdtorrent.cnf file
37
+ ",
38
+ :torrentrefresh_help => "This is the screen to download a torrent
39
+ once a filename is selected click on 'Start local Download'
40
+
41
+ This should open another window with download information
42
+ Each 10 seconds the window should refresh.
43
+
44
+ click the stop button in the refresh window to reset for another download",
45
+
46
+ :rwdtorrent_configuration => " click on 'Edit Configuration'
47
+ You can view the configuration file
48
+
49
+ You can edit the configuration
50
+
51
+ Remember to reload the configuration variables if you want your
52
+ changes used.
53
+ "
54
+
55
+ )
@@ -0,0 +1,15 @@
1
+ # this code is to list the file data
2
+ def listtorrentrecordfiles
3
+ if File.exist?($rwdtorrentfilesdir)
4
+ fileList = Dir.new($rwdtorrentfilesdir).entries.sort.delete_if { |x| ! (x =~ /torrent$/) }
5
+
6
+ @torrentrecordsresult = fileList.rwd_method("filltorrentrecordname")
7
+ end
8
+ end
9
+
10
+ # this method is to help fill in list of names
11
+ def filltorrentrecordname(inffile)
12
+ applet = inffile.gsub(/\.torrent$/, "")
13
+ @a_viewtorrent = applet
14
+ end
15
+
@@ -0,0 +1,36 @@
1
+ # this method puts the configuration rexord on the screen
2
+ def loadrwdtorrentconfiguration
3
+
4
+ require 'fileutils'
5
+
6
+ @a_torrentconfigurationfilename = "rwdtorrent.cnf"
7
+
8
+
9
+ begin # exception trapped block
10
+
11
+ Dir.chdir($progdir)
12
+ fileName = File.join(ConfigurationDir, "rwdtorrent.cnf")
13
+
14
+
15
+ fd = File.open(fileName,"r")
16
+ @a_torrentconfigline1= fd.readline.chomp
17
+ @a_torrentconfigline2 = fd.readline.chomp
18
+ @a_torrentconfigline3 = fd.readline.chomp
19
+ @a_torrentconfigline4 = fd.readline.chomp
20
+ @a_torrentconfigline5 = fd.readline.chomp
21
+ @a_torrentconfigline6 = fd.readline.chomp
22
+ @a_torrentconfigline7 =fd.readline.chomp
23
+ @a_torrentconfigline8 = fd.readline.chomp
24
+ @a_torrentconfigline9 = fd.readline.chomp
25
+ @a_torrentconfigline10 = fd.readline.chomp
26
+ @a_torrentconfigline11 = fd.readline.chomp
27
+
28
+ while ! fd.eof?
29
+ @extratorrentconfigdatadisplay = fd.readline
30
+ end
31
+ fd.close
32
+ rescue SystemCallError, StandardError
33
+ $stderr.print "system call error: " + $!
34
+ end # exception rescue
35
+
36
+ end
@@ -0,0 +1,13 @@
1
+ # this method loads the on screen variables into the running class
2
+ def loadrwdtorrentconfigurationvariables
3
+
4
+ configfiletoload = File.join(ConfigurationDir,"rwdtorrent.cnf")
5
+ begin
6
+ load configfiletoload
7
+ @extratorrentconfigdatadisplay = ""
8
+ @newtorrentconfigurationresult = "Config Variables loaded"
9
+ rescue
10
+ @extratorrentconfigdatadisplay = ""
11
+ @newtorrentconfigurationresult = "loading error"
12
+ end
13
+ end