rwdhypernote 0.10 → 0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. data/Notes/changes.lnk +0 -0
  2. data/Notes/changes.txt +0 -0
  3. data/Notes/hypernote/hypernote01.html +0 -0
  4. data/Notes/hypernote/hypernote02.txt +0 -0
  5. data/Notes/rwdtinker/RwdtinkerProgrammingQuickStart.htm +0 -0
  6. data/Notes/rwdtinker/RwdtinkerProgrammingQuickStart.lnk +0 -0
  7. data/Notes/rwdtinker/newnote.txt +0 -0
  8. data/Notes/rwdtinker/rwdtinker.html +0 -0
  9. data/Readme.txt +6 -0
  10. data/bin/rwdhypernote +0 -0
  11. data/code/01rwdcore/01rwdcore.rb +0 -0
  12. data/code/01rwdcore/02helptexthashbegin.rb +0 -0
  13. data/code/01rwdcore/03helptexthash.rb +0 -0
  14. data/code/01rwdcore/04helptextend.rb +0 -0
  15. data/code/01rwdcore/jumplinkcommand.rb +0 -0
  16. data/code/01rwdcore/openhelpwindow.rb +0 -0
  17. data/code/01rwdcore/returntomain.rb +0 -0
  18. data/code/01rwdcore/rundocuments.rb +0 -0
  19. data/code/01rwdcore/runeditconfiguration.rb +0 -0
  20. data/code/01rwdcore/runhelpabout.rb +0 -0
  21. data/code/01rwdcore/runopentinkerdocument.rb +0 -0
  22. data/code/01rwdcore/rwdtinkerversion.rb +0 -0
  23. data/code/01rwdcore/rwdwindowreturn.rb +0 -0
  24. data/code/01rwdcore/selectiontab.rb +0 -0
  25. data/code/01rwdcore/setuphelpaboutoptions.rb +0 -0
  26. data/code/01rwdcore/setuptinkerdocuments.rb +0 -0
  27. data/code/01rwdcore/test_cases.rb +0 -0
  28. data/code/01rwdcore/test_harness.rb +0 -0
  29. data/code/01rwdcore/uploadreturns.rb +0 -0
  30. data/code/superant.com.hypernote/archivehypernote.rb +0 -0
  31. data/code/superant.com.hypernote/changehypernotename.rb +0 -0
  32. data/code/superant.com.hypernote/clearhypernotescreendisplay.rb +0 -0
  33. data/code/superant.com.hypernote/clearlinkscreendisplay.rb +0 -0
  34. data/code/superant.com.hypernote/copyfilename.rb +0 -0
  35. data/code/superant.com.hypernote/createnewnote.rb +0 -0
  36. data/code/superant.com.hypernote/createnewnotehtml.rb +0 -0
  37. data/code/superant.com.hypernote/deletehypernoterecord.rb +0 -0
  38. data/code/superant.com.hypernote/helptexthashrwdhypernote.rb +0 -0
  39. data/code/superant.com.hypernote/hyperlinkcreatelinkfile.rb +0 -0
  40. data/code/superant.com.hypernote/jumplinkupdate.rb +0 -0
  41. data/code/superant.com.hypernote/listdirectories.rb +0 -2
  42. data/code/superant.com.hypernote/listhypernotelinks.rb +0 -0
  43. data/code/superant.com.hypernote/listhypernotes.rb +0 -0
  44. data/code/superant.com.hypernote/listlinknotes.rb +0 -0
  45. data/code/superant.com.hypernote/loadconfigurationrecord.rb +0 -0
  46. data/code/superant.com.hypernote/loadconfigurationvariables.rb +0 -0
  47. data/code/superant.com.hypernote/loadhtmlnoterecord.rb +0 -0
  48. data/code/superant.com.hypernote/loadhtmlnoterecord2.rb +0 -0
  49. data/code/superant.com.hypernote/loadlinksrecord.rb +0 -0
  50. data/code/superant.com.hypernote/loadnoterecord.rb +0 -0
  51. data/code/superant.com.hypernote/openhelpwindowrwdhyernote.rb +0 -0
  52. data/code/superant.com.hypernote/returntomain.rb +0 -0
  53. data/code/superant.com.hypernote/runwrdhypernotetxtwindow.rb +0 -0
  54. data/code/superant.com.hypernote/rwdhypernotereloadhtml.rb +0 -0
  55. data/code/superant.com.hypernote/rwdhypernoteresetdir.rb +0 -0
  56. data/code/superant.com.hypernote/rwdtinkerversion.rb +0 -0
  57. data/code/superant.com.hypernote/saveconfigurationrecord.rb +0 -0
  58. data/code/superant.com.hypernote/savehtmlhypernoterecord.rb +0 -0
  59. data/code/superant.com.hypernote/savehypernoterecord.rb +0 -0
  60. data/code/superant.com.hypernote/savelinkrecord.rb +0 -0
  61. data/code/superant.com.rwdtinkerbackwindow/controlclient.rb +0 -0
  62. data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +0 -0
  63. data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +0 -0
  64. data/code/superant.com.rwdtinkerbackwindow/installapplet.rb +0 -0
  65. data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +0 -0
  66. data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +0 -0
  67. data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +0 -0
  68. data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +0 -0
  69. data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +0 -0
  70. data/code/superant.com.rwdtinkerbackwindow/listzips.rb +0 -0
  71. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +0 -0
  72. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +0 -0
  73. data/code/superant.com.rwdtinkerbackwindow/network.rb +0 -0
  74. data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +0 -0
  75. data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +0 -0
  76. data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +0 -0
  77. data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +0 -0
  78. data/code/superant.com.rwdtinkerbackwindow/runremoteinstall.rb +0 -0
  79. data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +0 -0
  80. data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +0 -0
  81. data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +0 -0
  82. data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +0 -0
  83. data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +0 -0
  84. data/code/zz0applicationend/zz0end.rb +0 -0
  85. data/configuration/language.dist +0 -0
  86. data/configuration/rwdapplicationidentity.dist +0 -0
  87. data/configuration/rwdhypernote.dist +2 -2
  88. data/configuration/rwdtinker.dist +0 -0
  89. data/configuration/tinkerwin2variables.dist +0 -0
  90. data/ev/browser.rb +24 -10
  91. data/ev/ftools.rb +23 -19
  92. data/ev/mime.rb +328 -0
  93. data/ev/net.rb +154 -38
  94. data/ev/ruby.rb +96 -26
  95. data/ev/rwd.rb +162 -89
  96. data/ev/sgml.rb +1 -1
  97. data/ev/thread.rb +0 -0
  98. data/ev/tree.rb +33 -5
  99. data/ev/xml.rb +97 -0
  100. data/extras/rconftool.rb +0 -0
  101. data/extras/zip/ioextras.rb +0 -0
  102. data/extras/zip/stdrubyext.rb +0 -0
  103. data/extras/zip/tempfile_bugfixed.rb +0 -0
  104. data/extras/zip/zip.rb +0 -0
  105. data/extras/zip/zipfilesystem.rb +0 -0
  106. data/extras/zip/ziprequire.rb +0 -0
  107. data/gui/00coreguibegin/applicationguitop.rwd +0 -0
  108. data/gui/frontwindow0/superant.com.hypernote/10htmlnote.rwd +0 -0
  109. data/gui/frontwindow0/superant.com.hypernote/15editnote.rwd +0 -0
  110. data/gui/frontwindow0/superant.com.hypernote/25html2note.rwd +0 -0
  111. data/gui/frontwindow0/superant.com.hypernote/67viewconfiguration.rwd +0 -0
  112. data/gui/frontwindowselectionbegin/selectiontabbegin/00selectiontabbegin.rwd +0 -0
  113. data/gui/frontwindowselections/superant.com.rwdtinkerwin2selectiontab/jumplinkcommands.rwd +0 -0
  114. data/gui/frontwindowselectionzend/viewselectionzend/wwselectionend.rwd +0 -0
  115. data/gui/frontwindowselectionzend/viewselectionzend/zzdocumentbegin.rwd +0 -0
  116. data/gui/frontwindowtdocuments/superant.com.documents/tinkerdocuments.rwd +0 -0
  117. data/gui/helpaboutbegin/superant.com.helpaboutbegin/zzdocumentend.rwd +0 -0
  118. data/gui/helpaboutbegin/superant.com.helpaboutbegin/zzzrwdlasttab.rwd +0 -0
  119. data/gui/helpaboutbegin/superant.com.helpaboutbegin/zzzzhelpscreenstart.rwd +0 -0
  120. data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/helpabouttab.rwd +0 -0
  121. data/gui/helpaboutzend/superant.com.helpaboutend/helpscreenend.rwd +0 -0
  122. data/gui/helpaboutzend/superant.com.helpaboutend/zhelpscreenstart2.rwd +0 -0
  123. data/gui/helpaboutzend/superant.com.helpaboutend/zzzzhelpabout2.rwd +0 -0
  124. data/gui/helpaboutzend/superant.com.helpaboutend/zzzzhelpscreen2end.rwd +0 -0
  125. data/gui/tinkerbackwindows/superant.com.hypernotetxt/00appname.rwd +0 -0
  126. data/gui/tinkerbackwindows/superant.com.hypernotetxt/10viewnote.rwd +0 -0
  127. data/gui/tinkerbackwindows/superant.com.hypernotetxt/20editlinks.rwd +0 -0
  128. data/gui/tinkerbackwindows/superant.com.hypernotetxt/30noteutilities.rwd +0 -0
  129. data/gui/tinkerbackwindows/superant.com.hypernotetxt/67viewconfiguration.rwd +0 -0
  130. data/gui/tinkerbackwindows/superant.com.hypernotetxt/81jumplinkcommands.rwd +0 -0
  131. data/gui/tinkerbackwindows/superant.com.hypernotetxt/9backend.rwd +0 -0
  132. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/1appname.rwd +0 -0
  133. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +0 -0
  134. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/45installremotezip.rwd +0 -0
  135. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistapplets.rwd +0 -0
  136. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/60editconfiguration.rwd +0 -0
  137. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +0 -0
  138. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/75rwdcontrol.rwd +0 -0
  139. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/81jumplinkcommands.rwd +0 -0
  140. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/9backend.rwd +0 -0
  141. data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd +0 -0
  142. data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/9end.rwd +0 -0
  143. data/gui/tinkerbackwindows/superant.com.versionwindow/1appname.rwd +0 -0
  144. data/gui/tinkerbackwindows/superant.com.versionwindow/helpaboutwindow.rwd +0 -0
  145. data/gui/zzcoreguiend/tinkerapplicationguiend/yy9rwdend.rwd +0 -0
  146. data/init.rb +0 -0
  147. data/lang/en/rwdcore/languagefile.rb +0 -0
  148. data/lang/es/rwdcore/languagefile-es.rb +0 -0
  149. data/lang/jp/rwdcore/languagefile.rb +0 -0
  150. data/lang/nl/rwdcore/languagefile.rb +0 -0
  151. data/lib/temp.rb +0 -0
  152. data/rwd_files/HowTo_HyperNote.txt +0 -0
  153. data/rwd_files/HowTo_Tinker.txt +0 -0
  154. data/rwd_files/HowTo_TinkerWin2.txt +0 -0
  155. data/rwd_files/Readme.txt +0 -0
  156. data/rwd_files/RubyWebDialogs.html +0 -0
  157. data/rwd_files/favicon.ico +0 -0
  158. data/rwd_files/rdoc-style.css +0 -0
  159. data/rwd_files/rwdapplications.html +0 -0
  160. data/rwd_files/tinker.png +0 -0
  161. data/rwdconfig.dist +0 -0
  162. data/tests/checkdepends.sh +0 -0
  163. data/tests/cleancnf.sh +0 -0
  164. data/tests/makedist.rb +0 -0
  165. data/tests/rdep.rb +0 -0
  166. data/tests/totranslate.lang +0 -0
  167. data/zips/rwdahelloworld-0.5.zip +0 -0
  168. metadata +226 -211
data/Notes/changes.lnk CHANGED
File without changes
data/Notes/changes.txt CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/Readme.txt CHANGED
@@ -81,6 +81,12 @@ Steven Gibson
81
81
  steven@superant.com
82
82
 
83
83
  == Changelog
84
+ Version 0.11
85
+ updated to newer ruby webdialogs
86
+
87
+ Version 0.10
88
+ Bug fix for html note editing
89
+
84
90
  Version 0.09
85
91
  added html view tab
86
92
  added 2nd html view tab
data/bin/rwdhypernote CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -9,8 +9,6 @@ def rwdhypernotedirectories
9
9
 
10
10
  fileList = Dir.new(temp_dir).entries.sort.reverse.delete_if { |x| (x =~ /lnk$|txt$/) }
11
11
  @noterecordsresult = ""
12
- @noterecordsresulth = ""
13
-
14
12
  @notedirectoriesresult = fileList.rwd_method("fillrwdhypernotedirs")
15
13
  end
16
14
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,4 +1,4 @@
1
- ##VERSION:0.10
1
+ ##VERSION:0.11
2
2
  ##NAME:$rwdhypernote_directory:0
3
3
  $rwdhypernote_directory = "Notes"
4
4
  ##NAME:$notesarray:0
@@ -13,5 +13,5 @@ $rwdhypernote_updatedirectory = "updates"
13
13
  $testharnessarray += ["rwdhypernote_all_tests"]
14
14
  $tinkerhelpaboutarray += ["RwdHypernote"]
15
15
  $tinkerdocumentsarray += ["HowTo_HyperNote.txt"]
16
- RwdHyperNoteVersion = "0.10"
16
+ RwdHyperNoteVersion = "0.11"
17
17
 
File without changes
File without changes
data/ev/browser.rb CHANGED
@@ -16,20 +16,33 @@ def windowsbrowser
16
16
  application = nil
17
17
 
18
18
  begin
19
- Win32::Registry::HKEY_CLASSES_ROOT.open('.html') do |reg|
19
+ Win32::Registry::HKEY_CLASSES_ROOT.open(".html") do |reg|
20
20
  filetype = reg[""]
21
21
  end
22
22
 
23
- Win32::Registry::HKEY_CLASSES_ROOT.open(filetype + '\shell\open\command') do |reg|
23
+ Win32::Registry::HKEY_CLASSES_ROOT.open(filetype + "\\shell\\open\\command") do |reg|
24
24
  application = reg[""]
25
25
  end
26
26
  rescue NameError
27
- $stderr.puts "Only available for Windows."
27
+ $stderr.puts "Only available for Windows and Cygwin."
28
28
  end
29
29
 
30
30
  application
31
31
  end
32
32
 
33
+ def cygwinbrowser
34
+ browser, *args = windowsbrowser.splitwords
35
+ browser = browser.gsub(/\\/, "/")
36
+ #browser = browser
37
+
38
+ args.collect!{|a| a.gsub(/\\/, "/")}
39
+ #args.collect!{|a| "\"%s\"" % [a.gsub(/\\/, "/")]}
40
+ #args.collect!{|a| "\"%s\"" % [a]}
41
+
42
+ res = "\"%s\" %s" % [browser, args.join(" ")]
43
+ res
44
+ end
45
+
33
46
  def linuxbrowser
34
47
  application = ""
35
48
 
@@ -47,25 +60,26 @@ end
47
60
  def defaultbrowser
48
61
  res = nil
49
62
  res = windowsbrowser if windows?
63
+ res = cygwinbrowser if cygwin?
50
64
  res = linuxbrowser if linux?
51
65
  res
52
66
  end
53
67
 
68
+ def showurlinbrowser(url, browser=defaultbrowser)
69
+ command = "#{browser} \"#{url}\""
70
+
71
+ system(command) or $stderr.puts "Starting of the browser failed, or the browser terminated abnormally.\nCommand => #{command}"
72
+ end
73
+
54
74
  def showinbrowser(html, browser=defaultbrowser)
55
75
  port, io = TCPServer.freeport(7701, 7709)
56
76
 
57
77
  unless browser.nil?
58
78
  Thread.new do
59
79
  begin
60
- #command = "1234 \"http://localhost:#{port}\"" if linux?
61
- #command = "L:/prog/MozillaFirefox/firefox.exe \"http://localhost:#{port}\"" if cygwin?
62
- #command = Win32::Registry::HKEY_CLASSES_ROOT.open('htmlfile\shell\open\command')[0] + " \"http://localhost:#{port}/\"" if windows?
63
-
64
- command = "#{browser} \"http://localhost:#{port}\""
65
-
66
80
  Thread.pass
67
81
 
68
- system(command)
82
+ showurlinbrowser("http://localhost:#{port}/", browser)
69
83
  rescue
70
84
  end
71
85
  end
data/ev/ftools.rb CHANGED
@@ -1,22 +1,12 @@
1
1
  require "ftools"
2
2
 
3
3
  class Dir
4
- def self.mkdirrec(dir)
5
- pdir = File.dirname(dir)
6
-
7
- if not pdir.empty? and not File.directory?(pdir)
8
- Dir.mkdirrec(pdir)
9
- end
10
-
11
- Dir.mkdir(dir) rescue nil
12
- end
13
-
14
4
  def self.copy(from, to)
15
5
  if File.directory?(from)
16
6
  pdir = Dir.pwd
17
7
  todir = File.expand_path(to)
18
8
 
19
- mkdirrec(todir)
9
+ File.mkpath(todir)
20
10
 
21
11
  Dir.chdir(from)
22
12
  Dir.new(".").each do |e|
@@ -26,7 +16,7 @@ class Dir
26
16
  else
27
17
  todir = File.dirname(File.expand_path(to))
28
18
 
29
- mkdirrec(todir)
19
+ File.mkpath(todir)
30
20
 
31
21
  File.copy(from, to)
32
22
  end
@@ -38,6 +28,8 @@ class Dir
38
28
  end
39
29
 
40
30
  def self.rm_rf(entry)
31
+ File.chmod(0755, entry)
32
+
41
33
  if File.ftype(entry) == "directory"
42
34
  pdir = Dir.pwd
43
35
 
@@ -47,16 +39,24 @@ class Dir
47
39
  end
48
40
  Dir.chdir(pdir)
49
41
 
50
- Dir.delete(entry)
42
+ begin
43
+ Dir.delete(entry)
44
+ rescue => e
45
+ $stderr.puts e.message
46
+ end
51
47
  else
52
- File.delete(entry)
48
+ begin
49
+ File.delete(entry)
50
+ rescue => e
51
+ $stderr.puts e.message
52
+ end
53
53
  end
54
54
  end
55
55
 
56
56
  def self.find(entry=nil, mask=nil)
57
57
  entry = "." if entry.nil?
58
58
 
59
- entry = entry.gsub!(/[\/\\]*$/, "") unless entry.nil?
59
+ entry = entry.gsub(/[\/\\]*$/, "") unless entry.nil?
60
60
 
61
61
  mask = /^#{mask}$/i if mask.kind_of?(String)
62
62
 
@@ -77,8 +77,8 @@ class Dir
77
77
  ensure
78
78
  Dir.chdir(pdir)
79
79
  end
80
- rescue Errno::EACCES => error
81
- puts error
80
+ rescue Errno::EACCES => e
81
+ $stderr.puts e.message
82
82
  end
83
83
  else
84
84
  res += [entry] if mask.nil? or entry =~ mask
@@ -99,7 +99,7 @@ class File
99
99
  # Rollback
100
100
 
101
101
  if File.file?(backupfile) and File.file?(controlfile)
102
- $stdout.puts "Restoring #{file}..."
102
+ $stderr.puts "Restoring #{file}..."
103
103
 
104
104
  File.copy(backupfile, file) # Rollback from phase 3
105
105
  end
@@ -139,7 +139,11 @@ class File
139
139
  end
140
140
 
141
141
  def self.touch(file)
142
- File.open(file, "a"){|f|}
142
+ if File.exists?(file)
143
+ File.utime(Time.now, File.mtime(file), file)
144
+ else
145
+ File.open(file, "a"){|f|}
146
+ end
143
147
  end
144
148
 
145
149
  def self.which(file)