rwdtorrent 0.03 → 0.04

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. data/code/01rwdcore/01rwdcore.rb +3 -0
  2. data/code/01rwdcore/runopentinkerdocument.rb +7 -0
  3. data/code/01rwdcore/rwdtinkerversion.rb +11 -3
  4. data/code/01rwdcore/setuphelpaboutoptions.rb +13 -0
  5. data/code/01rwdcore/setuptinkerdocuments.rb +6 -0
  6. data/code/01rwdcore/test_harness.rb +2 -2
  7. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +6 -0
  8. data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +5 -2
  9. data/code/superant.com.rwdtorrent/loadconfigurationrecord.rb +2 -14
  10. data/code/superant.com.rwdtorrent/runtorrentwindow.rb +15 -5
  11. data/code/superant.com.rwdtorrent/rwdtorrenthelpabout.rb +2 -5
  12. data/code/superant.com.rwdtorrent/saveconfigurationrecord.rb +1 -1
  13. data/code/superant.com.rwdtorrent/viewtorrentmetafile.rb +54 -24
  14. data/configuration/rwdapplicationidentity.dist +1 -1
  15. data/configuration/rwdtinker.dist +7 -2
  16. data/configuration/rwdtorrent.dist +5 -2
  17. data/configuration/rwdtorrenthelpabout.rb +14 -0
  18. data/gui/00coreguibegin/applicationguitop.rwd +1 -1
  19. data/gui/frontwindow0/superant.com.rwdtorrent/67viewconfiguration.rwd +2 -10
  20. data/gui/frontwindowtdocuments/superant.com.documents/tinkerdocuments.rwd +14 -0
  21. data/gui/helpaboutbegin/superant.com.helpaboutbegin/zzdocumentend.rwd +8 -0
  22. data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/helpabouttab.rwd +15 -0
  23. data/gui/helpaboutzend/superant.com.helpaboutend/zhelpscreenstart2.rwd +3 -0
  24. data/gui/helpaboutzend/superant.com.helpaboutend/zzzzhelpabout2.rwd +15 -0
  25. data/gui/helpaboutzend/superant.com.helpaboutend/zzzzhelpscreen2end.rwd +3 -0
  26. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/60editconfiguration.rwd +7 -1
  27. data/gui/tinkerbackwindows/superant.com.versionwindow/1appname.rwd +1 -1
  28. data/gui/tinkerbackwindows/superant.com.versionwindow/helpaboutwindow.rwd +17 -0
  29. data/rwd_files/HowTo_Tinker.txt +6 -0
  30. data/rwd_files/HowTo_Torrent.txt +8 -0
  31. data/rwdconfig.dist +7 -2
  32. data/tests/makedist.rb +1 -0
  33. metadata +19 -24
  34. data/extras/aversa.rb +0 -261
  35. data/gui/frontwindowtdocuments/superant.com.documents/uu5documents.rwd +0 -15
  36. data/gui/frontwindowtdocuments/superant.com.tinkerwin2documents/uu5documents.rwd +0 -6
  37. data/gui/frontwindowtdocuments/superant.com.torrentdocument/doctorrent.rwd +0 -6
  38. data/gui/frontwindowtdocumentzend/superant.com.documentsend/ww0documentend.rwd +0 -12
  39. data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/1appname.rwd +0 -4
  40. data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/3copyright.rwd +0 -3
  41. data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/5version.rwd +0 -10
  42. data/gui/helpaboutinstalled/superant.com.torrenthelpabout/1appname.rwd +0 -4
  43. data/gui/helpaboutinstalled/superant.com.torrenthelpabout/3copyright.rwd +0 -3
  44. data/gui/helpaboutinstalled/superant.com.torrenthelpabout/5version.rwd +0 -9
  45. /data/gui/frontwindowselectionbegin/selectiontabbegin/{selectiontabbegin.rwd → 00selectiontabbegin.rwd} +0 -0
  46. /data/gui/frontwindowselectionzend/viewselectionzend/{viewselectionend.rwd → wwselectionend.rwd} +0 -0
  47. /data/gui/{frontwindowtdocumentbegin/superant.com.documentsbegin/tt0documentbegin.rwd → frontwindowselectionzend/viewselectionzend/zzdocumentbegin.rwd} +0 -0
  48. /data/gui/{frontwindowz1end/frontwindowend/xx0rwdfirsttab.rwd → helpaboutbegin/superant.com.helpaboutbegin/zzzrwdlasttab.rwd} +0 -0
  49. /data/gui/helpaboutbegin/superant.com.helpaboutbegin/{ya0helpscreenstart.rwd → zzzzhelpscreenstart.rwd} +0 -0
  50. /data/rwd_files/{rwdindex.html → RubyWebDialogs.html} +0 -0
@@ -14,6 +14,9 @@ class RwdTinker < RWDialog
14
14
 
15
15
  rwdtest_harness
16
16
  end
17
+ showjumplinkoptions
18
+ setuptinkerdocuments
19
+ setuphelpaboutoptionspassive
17
20
  end
18
21
 
19
22
  def inspect
@@ -0,0 +1,7 @@
1
+ # open document for rwdtinker application
2
+ def runopentinkerdocument
3
+
4
+ tinkerdocumenturl = "http://localhost:7705/" + @a_tinkerdocumentinput
5
+ Thread.new( tinkerdocumenturl){ |t| `#{Browser_Exe} #{tinkerdocumenturl}` }
6
+ end
7
+
@@ -3,11 +3,19 @@
3
3
  # For information see http://www.rubyforge.net/projects/rwdapplications
4
4
 
5
5
  # return the version constant defined in the config file
6
+ def tinkerhelpaboutsetup
7
+ return ["RwdTinker","(c) 2004 Steven Gibson ","Version #{RwdTinkerVersion}"]
8
+ end
9
+
6
10
  def runrwdtinkerversion
7
11
  @rwd_window = "applicationversion"
8
- @versionappnamedisplay = "RwdTinker"
9
- @versioncopyrightdisplay = "(c) 2004 Steven Gibson "
10
- @versionnumberdisplay = "Version " + RwdTinkerVersion
12
+ helpaboutinput = @a_helpaboutinput.downcase
13
+ versionarraysetup = "#{helpaboutinput}helpaboutsetup"
14
+ versionarray= self.send(versionarraysetup)
15
+
16
+ @versionappnamedisplay = versionarray[0].to_s
17
+ @versioncopyrightdisplay = versionarray[1].to_s
18
+ @versionnumberdisplay = versionarray[2].to_s
11
19
 
12
20
  end
13
21
 
@@ -0,0 +1,13 @@
1
+ # help about option setup for rwdtinker application
2
+ def setuphelpaboutoptions
3
+
4
+ @rwd_window = "tinkerhelpabout"
5
+ @helpaboutoptions = $tinkerhelpaboutarray.rwd_options
6
+ end
7
+
8
+ def setuphelpaboutoptionspassive
9
+
10
+
11
+ @helpaboutoptions = $tinkerhelpaboutarray.rwd_options
12
+ end
13
+
@@ -0,0 +1,6 @@
1
+ # Bind document names to rwdtinker document tab
2
+ def setuptinkerdocuments
3
+
4
+ @tinkerdocumentsarray = $tinkerdocumentsarray.rwd_options
5
+ end
6
+
@@ -1,8 +1,8 @@
1
1
  # this to start the test harness
2
2
  def rwdtest_harness
3
3
 
4
- print "in test harness, tests to perform:\n"
5
- puts $testharnessarray
4
+ print "in test harness\n"
5
+
6
6
  $testharnessarray.each { |x|
7
7
  print "calling #{x}\n"
8
8
  eval("#{x}")
@@ -20,6 +20,12 @@ def loadconfigurationrecord
20
20
  @a_configline6 = fd.readline.chomp
21
21
  @a_configline7 =fd.readline.chomp
22
22
  @a_configline8 = fd.readline.chomp
23
+ @a_configline9 = fd.readline.chomp
24
+ @a_configline10 = fd.readline.chomp
25
+ @a_configline11 =fd.readline.chomp
26
+ @a_configline12 = fd.readline.chomp
27
+ @a_configline13 =fd.readline.chomp
28
+ @a_configline14 = fd.readline.chomp
23
29
 
24
30
  while ! fd.eof?
25
31
  @extraconfigdatadisplay = fd.readline
@@ -3,9 +3,12 @@ def saveconfigurationrecord
3
3
  require 'fileutils'
4
4
  if @a_configurationfilename
5
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"
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 +
7
+ "\n" + @a_configline6.to_s + "\n" + @a_configline7.to_s + "\n" + @a_configline8.to_s + "\n" +
8
+ @a_configline9.to_s + "\n" + @a_configline10.to_s + "\n" + @a_configline11.to_s + "\n" +
9
+ @a_configline12.to_s + "\n" + @a_configline13.to_s + "\n" + @a_configline14.to_s + "\n"
7
10
 
8
- begin # exception trapped block
11
+ begin # exception trapped block
9
12
  fileName = File.join( ConfigurationDir, newname )
10
13
  fd = File.open(fileName,"w")
11
14
  fd.print(newdata) # save the record info to the file
@@ -13,21 +13,9 @@
13
13
 
14
14
 
15
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
16
+ @a_torrentconfiglines= fd.read
27
17
 
28
- while ! fd.eof?
29
- @extratorrentconfigdatadisplay = fd.readline
30
- end
18
+
31
19
  fd.close
32
20
  rescue SystemCallError, StandardError
33
21
  $stderr.print "system call error: " + $!
@@ -79,17 +79,18 @@ def rwdtorrentwindowtwo
79
79
  #exit
80
80
  end
81
81
 
82
- unless dest.nil?
82
+ unless dest.nil? or mi.nil?
83
83
  if FileTest.directory?(dest) && mi.info.single?
84
84
  dest = File.join(dest, mi.info.name)
85
85
  elsif FileTest.file?(dest) && mi.info.multiple?
86
86
  die %{Error: .torrent contains multiple files, but "#{dest}" is a single file (must be a directory)}
87
87
  end
88
- end
88
+
89
89
  begin
90
90
  display_status = "checking file on disk..."
91
91
  # @display_det = File.expand_path(dest || mi.info.name) + (mi.single? ? "" : "/")
92
- if mi.single?
92
+
93
+ if mi.single?
93
94
  display_fn = "#{mi.info.name} (#{mi.info.length} in one file)"
94
95
  else
95
96
  display_fn = "#{mi.info.name}/ (#{mi.info.total_length} in #{mi.info.files.length} files)"
@@ -130,10 +131,14 @@ def rwdtorrentwindowtwo
130
131
 
131
132
 
132
133
 
133
-
134
+ end # unless
134
135
 
135
136
  end # end of initial block - should only run once per download
136
-
137
+ begin
138
+ if $bt.nil?
139
+ @rwd_window = "main"
140
+ @rwd_tab = "rwdtorrentrefresh"
141
+ else
137
142
  if display_tracker.nil?
138
143
  display_tracker = "not connected"
139
144
  end
@@ -242,6 +247,11 @@ end
242
247
  # rescue SystemCallError, StandardError, Exception
243
248
  # $stderr.print "system call error: " + $!
244
249
  #end # exception rescue
250
+ end # if bt not nil
251
+ rescue NoMethodError, Exception
252
+ $stderr.print "error: " + $!
253
+ @a_torrentdata = $!
254
+ end # exception
245
255
 
246
256
  end
247
257
 
@@ -4,11 +4,8 @@
4
4
  # For more information about RwdTinker see http://www.rubyforge.net/projects/rwdapplications
5
5
 
6
6
  # return the version constant defined in the config file
7
- def runrwdtorrentversion
8
- @rwd_window = "applicationversion"
9
- @versionappnamedisplay = "RwdTorrent"
10
- @versioncopyrightdisplay = "(c) 2005 Steven Gibson "
11
- @versionnumberdisplay = "Version " + RwdTorrentVersion
7
+ def rwdtorrenthelpaboutsetup
8
+ return ["RwdTorrent", "(c) 2005 Steven Gibson ", "Version #{RwdTorrentVersion}"]
12
9
 
13
10
  end
14
11
 
@@ -3,7 +3,7 @@
3
3
  require 'fileutils'
4
4
 
5
5
  newname = "rwdtorrent.cnf" # grab the filename to create
6
- newdata =@a_torrentconfigline1.to_s + "\n" + @a_torrentconfigline2.to_s + "\n" + @a_torrentconfigline3.to_s + "\n" + @a_torrentconfigline4.to_s + "\n" + @a_torrentconfigline5.to_s + "\n" + @a_torrentconfigline6.to_s + "\n" + @a_torrentconfigline7.to_s + "\n" + @a_torrentconfigline8.to_s + "\n" + @a_torrentconfigline9.to_s + "\n"+ @a_torrentconfigline10.to_s + "\n"+ @a_torrentconfigline11.to_s + "\n"+ @a_torrentconfigline9.to_s + "\n"
6
+ newdata =@a_torrentconfiglines.to_s
7
7
 
8
8
  begin # exception trapped block
9
9
  fileName = File.join( ConfigurationDir, newname )
@@ -1,34 +1,64 @@
1
-
2
-
1
+ # show torrent metafile details on screen
2
+ require 'extras/rubytorrent'
3
3
  def viewtorrentfile
4
-
5
- commandtext = "ruby extras/aversa.rb --decode " + $rwdtorrentfilesdir + "/" + @a_viewtorrent.to_s + ".torrent "
6
-
4
+
5
+ if ! @a_viewtorrent.to_s.empty?
6
+ torrentfile = $progdir + "/" + $rwdtorrentfilesdir + "/" + @a_viewtorrent.to_s + ".torrent"
7
7
  begin # exception trapped block
8
-
9
-
10
- @a_torrentdata =`#{commandtext}`
11
-
12
- rescue SystemCallError, StandardError
13
- $stderr.print "system call error: " + $!
8
+ @a_torrentdata = dump_metainfo(RubyTorrent::MetaInfo.from_location(torrentfile))
9
+ rescue SystemCallError, StandardError, RubyTorrent::MetaInfoFormatError, RubyTorrent::BEncodingError => e
10
+ $stderr.print "system call error: " + $!
11
+ @a_torrentdata = $!
12
+ rescue Timeout::Error, Exception
13
+ $stderr.print "error: " + $!
14
+ @a_torrentdata = $!
14
15
  end # exception rescue
15
-
16
+ end
16
17
  end
17
- def viewtorrentfilehttp
18
-
19
- commandtext = "ruby extras/aversa.rb --decode " + @a_viewtorrenthttp.to_s
20
18
 
21
- begin # exception trapped block
22
-
23
-
24
- print commandtext
25
- @a_torrentdata =`#{commandtext}`
26
-
27
- rescue SystemCallError, StandardError
19
+ def viewtorrentfilehttp
20
+ require 'extras/rubytorrent'
21
+ if ! @a_viewtorrenthttp.to_s.empty?
22
+ torrentfile = @a_viewtorrenthttp.to_s + ".torrent"
23
+ begin # exception trapped block
24
+ @a_torrentdata = dump_metainfo(RubyTorrent::MetaInfo.from_location(torrentfile))
25
+ rescue SystemCallError, StandardError, RubyTorrent::MetaInfoFormatError, RubyTorrent::BEncodingError,OpenURI::HTTPError => e
28
26
  $stderr.print "system call error: " + $!
29
- end # exception rescue
30
-
27
+ @a_torrentdata = $!
28
+ rescue Timeout::Error, Exception
29
+ $stderr.print "error: " + $!
30
+ @a_torrentdata = $!
31
+ end # exception
32
+ end
31
33
  end
32
34
 
33
35
 
36
+ def dump_metainfoinfo(mii)
37
+ if mii.single?
38
+ <<EOS
39
+ length: #{mii.length / 1024}kb
40
+ filename: #{mii.name}
41
+ EOS
42
+ else
43
+ mii.files.map do |f|
44
+ <<EOS
45
+ - filename: #{File.join(mii.name, f.path)}
46
+ length: #{f.length}
47
+ EOS
48
+ end.join + "\n"
49
+ end + <<EOS
50
+ piece length: #{mii.piece_length / 1024}kb
51
+ pieces: #{mii.pieces.length / 20}
52
+ EOS
53
+ end
34
54
 
55
+ def dump_metainfo(mi)
56
+ <<EOS
57
+ #{dump_metainfoinfo(mi.info).chomp}
58
+ announce: #{mi.announce}
59
+ announce-list: #{(mi.announce_list.nil? ? "<not specified>" : mi.announce_list.map { |x| x.join(', ') }.join('; '))}
60
+ creation date: #{mi.creation_date || "<not specified>"}
61
+ created by: #{mi.created_by || "<not specified>"}
62
+ comment: #{mi.comment || "<not specified>"}
63
+ EOS
64
+ end
@@ -1,3 +1,3 @@
1
1
  ##VERSION:1.63
2
- $rwdapplicationidentity = "rwdtorrent download client"
2
+ $rwdapplicationidentity = "rwdtinker main application"
3
3
 
@@ -1,4 +1,4 @@
1
- ##VERSION:1.64
1
+ ##VERSION:1.65
2
2
  ConfigurationDir = "configuration" # for use in program - init.rb has this value without using this constant
3
3
  CodeName = "rwdtinker"
4
4
  CodeNameFile = CodeName + ".rb"
@@ -12,4 +12,9 @@ LangDir = "lang"
12
12
  $rwdcontrolports =["13713","13714","13715","13716","13717","13718"]
13
13
  $port = 7705
14
14
  $rwdjumplink = ["helpscreen","tinkerbackwindow","returntomain","opendocuments","editconfiguration"]
15
- RwdTinkerVersion = "1.64"
15
+ $tinkerhelpaboutarray = ["Tinker"]
16
+ Browser_Exe = 'mozilla '
17
+ $tinkerdocumentsarray =["COPYING","HowTo_Tinker.txt","rwdapplications.html","RubyWebDialogs.html"]
18
+ RwdTinkerVersion = "1.65"
19
+
20
+
@@ -1,4 +1,4 @@
1
- ##VERSION:0.03
1
+ ##VERSION:0.04
2
2
  ##NAME:$rwdtorrentfilesdir:0
3
3
  $rwdtorrentfilesdir="torrentfiles"
4
4
  ##NAME:$rwdtorrentdownloads:0
@@ -11,5 +11,8 @@ TorrentListCmd="ls -s -1 -h -R "
11
11
  TorrentRootDir=$progdir + "/"
12
12
  ##NAME:$testharnessarray:0
13
13
  $testharnessarray += ["rwdtorrent_all_tests"]
14
- RwdTorrentVersion = "0.03"
14
+ $tinkerdocumentsarray += ["HowTo_Torrent.txt"]
15
+ $tinkerhelpaboutarray += ["RwdTorrent"]
16
+ RwdTorrentVersion = "0.04"
15
17
 
18
+
@@ -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 runrwdtorrentversion
8
+ @rwd_window = "applicationversion"
9
+ @versionappnamedisplay = "RwdTorrent"
10
+ @versioncopyrightdisplay = "(c) 2005 Steven Gibson "
11
+ @versionnumberdisplay = "Version " + RwdTorrentVersion
12
+
13
+ end
14
+
@@ -1,4 +1,4 @@
1
1
  $rwdguivar=
2
2
  "<application>
3
- <window name=\"main\" title=\"RwdTorrent - RubyWebDialogs\">
3
+ <window name=\"main\" title=\"Tinker - RubyWebDialogs\">
4
4
  <tabs>"
@@ -17,16 +17,8 @@ $rwdguivar=
17
17
  <table>
18
18
 
19
19
  <row> <p align=\"right\">FileName:</p> <text name=\"a_torrentconfigurationfilename\"/> </row>
20
- <row> <p align=\"right\">1:</p> <text size=70 name=\"a_torrentconfigline1\"/> </row>
21
- <row> <p align=\"right\">2:</p> <text size=70 name=\"a_torrentconfigline2\"/> </row>
22
- <row> <p align=\"right\">3:</p> <text size=70 name=\"a_torrentconfigline3\"/> </row>
23
- <row> <p align=\"right\">4:</p> <text size=70 name=\"a_torrentconfigline4\"/> </row>
24
- <row> <p align=\"right\">5:</p> <text size=70 name=\"a_torrentconfigline5\"/> </row>
25
- <row> <p align=\"right\">6:</p> <text size=70 name=\"a_torrentconfigline6\"/> </row>
26
- <row> <p align=\"right\">7:</p> <text size=70 name=\"a_torrentconfigline7\"/> </row>
27
- <row> <p align=\"right\">8:</p> <text size=70 name=\"a_torrentconfigline8\"/> </row>
28
- <row> <p align=\"right\">9:</p> <text size=70 name=\"a_torrentconfigline9\"/> </row>
29
-
20
+ </p> <textarea name=\"a_torrentconfiglines\"/>
21
+
30
22
  </table>
31
23
  <p>%extratorrentconfigdatadisplay%</p>
32
24
  <p>
@@ -0,0 +1,14 @@
1
+ $rwdguivar=
2
+ "
3
+ <horizontal>
4
+ <button caption=\"Show Documents List\" action=\"setuptinkerdocuments\"/>
5
+
6
+ </horizontal>
7
+ <table>
8
+ <select name=\"a_tinkerdocumentinput\"> %%tinkerdocumentsarray%% </select>
9
+
10
+ </table>
11
+ <horizontal>
12
+ <button caption=\"Open Document\" action=\"runopentinkerdocument\"/>
13
+ </horizontal>
14
+ "
@@ -0,0 +1,8 @@
1
+ $rwdguivar=
2
+ "
3
+ <horizontal>
4
+ <button caption=\"Help\" action=\"runhelpwindow\"/>
5
+
6
+ </horizontal>
7
+ </tab>"
8
+
@@ -0,0 +1,15 @@
1
+ $rwdguivar=
2
+ "
3
+ <horizontal>
4
+ <button caption=\"Show Help About Links\" action=\"setuphelpaboutoptions\"/>
5
+
6
+ </horizontal>
7
+ <table>
8
+ <select name=\"a_helpaboutinput\"> %%helpaboutoptions%% </select>
9
+
10
+ </table>
11
+
12
+ <horizontal>
13
+ <button caption=\"Open Selected Help About\" action=\"runrwdtinkerversion\"/>
14
+ </horizontal>
15
+ "
@@ -0,0 +1,3 @@
1
+ $rwdguivar=
2
+ "
3
+ <helpwindow name=\"tinkerbackwindow\" title=\"Help About\">"
@@ -0,0 +1,15 @@
1
+ $rwdguivar=
2
+ "
3
+ <horizontal>
4
+ <button caption=\"Show Help About Links\" action=\"setuphelpaboutoptions\"/>
5
+
6
+ </horizontal>
7
+ <table>
8
+ <select name=\"a_helpaboutinput\"> %%helpaboutoptions%% </select>
9
+
10
+ </table>
11
+
12
+ <horizontal>
13
+ <button caption=\"Open Selected Help About\" action=\"runrwdtinkerversion\"/>
14
+ </horizontal>
15
+ "
@@ -0,0 +1,3 @@
1
+ $rwdguivar=
2
+ "
3
+ </helpwindow>"
@@ -25,7 +25,13 @@ $rwdguivar=
25
25
  <row> <p align=\"right\">6:</p> <text size=70 name=\"a_configline6\"/> </row>
26
26
  <row> <p align=\"right\">7:</p> <text size=70 name=\"a_configline7\"/> </row>
27
27
  <row> <p align=\"right\">8:</p> <text size=70 name=\"a_configline8\"/> </row>
28
-
28
+ <row> <p align=\"right\">9:</p> <text size=70 name=\"a_configline9\"/> </row>
29
+ <row> <p align=\"right\">10:</p> <text size=70 name=\"a_configline10\"/> </row>
30
+ <row> <p align=\"right\">11:</p> <text size=70 name=\"a_configline11\"/> </row>
31
+ <row> <p align=\"right\">12:</p> <text size=70 name=\"a_configline12\"/> </row>
32
+ <row> <p align=\"right\">13:</p> <text size=70 name=\"a_configline13\"/> </row>
33
+ <row> <p align=\"right\">14:</p> <text size=70 name=\"a_configline14\"/> </row>
34
+
29
35
 
30
36
  </table>
31
37
  <p>%extraconfigdatadisplay%</p>
@@ -11,7 +11,7 @@ $rwdguivar=
11
11
  <p>%versionnumberdisplay%</p>
12
12
 
13
13
  <horizontal>
14
- <cancel/>
14
+ <button caption=Return action=returntomain/>
15
15
  </horizontal>
16
16
 
17
17
  </window>"
@@ -0,0 +1,17 @@
1
+ $rwdguivar=
2
+ "
3
+ <window name=tinkerhelpabout title=\"Help About Window\">
4
+ <horizontal>
5
+ <button caption=\"Show Help About Links\" action=\"setuphelpaboutoptions\"/>
6
+
7
+ </horizontal>
8
+ <table>
9
+ <select name=\"a_helpaboutinput\"> %%helpaboutoptions%% </select>
10
+
11
+ </table>
12
+
13
+ <horizontal>
14
+ <button caption=\"Open Selected Help About\" action=\"runrwdtinkerversion\"/>
15
+ </horizontal>
16
+ </window>
17
+ "
@@ -227,6 +227,12 @@ http://www.erikveen.dds.nl/rubywebdialogs/index.html
227
227
  Thanks, Steven Gibson
228
228
 
229
229
  == Changelog
230
+ Version 1.65
231
+ Changed documents listing screen - now using hash
232
+ Changed helpabout screen - now using hash
233
+ added more lines for config edit
234
+ added help about to back window
235
+
230
236
  Version 1.64
231
237
  fixed jump with no location
232
238
 
@@ -132,6 +132,14 @@ http://www.erikveen.dds.nl/rubywebdialogs/index.html
132
132
  Thanks, Steven Gibson
133
133
 
134
134
  == Changelog
135
+ Version 0.04
136
+ now only using rubytorrent to read metafile data
137
+ changed config file screen
138
+ fixed file not found error on download tab
139
+ updated for rwdtinker 1.65
140
+ new helpabout
141
+ new documents list
142
+
135
143
  Version 0.03
136
144
  added directory name to download window
137
145
  resuming download clearer
data/rwdconfig.dist CHANGED
@@ -1,4 +1,4 @@
1
- ##VERSION:1.63
1
+ ##VERSION:1.65
2
2
  # rwdtinker core configuration file
3
3
  ##NAME: ConfigLocation:0
4
4
  ConfigLocation=""
@@ -9,4 +9,9 @@ $testharnessarray = ["rwdtinker_all_tests"]
9
9
  ##NAME:TestNow:0
10
10
  TestNow=false # turning this on will run the unit tests
11
11
  ##NAME:$testharness:0
12
- $testharness=true
12
+ $testharness=true
13
+ ##NAME:$tinkerdocumentsarray:0
14
+ $tinkerdocumentsarray = ["Readme.txt"]
15
+
16
+
17
+
data/tests/makedist.rb CHANGED
@@ -7,6 +7,7 @@
7
7
  $progdir =""
8
8
  require 'fileutils'
9
9
  load 'rwdconfig.dist'
10
+ load 'configuration/rwdtinker.dist'
10
11
  DistroName = "rwdtorrent"
11
12
  load "configuration/#{DistroName}.dist"
12
13
  DistroVersion=RwdTorrentVersion
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.8
3
3
  specification_version: 1
4
4
  name: rwdtorrent
5
5
  version: !ruby/object:Gem::Version
6
- version: "0.03"
7
- date: 2005-04-09
6
+ version: "0.04"
7
+ date: 2005-04-16
8
8
  summary: rwdtorrent is a GUI front end for BitTorrent with rwdtinker and RubyWebDialogs features.
9
9
  require_paths:
10
10
  - "."
@@ -44,6 +44,9 @@ files:
44
44
  - code/01rwdcore/rundocuments.rb
45
45
  - code/01rwdcore/runhelpabout.rb
46
46
  - code/01rwdcore/runeditconfiguration.rb
47
+ - code/01rwdcore/setuptinkerdocuments.rb
48
+ - code/01rwdcore/setuphelpaboutoptions.rb
49
+ - code/01rwdcore/runopentinkerdocument.rb
47
50
  - code/superant.com.rwdtinkerbackwindow/controlclient.rb
48
51
  - code/superant.com.rwdtinkerbackwindow/diagnostictab.rb
49
52
  - code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb
@@ -88,8 +91,8 @@ files:
88
91
  - configuration/language.dist
89
92
  - configuration/rwdapplicationidentity.dist
90
93
  - configuration/rwdtorrent.dist
94
+ - configuration/rwdtorrenthelpabout.rb
91
95
  - extras/rconftool.rb
92
- - extras/aversa.rb
93
96
  - extras/rubytorrent.rb
94
97
  - extras/zip/ioextras.rb
95
98
  - extras/zip/stdrubyext.rb
@@ -128,33 +131,24 @@ files:
128
131
  - gui/frontwindow0/superant.com.rwdtorrent/30viewtorrent.rwd
129
132
  - gui/frontwindow0/superant.com.rwdtorrent/40rwdtorrentrefresh.rwd
130
133
  - gui/frontwindow0/superant.com.rwdtorrent/67viewconfiguration.rwd
131
- - gui/frontwindowselectionbegin/selectiontabbegin/selectiontabbegin.rwd
134
+ - gui/frontwindowselectionbegin/selectiontabbegin/00selectiontabbegin.rwd
132
135
  - gui/frontwindowselections/superant.com.rwdtinkerwin2selectiontab
133
136
  - gui/frontwindowselections/superant.com.rwdtinkerwin2selectiontab/jumplinkcommands.rwd
134
- - gui/frontwindowselectionzend/viewselectionzend/viewselectionend.rwd
135
- - gui/frontwindowtdocumentbegin/superant.com.documentsbegin
136
- - gui/frontwindowtdocumentbegin/superant.com.documentsbegin/tt0documentbegin.rwd
137
+ - gui/frontwindowselectionzend/viewselectionzend/zzdocumentbegin.rwd
138
+ - gui/frontwindowselectionzend/viewselectionzend/wwselectionend.rwd
137
139
  - gui/frontwindowtdocuments/superant.com.documents
138
- - gui/frontwindowtdocuments/superant.com.tinkerwin2documents
139
- - gui/frontwindowtdocuments/superant.com.torrentdocument
140
- - gui/frontwindowtdocuments/superant.com.documents/uu5documents.rwd
141
- - gui/frontwindowtdocuments/superant.com.tinkerwin2documents/uu5documents.rwd
142
- - gui/frontwindowtdocuments/superant.com.torrentdocument/doctorrent.rwd
143
- - gui/frontwindowtdocumentzend/superant.com.documentsend
144
- - gui/frontwindowtdocumentzend/superant.com.documentsend/ww0documentend.rwd
145
- - gui/frontwindowz1end/frontwindowend/xx0rwdfirsttab.rwd
140
+ - gui/frontwindowtdocuments/superant.com.documents/tinkerdocuments.rwd
146
141
  - gui/helpaboutbegin/superant.com.helpaboutbegin
147
- - gui/helpaboutbegin/superant.com.helpaboutbegin/ya0helpscreenstart.rwd
142
+ - gui/helpaboutbegin/superant.com.helpaboutbegin/zzdocumentend.rwd
143
+ - gui/helpaboutbegin/superant.com.helpaboutbegin/zzzrwdlasttab.rwd
144
+ - gui/helpaboutbegin/superant.com.helpaboutbegin/zzzzhelpscreenstart.rwd
148
145
  - gui/helpaboutinstalled/superant.com.tinkerhelpabout
149
- - gui/helpaboutinstalled/superant.com.torrenthelpabout
150
- - gui/helpaboutinstalled/superant.com.tinkerhelpabout/1appname.rwd
151
- - gui/helpaboutinstalled/superant.com.tinkerhelpabout/3copyright.rwd
152
- - gui/helpaboutinstalled/superant.com.tinkerhelpabout/5version.rwd
153
- - gui/helpaboutinstalled/superant.com.torrenthelpabout/1appname.rwd
154
- - gui/helpaboutinstalled/superant.com.torrenthelpabout/3copyright.rwd
155
- - gui/helpaboutinstalled/superant.com.torrenthelpabout/5version.rwd
146
+ - gui/helpaboutinstalled/superant.com.tinkerhelpabout/helpabouttab.rwd
156
147
  - gui/helpaboutzend/superant.com.helpaboutend
157
148
  - gui/helpaboutzend/superant.com.helpaboutend/helpscreenend.rwd
149
+ - gui/helpaboutzend/superant.com.helpaboutend/zzzzhelpscreen2end.rwd
150
+ - gui/helpaboutzend/superant.com.helpaboutend/zzzzhelpabout2.rwd
151
+ - gui/helpaboutzend/superant.com.helpaboutend/zhelpscreenstart2.rwd
158
152
  - gui/tinkerbackwindows/superant.com.tinkerbackwindow
159
153
  - gui/tinkerbackwindows/superant.com.tinkerhelpwindow
160
154
  - gui/tinkerbackwindows/superant.com.versionwindow
@@ -171,6 +165,7 @@ files:
171
165
  - gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd
172
166
  - gui/tinkerbackwindows/superant.com.tinkerhelpwindow/9end.rwd
173
167
  - gui/tinkerbackwindows/superant.com.versionwindow/1appname.rwd
168
+ - gui/tinkerbackwindows/superant.com.versionwindow/helpaboutwindow.rwd
174
169
  - gui/tinkerbackwindows/superant.com.torrentdisplay/torrentdisplaywindow.rwd
175
170
  - gui/zzcoreguiend/tinkerapplicationguiend/yy9rwdend.rwd
176
171
  - installed/rwdviewlogo-0.4.inf
@@ -180,8 +175,8 @@ files:
180
175
  - rwd_files/rdoc-style.css
181
176
  - rwd_files/Readme.txt
182
177
  - rwd_files/rwdapplications.html
183
- - rwd_files/rwdindex.html
184
178
  - rwd_files/tinker.png
179
+ - rwd_files/RubyWebDialogs.html
185
180
  - rwd_files/HowTo_Torrent.txt
186
181
  - zips/rwdahelloworld-0.5.zip
187
182
  - tests/RubyGauge.rb
data/extras/aversa.rb DELETED
@@ -1,261 +0,0 @@
1
- #!/usr/local/bin/ruby
2
-
3
- require 'net/http'
4
- require 'optparse'
5
- require 'ostruct'
6
- require 'uri'
7
- require 'digest/sha1'
8
-
9
- AVERSA_VERSION = 0.3
10
-
11
- class Encoder
12
- def encode_hash(hash, res="")
13
- res << "d"
14
- sorted = hash.sort # note that BEncoding implies sorted keys
15
- sorted.each {|x|
16
- encode_str(x[0], res)
17
- if x[1].kind_of?(String)
18
- encode_str(x[1], res)
19
- elsif x[1].kind_of?(Fixnum) || x[1].kind_of?(Bignum)
20
- encode_int(x[1], res)
21
- elsif x[1].kind_of?(Array)
22
- encode_list(x[1], res)
23
- elsif x[1].kind_of?(Hash)
24
- encode_hash(x[1], res)
25
- end
26
- }
27
- res << "e"
28
- end
29
- def encode_list(list, res="")
30
- res << "l"
31
- list.each {|x|
32
- if x.kind_of?(String)
33
- encode_str(x, res)
34
- elsif x.kind_of?(Number)
35
- encode_int(x, res)
36
- elsif x.kind_of?(Array)
37
- encode_list(x, res)
38
- elsif x.kind_of?(Hash)
39
- encode_hash(x, res)
40
- else
41
- raise "Unknown type to encode #{x.class}"
42
- end
43
- }
44
- res << "e"
45
- end
46
- def encode_str(str, res="")
47
- res << "#{str.size}:#{str}"
48
- end
49
- def encode_int(int, res="")
50
- res << "i#{int}e"
51
- end
52
- end
53
-
54
- class AbstractDecoder
55
- def make(char)
56
- if char =~ /^[1-9]/
57
- return StringCodec.new
58
- elsif char == "i"
59
- return IntegerCodec.new
60
- elsif char == "l"
61
- return ListCodec.new
62
- elsif char == "d"
63
- return DictionaryCodec.new
64
- end
65
- raise "Unknown BCoding type: #{char}"
66
- end
67
- end
68
- class DictionaryCodec < AbstractDecoder
69
- def decode(txt)
70
- h = {}
71
- txt = txt.slice(1, txt.size-1) # remove leading "d"
72
- while txt.length > 0
73
- if txt[0].chr == "e"
74
- txt = txt.slice(1, txt.size-1)
75
- break
76
- end
77
- txt, key = make(txt[0].chr).decode(txt)
78
- txt, value = make(txt[0].chr).decode(txt)
79
- h[key] = value
80
- end
81
- [txt, h]
82
- end
83
- end
84
- class ListCodec < AbstractDecoder
85
- def decode(txt)
86
- list = []
87
- txt = txt.slice(1, txt.size-1) # remove leading "l"
88
- while txt.length > 0
89
- if txt[0].chr == "e"
90
- txt = txt.slice(1, txt.size-1)
91
- break
92
- end
93
- txt, value = make(txt[0].chr).decode(txt)
94
- list << value
95
- end
96
- [txt, list]
97
- end
98
- end
99
- class IntegerCodec
100
- def decode(txt)
101
- end_num = txt =~ /e/
102
- value = txt.slice(1, end_num - 1).to_i
103
- newtxt = txt.slice(end_num + 1, txt.size)
104
- [newtxt, value]
105
- end
106
- end
107
- class StringCodec
108
- def decode(txt)
109
- length = txt.split(":")[0].to_i
110
- text_start = txt.index(":") + 1
111
- text_end = text_start + length
112
- newtxt = txt.slice(text_end, txt.size-text_end)
113
- value = txt.slice(text_start, length)
114
- [newtxt, value]
115
- end
116
- end
117
-
118
- class PrettyPrinter
119
- def print(obj, depth=0)
120
- if obj.kind_of?(Hash)
121
- obj.sort.each {|x|
122
- if x[1].kind_of?(Array) && x[0] == "path"
123
- show(x[0], x[1].join("/"), depth)
124
- elsif x[1].kind_of?(Hash) && x[0] == "resume"
125
- show(x[0], "[Resume data]", depth)
126
- elsif x[1].kind_of?(Hash) && x[0] == "tracker_cache"
127
- show(x[0], "[Tracker data]", depth)
128
- elsif x[1].kind_of?(Hash) || x[1].kind_of?(Array)
129
- show(x[0], "", depth)
130
- print(x[1], depth + 1)
131
- else
132
- show(x[0], x[1], depth)
133
- end
134
- }
135
- elsif obj.kind_of?(Array)
136
- obj.each {|x| print(x, depth + 1) }
137
- else
138
- show("", obj, depth)
139
- end
140
- end
141
- def show(label, txt, depth)
142
- if label == "pieces"
143
- txt = "[#{txt.size/20} SHA checksums]"
144
- elsif label == "creation date"
145
- txt = Time.at(txt).to_s
146
- end
147
- puts "#{"".ljust(depth)}#{label} #{txt} "
148
- end
149
- end
150
-
151
- class PiecesCalc
152
- def pieces(piece_size, file_size)
153
- return file_size / piece_size if file_size % piece_size == 0
154
- (file_size.to_f / piece_size.to_f).to_i + 1
155
- end
156
- end
157
-
158
- class MetaInfo
159
- DEFAULT_PIECE_LENGTH = 262144
160
- attr_reader :hash
161
- def makemetafile(file,trackerurl)
162
- @hash = {}
163
- @hash["announce"] = trackerurl
164
- @hash["creation date"] = Time.now.to_i
165
- @hash["created by"] = "Aversa (http://aversa.rubyforge.org) v#{AVERSA_VERSION}"
166
- @hash["info"] = {}
167
- @hash["info"]["name"] = file
168
- @hash["info"]["piece length"] = DEFAULT_PIECE_LENGTH
169
- gather_date_for_actual_file if File.exists?(file)
170
- write
171
- end
172
- def add(key, value)
173
- @hash[key] = value
174
- end
175
- def write
176
- File.open("#{@hash['info']['name']}.torrent", "w") {|f|
177
- f.write(Encoder.new.encode_hash(@hash))
178
- }
179
- end
180
- def gather_date_for_actual_file
181
- # should do this in chunks, not all at once
182
- data = File.read(@hash["info"]["name"])
183
- @hash["info"]["length"] = data.size
184
- pieces = PiecesCalc.new.pieces(@hash["info"]["piece length"], @hash["info"]["length"])
185
- pieces_string = ""
186
- pieces.times {|piece|
187
- d = Digest::SHA1.new
188
- offset = piece * @hash["info"]["piece length"]
189
- if (@hash["info"]["length"] - offset) < @hash["info"]["piece length"]
190
- d << data.slice(offset, data.size-offset)
191
- else
192
- d << data.slice(offset, @hash["info"]["piece length"])
193
- end
194
- pieces_string << d.digest
195
- }
196
- @hash["info"]["pieces"] = pieces_string
197
- end
198
- def decode(file)
199
- txt, @hash = DictionaryCodec.new.decode(File.read(file))
200
- end
201
- def decode_txt(txt)
202
- txt, @hash = DictionaryCodec.new.decode(txt)
203
- end
204
- def decode_url(url)
205
- data = Net::HTTP.get(URI.parse(url))
206
- txt, @hash = DictionaryCodec.new.decode(data)
207
- end
208
- def announce
209
- @hash["announce"]
210
- end
211
- def creation_date
212
- @hash["creation date"]
213
- end
214
- def encoding
215
- @hash["encoding"]
216
- end
217
- def name
218
- @hash["info"]["name"]
219
- end
220
- def piece_length
221
- @hash["info"]["piece length"]
222
- end
223
- def pieces
224
- @hash["info"]["pieces"]
225
- end
226
- def key(str)
227
- @hash[str]
228
- end
229
- def print
230
- PrettyPrinter.new.print(@hash)
231
- end
232
- end
233
-
234
- # http://www.tlm-project.org/kernels/2.6.x/linux-2.6.5.tar.bz2.torrent
235
- # ../../metainfo_samples/specifix.torrent
236
- if __FILE__ == $0
237
- setup = OpenStruct.new
238
- ARGV.options {|opt|
239
- opt.banner = "Usage: aversa.rb [options]"
240
- opt.on("Options:")
241
- opt.on("--decode SOURCE", String, "Specify metainfo file or URL to be parsed") {|src| setup.decode = src }
242
- opt.on("--makemetafile file,tracker", Array, "Specify a file and a tracker URL for which to create a metainfo file") {|arr| setup.makemetafile = arr}
243
- opt.on("--help", "Display a usage message") { puts opt ; exit(0)}
244
- opt.parse!
245
- }
246
-
247
- if !setup.decode.nil?
248
- m = MetaInfo.new
249
- if setup.decode =~ /^http/
250
- m.decode_url(setup.decode)
251
- else
252
- m.decode(setup.decode)
253
- end
254
- m.print
255
- elsif setup.makemetafile
256
- m = MetaInfo.new
257
- m.makemetafile(setup.makemetafile[0], setup.makemetafile[1])
258
- m.write
259
- m.print
260
- end
261
- end
@@ -1,15 +0,0 @@
1
- $rwdguivar=
2
- "
3
- <row> <p align=\"left\">
4
- <a href=HowTo_Tinker.txt>Howto_Tinker.txt</a></p></row>
5
- <row> <p align=\"left\">
6
- <a href=Readme.txt>Readme.txt</a></p></row>
7
- <row> <p align=\"left\">
8
- <a href=COPYING>GPL License </a></p></row>
9
- <row> <p align=\"left\">
10
- <a href=rwdapplications.html>more information about rwdapplications </a></p></row>
11
- <row> <p align=\"left\">
12
- <a href=rwdindex.html>Link to online information about RubyWebdialogs </a></p></row>"
13
-
14
-
15
-
@@ -1,6 +0,0 @@
1
- $rwdguivar=
2
- "
3
- <row> <p align=\"left\">
4
- <a href=HowTo_TinkerWin2.txt>Howto_TinkerWin2.txt</a></p></row>"
5
-
6
-
@@ -1,6 +0,0 @@
1
-
2
- $rwdguivar=
3
- "
4
- <row> <p align=\"left\">
5
- <a href=HowTo_Torrent.txt>Howto_Torrent.txt</a></p></row>"
6
-
@@ -1,12 +0,0 @@
1
- $rwdguivar=
2
- "
3
- <row> <p align=\"left\"><a href=.>Spawn a clone Dialog window</a></p></row>
4
- </table>
5
- </horizontal>
6
- <horizontal>
7
-
8
- <button caption=\"Help\" action=\"runhelpwindow\"/>
9
-
10
- </horizontal>
11
- </tab>"
12
-
@@ -1,4 +0,0 @@
1
- $rwdguivar=
2
- "
3
- <panel>
4
- <row> <p align=\"center\">#{Message[:rwdtinker]}</p></row>"
@@ -1,3 +0,0 @@
1
- $rwdguivar=
2
- "
3
- <row> <p align=\"center\">copyright s. gibson 2004,2005</p></row>"
@@ -1,10 +0,0 @@
1
- $rwdguivar=
2
- "
3
- <horizontal>
4
- <button caption=#{Message[:clickfor_version]} action=\"runrwdtinkerversion\"/>
5
- </horizontal>
6
- </panel>"
7
-
8
-
9
-
10
-
@@ -1,4 +0,0 @@
1
- $rwdguivar=
2
- "
3
- <panel>
4
- <row> <p align=\"center\">rwdtorrent for rwdtinker</p></row>"
@@ -1,3 +0,0 @@
1
- $rwdguivar=
2
- "
3
- <row> <p align=\"center\">copyright s. gibson 2005</p></row>"
@@ -1,9 +0,0 @@
1
- $rwdguivar=
2
- "
3
- <horizontal>
4
- <button caption=\"Click for Version\" action=\"runrwdtorrentversion\"/>
5
- </horizontal>
6
-
7
- </panel>"
8
-
9
-
File without changes