rwdeliza 0.03

Sign up to get free protection for your applications and to get access to all the features.
Files changed (222) hide show
  1. data/ElizaData/database/db.1 +7015 -0
  2. data/ElizaData/database/db.10 +7001 -0
  3. data/ElizaData/database/db.11 +7001 -0
  4. data/ElizaData/database/db.12 +7003 -0
  5. data/ElizaData/database/db.13 +7003 -0
  6. data/ElizaData/database/db.14 +7008 -0
  7. data/ElizaData/database/db.15 +7001 -0
  8. data/ElizaData/database/db.16 +7001 -0
  9. data/ElizaData/database/db.17 +7001 -0
  10. data/ElizaData/database/db.18 +7001 -0
  11. data/ElizaData/database/db.19 +7001 -0
  12. data/ElizaData/database/db.2 +7001 -0
  13. data/ElizaData/database/db.20 +5467 -0
  14. data/ElizaData/database/db.3 +7001 -0
  15. data/ElizaData/database/db.4 +7001 -0
  16. data/ElizaData/database/db.5 +7001 -0
  17. data/ElizaData/database/db.6 +7001 -0
  18. data/ElizaData/database/db.7 +7001 -0
  19. data/ElizaData/database/db.8 +7001 -0
  20. data/ElizaData/database/db.9 +7001 -0
  21. data/ElizaData/responses/hello.res +1 -0
  22. data/ElizaData/responses/i_agree.res +1 -0
  23. data/ElizaData/responses/i_am_listening_to_you.res +1 -0
  24. data/ElizaData/responses/please_explain.res +1 -0
  25. data/ElizaData/responses/thank_you.res +1 -0
  26. data/ElizaData/tiny.dict +211 -0
  27. data/ElizaData/words/adjectives1.words +906 -0
  28. data/ElizaData/words/adjectives2w.words +1 -0
  29. data/ElizaData/words/noun0.words +15 -0
  30. data/ElizaData/words/noun1.words +1391 -0
  31. data/ElizaData/words/noun2.words +1924 -0
  32. data/ElizaData/words/noun4.words +330 -0
  33. data/ElizaData/words/pronoun1.words +6 -0
  34. data/ElizaData/words/verb4.words +350 -0
  35. data/ElizaData/words/verb42.words +391 -0
  36. data/ElizaData/words/verb42w.words +1 -0
  37. data/ElizaData/words/verb43.words +402 -0
  38. data/ElizaData/words/verb43w.words +1 -0
  39. data/ElizaData/words/verb45.words +452 -0
  40. data/ElizaData/words/verb4w.words +1 -0
  41. data/ElizaData/words/verb5.words +13 -0
  42. data/ElizaData/words/verb61.words +35 -0
  43. data/ElizaData/words/verb62.words +41 -0
  44. data/ElizaData/words/verb83.words +17 -0
  45. data/Readme.txt +462 -0
  46. data/bin/rwdeliza +19 -0
  47. data/code/01rwdcore/01rwdcore.rb +29 -0
  48. data/code/01rwdcore/02helptexthashbegin.rb +4 -0
  49. data/code/01rwdcore/03helptexthash.rb +23 -0
  50. data/code/01rwdcore/04helptextend.rb +6 -0
  51. data/code/01rwdcore/jumplinkcommand.rb +26 -0
  52. data/code/01rwdcore/openhelpwindow.rb +31 -0
  53. data/code/01rwdcore/returntomain.rb +10 -0
  54. data/code/01rwdcore/rundocuments.rb +10 -0
  55. data/code/01rwdcore/runeditconfiguration.rb +10 -0
  56. data/code/01rwdcore/runhelpabout.rb +10 -0
  57. data/code/01rwdcore/runopentinkerdocument.rb +7 -0
  58. data/code/01rwdcore/rwdtinkerversion.rb +22 -0
  59. data/code/01rwdcore/rwdwindowreturn.rb +9 -0
  60. data/code/01rwdcore/selectiontab.rb +9 -0
  61. data/code/01rwdcore/setuphelpaboutoptions.rb +13 -0
  62. data/code/01rwdcore/setuptinkerdocuments.rb +6 -0
  63. data/code/01rwdcore/test_cases.rb +109 -0
  64. data/code/01rwdcore/test_harness.rb +13 -0
  65. data/code/01rwdcore/uploadreturns.rb +62 -0
  66. data/code/dd0viewphoto/dd0viewphoto.rb +3 -0
  67. data/code/superant.com.rwdeliza/0uninstallapplet.rb +10 -0
  68. data/code/superant.com.rwdeliza/eliza01.rb +45 -0
  69. data/code/superant.com.rwdeliza/helptexthashrwdeliza.rb +39 -0
  70. data/code/superant.com.rwdeliza/openhelpwindowrwdeliza.rb +23 -0
  71. data/code/superant.com.rwdeliza/runrwdshellwindow.rb +12 -0
  72. data/code/superant.com.rwdeliza/rwdtinkerversion.rb +10 -0
  73. data/code/superant.com.rwdeliza/tagsentence.rb +39 -0
  74. data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +19 -0
  75. data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +61 -0
  76. data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +240 -0
  77. data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +34 -0
  78. data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +20 -0
  79. data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +12 -0
  80. data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +53 -0
  81. data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +12 -0
  82. data/code/superant.com.rwdtinkerbackwindow/listzips.rb +27 -0
  83. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +22 -0
  84. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +14 -0
  85. data/code/superant.com.rwdtinkerbackwindow/network.rb +87 -0
  86. data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +19 -0
  87. data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +38 -0
  88. data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +24 -0
  89. data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +46 -0
  90. data/code/superant.com.rwdtinkerbackwindow/removeappletvariables.rb +52 -0
  91. data/code/superant.com.rwdtinkerbackwindow/runremoteinstall.rb +11 -0
  92. data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +15 -0
  93. data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +13 -0
  94. data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +19 -0
  95. data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +22 -0
  96. data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +24 -0
  97. data/code/superant.com.words/dictlookup.rb +20 -0
  98. data/code/superant.com.words/runfortunewindow.rb +14 -0
  99. data/code/superant.com.words/runrwdwordsbackwindow.rb +10 -0
  100. data/code/superant.com.words/runrwdwordsversion.rb +14 -0
  101. data/code/superant.com.words/rwdtinkerversion.rb +10 -0
  102. data/code/zz0applicationend/zz0end.rb +4 -0
  103. data/configuration/language.dist +8 -0
  104. data/configuration/rwdapplicationidentity.dist +3 -0
  105. data/configuration/rwdtinker.dist +18 -0
  106. data/configuration/rwdweliza-0.03.dist +31 -0
  107. data/configuration/tinkerwin2variables.dist +17 -0
  108. data/gui/00coreguibegin/applicationguitop.rwd +4 -0
  109. data/gui/frontwindow0/cc0openphoto.rwd +22 -0
  110. data/gui/frontwindowselections/00selectiontabbegin.rwd +11 -0
  111. data/gui/frontwindowselections/jumplinkcommands.rwd +15 -0
  112. data/gui/frontwindowselections/wwselectionend.rwd +3 -0
  113. data/gui/frontwindowtdocuments/00documentbegin.rwd +6 -0
  114. data/gui/frontwindowtdocuments/tinkerdocuments.rwd +14 -0
  115. data/gui/frontwindowtdocuments/zzdocumentend.rwd +8 -0
  116. data/gui/helpaboutbegin/zzzrwdlasttab.rwd +6 -0
  117. data/gui/helpaboutbegin/zzzzhelpscreenstart.rwd +3 -0
  118. data/gui/helpaboutbegin/zzzzzzhelpabouttab.rwd +15 -0
  119. data/gui/helpaboutzend/helpscreenend.rwd +3 -0
  120. data/gui/helpaboutzend/zhelpscreenstart2.rwd +3 -0
  121. data/gui/helpaboutzend/zzzzhelpabout2.rwd +15 -0
  122. data/gui/helpaboutzend/zzzzhelpscreen2end.rwd +3 -0
  123. data/gui/tinkerbackwindows/superant.com.refreshwindow/fortunerefreshwindowtwo.rwd +9 -0
  124. data/gui/tinkerbackwindows/superant.com.rwdeliza/1appname.rwd +5 -0
  125. data/gui/tinkerbackwindows/superant.com.rwdeliza/1eliza.rwd +21 -0
  126. data/gui/tinkerbackwindows/superant.com.rwdeliza/4sentance.rwd +21 -0
  127. data/gui/tinkerbackwindows/superant.com.rwdeliza/98jumplinkcommands.rwd +17 -0
  128. data/gui/tinkerbackwindows/superant.com.rwdeliza/zbackend.rwd +6 -0
  129. data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/1appname.rwd +5 -0
  130. data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/20downloadftp.rwd +45 -0
  131. data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/67viewconfiguration.rwd +29 -0
  132. data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/70rwddiagnostics.rwd +16 -0
  133. data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/m01menubegin.rwd +18 -0
  134. data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/zvbackend.rwd +6 -0
  135. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/1appname.rwd +5 -0
  136. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +41 -0
  137. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/45installremotezip.rwd +44 -0
  138. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistapplets.rwd +44 -0
  139. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/60editconfiguration.rwd +30 -0
  140. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +29 -0
  141. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/81jumplinkcommands.rwd +17 -0
  142. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/9backend.rwd +6 -0
  143. data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd +31 -0
  144. data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/9end.rwd +4 -0
  145. data/gui/tinkerbackwindows/superant.com.versionwindow/1appname.rwd +19 -0
  146. data/gui/tinkerbackwindows/superant.com.versionwindow/helpaboutwindow.rwd +17 -0
  147. data/gui/tinkerbackwindows/superant.com.words/1appname.rwd +4 -0
  148. data/gui/tinkerbackwindows/superant.com.words/1dictionary.rwd +19 -0
  149. data/gui/tinkerbackwindows/superant.com.words/3rwdfortune.rwd +14 -0
  150. data/gui/tinkerbackwindows/superant.com.words/77jumplinkcommands.rwd +17 -0
  151. data/gui/tinkerbackwindows/superant.com.words/z9end.rwd +6 -0
  152. data/gui/zzcoreguiend/yy9rwdend.rwd +4 -0
  153. data/init.rb +277 -0
  154. data/installed/rwdweliza-0.03.inf +24 -0
  155. data/installed/temp.rb +1 -0
  156. data/lang/en/rwdcore/languagefile.rb +58 -0
  157. data/lang/es/rwdcore/languagefile-es.rb +62 -0
  158. data/lang/fr/rwdcore/languagefile.rb +64 -0
  159. data/lang/jp/rwdcore/languagefile.rb +72 -0
  160. data/lang/nl/rwdcore/languagefile.rb +75 -0
  161. data/lib/dict.rb +438 -0
  162. data/lib/druida.rb +499 -0
  163. data/lib/hashslice.rb +71 -0
  164. data/lib/linguistics.rb +360 -0
  165. data/lib/linguistics/en.rb +1601 -0
  166. data/lib/linguistics/en/infinitive.rb +1148 -0
  167. data/lib/linguistics/en/linkparser.rb +142 -0
  168. data/lib/linguistics/en/wordnet.rb +253 -0
  169. data/lib/linguistics/iso639.rb +456 -0
  170. data/lib/linkparser.rb +461 -0
  171. data/lib/linkparser/connection.rb +81 -0
  172. data/lib/linkparser/connector.rb +201 -0
  173. data/lib/linkparser/definition.rb +225 -0
  174. data/lib/linkparser/dictionary.rb +208 -0
  175. data/lib/linkparser/linkage.rb +185 -0
  176. data/lib/linkparser/log.rb +39 -0
  177. data/lib/linkparser/sentence.rb +79 -0
  178. data/lib/linkparser/utils.rb +540 -0
  179. data/lib/linkparser/word.rb +92 -0
  180. data/lib/rconftool.rb +380 -0
  181. data/lib/rwd/browser.rb +123 -0
  182. data/lib/rwd/ftools.rb +174 -0
  183. data/lib/rwd/mime.rb +328 -0
  184. data/lib/rwd/net.rb +866 -0
  185. data/lib/rwd/ruby.rb +889 -0
  186. data/lib/rwd/rwd.rb +1942 -0
  187. data/lib/rwd/sgml.rb +236 -0
  188. data/lib/rwd/thread.rb +63 -0
  189. data/lib/rwd/tree.rb +371 -0
  190. data/lib/rwd/xml.rb +101 -0
  191. data/lib/zip/ioextras.rb +114 -0
  192. data/lib/zip/stdrubyext.rb +111 -0
  193. data/lib/zip/tempfile_bugfixed.rb +195 -0
  194. data/lib/zip/zip.rb +1378 -0
  195. data/lib/zip/zipfilesystem.rb +558 -0
  196. data/lib/zip/ziprequire.rb +61 -0
  197. data/rwd_files/HowTo_Eliza.txt +195 -0
  198. data/rwd_files/HowTo_Tinker.txt +471 -0
  199. data/rwd_files/HowTo_TinkerWin2.txt +202 -0
  200. data/rwd_files/Readme.txt +57 -0
  201. data/rwd_files/RubyWebDialogs.html +6 -0
  202. data/rwd_files/favicon.ico +0 -0
  203. data/rwd_files/rdoc-style.css +175 -0
  204. data/rwd_files/rwdapplications.html +54 -0
  205. data/rwd_files/tinker.png +0 -0
  206. data/rwdconfig.dist +21 -0
  207. data/rwdeliza.rb +1 -0
  208. data/tests/RubyGauge.rb +179 -0
  209. data/tests/checkdepends.sh +4 -0
  210. data/tests/cleancnf.sh +6 -0
  211. data/tests/makedist-rwdweliza.rb +56 -0
  212. data/tests/makedist.rb +66 -0
  213. data/tests/rdep.rb +354 -0
  214. data/tests/totranslate.lang +93 -0
  215. data/zips/rwdwaddresses-1.05.zip +0 -0
  216. data/zips/rwdwcalc-0.61.zip +0 -0
  217. data/zips/rwdwgutenberg-0.09.zip +0 -0
  218. data/zips/rwdwschedule-1.04.zip +0 -0
  219. data/zips/rwdwshell-1.04.zip +0 -0
  220. data/zips/temp.rb +1 -0
  221. data/zips/wrubyslippers-1.06.zip +0 -0
  222. metadata +282 -0
@@ -0,0 +1,4 @@
1
+ $rwdguivar=
2
+ "</window>"
3
+
4
+
@@ -0,0 +1,19 @@
1
+ $rwdguivar=
2
+ "
3
+ <window name = \"applicationversion\" title=#{Message[:application_version]}>
4
+
5
+ <row> <p></row>
6
+ <p>%versionappnamedisplay%</p>
7
+ <row> <p></row>
8
+ <p>%versioncopyrightdisplay%</p>
9
+
10
+ <row> <p></row>
11
+ <p>%versionnumberdisplay%</p>
12
+
13
+ <horizontal>
14
+ <button caption=#{Message[:return]} action=returntomain/>
15
+ </horizontal>
16
+
17
+ </window>"
18
+
19
+
@@ -0,0 +1,17 @@
1
+ $rwdguivar=
2
+ "
3
+ <window name=tinkerhelpabout title=#{Message[:help_about]}>
4
+ <horizontal>
5
+ <button caption=#{Message[:showhelpabout_links]} action=\"setuphelpaboutoptions\"/>
6
+
7
+ </horizontal>
8
+ <table>
9
+ <select name=\"a_helpaboutinput\"> %%helpaboutoptions%% </select>
10
+
11
+ </table>
12
+
13
+ <horizontal>
14
+ <button caption=#{Message[:openselectedhelp_about]} action=\"runrwdtinkerversion\"/>
15
+ </horizontal>
16
+ </window>
17
+ "
@@ -0,0 +1,4 @@
1
+ $rwdguivar=
2
+ "
3
+ <window name = \"rwdwordsbackwindow\" title=\"rwdwords - \">
4
+ <tabs>"
@@ -0,0 +1,19 @@
1
+ $rwdguivar=
2
+ "
3
+ <tab name=\"dictlookup\" caption=\"Dictionary Lookup\">
4
+
5
+
6
+ <table>
7
+ <row> <p align=\"right\">Word:</p> <text name=\"a_dictionaryinput\"/> </row>
8
+
9
+ </table>
10
+
11
+ <horizontal>
12
+ <button caption=\"Lookup\" action=\"dictlookup\"/>
13
+ <button caption=\"Cancel\" action=\"main\"/>
14
+
15
+ </horizontal>
16
+ <p>%dictionary_display%</p>
17
+ </tab>
18
+ "
19
+
@@ -0,0 +1,14 @@
1
+ $rwdguivar=
2
+ "
3
+ <tab name=\"unixfortunes\" caption=\"Famous Quotes\">
4
+ <table>
5
+ <row> This applet will open a replacement window in this same browser screen</row>
6
+ <row><p> You should see that new window refresh every 15 seconds with </row>
7
+ <row><p> Famous Quotes, if using the include program.</row>
8
+ <row><p> You can return to this screen by clicking on back arrows or the cancel button</row>
9
+ <row><p> The variable to change the refresh speed in .cnf file</row>
10
+
11
+ </table>
12
+ <button caption=\'Start Fortune Refresh\' action=\'runfortunewindow\'/>
13
+ </tab>"
14
+
@@ -0,0 +1,17 @@
1
+ $rwdguivar=
2
+ "
3
+ <tab name=RwdwordsMenu caption=Menu>
4
+ <horizontal>
5
+ <button caption=\"Show Jump Links\" action=\"showjumplinkoptions\"/>
6
+
7
+ </horizontal>
8
+ <table>
9
+ <select name=\"a_jumplinkinput\"> %%jumplinkoptions%% </select>
10
+
11
+ </table>
12
+
13
+ <horizontal>
14
+ <button caption=\"Jump to Application Location\" action=\"runjumplinkcommand\"/>
15
+ </horizontal>
16
+ </tab>
17
+ "
@@ -0,0 +1,6 @@
1
+ $rwdguivar=
2
+ "
3
+ </tabs>
4
+ </window>"
5
+
6
+
@@ -0,0 +1,4 @@
1
+ $rwdguivar=
2
+ "
3
+ </application>"
4
+
data/init.rb ADDED
@@ -0,0 +1,277 @@
1
+
2
+ #***********************************************************************
3
+ #* Rwd/Tinker -- A Ruby program for the RudyWebDialog.
4
+ #* Copyright (c) 2004, 2005 by Steven Gibson. All Rights Reserved.
5
+ #*
6
+ #* This library is free software; you can redistribute it and/or
7
+ #* modify it under the terms of the GNU General Public
8
+ #* License as published by the Free Software Foundation; either
9
+ #* .
10
+ #*
11
+ #* These files are distributed in the hope that they will be useful,
12
+ #* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ #* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ #* General Public License for more details.
15
+ #*
16
+ #* You should have received a copy of the GNU General Public
17
+ #* License along with these files; if not, write to the Free Software
18
+ #* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
+ #*
20
+ #* For further information please contact the author by e-mail
21
+ #* at "smalllinux@gmail.com".
22
+ #***********************************************************************/
23
+
24
+ require "lib/rwd/rwd"
25
+ require 'fileutils'
26
+ require 'lib/rconftool'
27
+
28
+ $progdir = File::expand_path( File.dirname(__FILE__))
29
+
30
+ $tempdoc = " "
31
+
32
+ def findfiles(d)
33
+ a = Array.new(Dir[d].entries.sort)
34
+ #loop through and get the files names
35
+ a.each do |x|
36
+ #adjust the filters to the files you want to see...
37
+ if(!test(?d,x))
38
+ # only rwd files
39
+ if x =~ /rb|rwd|txt/
40
+ fileA=File.open("#{x}","r") #opens the file thats in fileName as read only
41
+ $tempdoc+=fileA.read #reads the file into the doc string
42
+ fileA.close
43
+ end
44
+ end
45
+ end
46
+ end
47
+ def loadguifile(d)
48
+ a = Array.new(Dir[d].entries.sort)
49
+ #loop through and get the files names
50
+ a.each do |x|
51
+ #adjust the filters to the files you want to see...
52
+ if(!test(?d,x))
53
+ # only rwd files
54
+ if x =~ /rb|rwd|txt/
55
+
56
+ load x #opens the file thats in fileName and reads it
57
+ $tempdoc += $rwdguivar # adds the file into the doc string
58
+ end
59
+ end
60
+ end
61
+ end
62
+
63
+ # integrate the new configuration files
64
+ MAINconfignew = "rwdconfig.cnf"
65
+ MAINconfigdist = "rwdconfig.dist"
66
+ Rconftool::install(MAINconfigdist,MAINconfignew)
67
+
68
+ #load main config file
69
+ load 'rwdconfig.cnf'
70
+
71
+ Dir.chdir("configuration") #changes the current working directory
72
+
73
+ fileList = Dir.new(".").entries.sort.reverse.delete_if { |x| ! (x =~ /dist$/) } #creates an Array separated with \n
74
+ @doc = ""
75
+ fileList.length.times{ #opening of a block
76
+ configdist =fileList.pop #pops the first item out of the Array
77
+ tempconfigfile = configdist.gsub(/\.dist$/, "")
78
+ confignew = tempconfigfile + ".cnf"
79
+ Rconftool::install(configdist,confignew) #integrates new file with old
80
+ } #closing block
81
+ # END of configuration integration
82
+ Dir.chdir($progdir)
83
+
84
+ # Read in the configuration files
85
+ Dir.chdir("configuration") #changes the current working directory
86
+
87
+ fileList = Dir.new(".").entries.sort.reverse.delete_if { |x| ! (x =~ /cnf$/) } #creates an Array separated with \n
88
+ @doc = ""
89
+ fileList.length.times{ #opening of a block
90
+ fileName=fileList.pop #pops the first item out of the Array
91
+ load fileName #loads the the config file thats in fileName
92
+ } #closing block
93
+ # END of configuration reading
94
+
95
+ Dir.chdir($progdir) # change back to top program directory
96
+
97
+ # build the English Language hash file from the parts
98
+ languagehashvariable = 'Message = Hash.new { |hh, kk| hh[kk] = "ERROR: Message not found: #{kk.inspect}."; hh[kk] }
99
+ langmessage = {' + "\n"
100
+ startlangdir = File.join(LangDir,"en")
101
+ #get a list of the files and subdirectories on the starting directory only
102
+ alanghash = Array.new(Dir[startlangdir].entries.sort)
103
+ #loop through the list, ignore the files and add all new directories found
104
+ alanghash.each do |x|
105
+ #if a directory...
106
+ if(test(?d,x))
107
+ # add to the original list of directories
108
+ @@tmproot = x + "/**"
109
+ #adds the new ones to the array
110
+ blanghash = Dir[@@tmproot].entries.sort
111
+ blanghash.each do |x|
112
+ if(test(?d,x))
113
+ alanghash.push(x) #appends to the end of the array...
114
+ end
115
+ end
116
+ end
117
+ end
118
+ alanghash.each do |x|
119
+ #if it is a file...
120
+ if(!test(?d,x))
121
+ alanghash.delete(x)
122
+ else #it is a directory...
123
+ findfiles(x + "/**")
124
+ end
125
+ end
126
+
127
+
128
+ #writes the contents of doc into the languagehashvariable
129
+ languagehashvariable = languagehashvariable + $tempdoc + "} ; langmessage.each { |kk, vv| Message[kk] = vv }"
130
+
131
+ # END of en Lang building
132
+ $tempdoc = " "
133
+ Dir.chdir($progdir) # change back to top program directory
134
+
135
+ # build the local Language hash file from the parts
136
+ startlangdir = File.join(LangDir,$lang)
137
+ #get a list of the files and subdirectories on the starting directory only
138
+ alanghash = Array.new(Dir[startlangdir].entries.sort)
139
+ #loop through the list, ignore the files and add all new directories found
140
+ alanghash.each do |x|
141
+ #if a directory...
142
+ if(test(?d,x))
143
+ # add to the original list of directories
144
+ @@tmproot = x + "/**"
145
+ #adds the new ones to the array
146
+ blanghash = Dir[@@tmproot].entries.sort
147
+ blanghash.each do |x|
148
+ if(test(?d,x))
149
+ alanghash.push(x) #appends to the end of the array...
150
+ end
151
+ end
152
+ end
153
+ end
154
+ alanghash.each do |x|
155
+ #if it is a file...
156
+ if(!test(?d,x))
157
+ alanghash.delete(x)
158
+ else #it is a directory...
159
+ findfiles(x + "/**")
160
+ end
161
+ end
162
+
163
+
164
+ #writes the contents of doc into the variable
165
+ languagehashvariable = languagehashvariable + " ; Message.update(" + $tempdoc + ' :rwdtinker => "Rwdtinker" ) '
166
+
167
+
168
+ $tempdoc = " "
169
+
170
+ Dir.chdir($progdir) # change back to top program directory
171
+
172
+ temp = eval( languagehashvariable )
173
+
174
+ $tempdoc = " "
175
+
176
+ # build the actual program from the code parts
177
+ #get a list of the files and subdirectories on the starting directory only
178
+ a = Array.new(Dir[CodeDir].entries.sort)
179
+ #loop through the list, ignore the files and add all new directories found
180
+ a.each do |x|
181
+ #if a directory...
182
+ if(test(?d,x))
183
+ # add to the original list of directories
184
+ @@root = x + "/**"
185
+ #adds the new ones to the array
186
+ b = Dir[@@root].entries.sort
187
+ b.each do |x|
188
+ if(test(?d,x))
189
+ a.push(x) #appends to the end of the array...
190
+ end
191
+ end
192
+ end
193
+ end
194
+ a.each do |x|
195
+ #if it is a file...
196
+ if(!test(?d,x))
197
+ a.delete(x)
198
+ else #it is a directory...
199
+ findfiles(x + "/**")
200
+ end
201
+ end
202
+
203
+
204
+ # load the program file
205
+ tempcoderesult = eval( $tempdoc )
206
+
207
+ # build the actual GUI from the gui parts
208
+ $tempdoc = " "
209
+ #get a list of the files and subdirectories on the starting directory only
210
+ a = Array.new(Dir[GuiDir].entries.sort)
211
+ #loop through the list, ignore the files and add all new directories found
212
+ a.each do |x|
213
+ #if a directory...
214
+ if(test(?d,x))
215
+ #use this new dir find to add to the original list of directories
216
+ @@root = x + "/**"
217
+ #adds the new ones to the array
218
+ b = Dir[@@root].entries.sort
219
+ b.each do |x|
220
+ if(test(?d,x))
221
+ a.push(x) #appends to the end of the array...
222
+ end
223
+ end
224
+ end
225
+ end
226
+ a.each do |x|
227
+ #if it is a file...
228
+ if(!test(?d,x))
229
+ a.delete(x)
230
+
231
+ else #it is a directory...
232
+ loadguifile(x + "/**")
233
+ end
234
+ end
235
+
236
+ # gui variable is done
237
+ guiRWD = ""
238
+ $rwd_gui_tinker = $tempdoc
239
+ require 'socket' # Network stuff
240
+ host = "127.0.0.1"
241
+ port = $port
242
+
243
+ # Create a socket to listen on and bind it to the host and port
244
+ freeportfound = false
245
+ until freeportfound
246
+ begin
247
+ @socket = UDPSocket::new()
248
+ @socket.bind(host, port)
249
+ freeportfound = true
250
+ $port = port
251
+ # Rescue the "Address in use" error
252
+ rescue Errno::EADDRINUSE
253
+ puts "RWD Startup: Port #{port} on host #{host} is already in use."
254
+ port=port +1
255
+ puts "trying port: #{port}"
256
+ # Rescue the "Address not available' error
257
+ rescue Errno::EADDRNOTAVAIL
258
+ puts "RWD Startup: Address #{host} is not available to bind."
259
+ port =port + 1
260
+ puts "trying port: #{port}"
261
+ # Rescue "permission denied errors
262
+ rescue Errno::EACCES
263
+ puts "RWD Startup: Access denied when binding interface addresses. ?"
264
+ port =port + 1
265
+ puts "trying port: #{port}"
266
+ # Rescue all other errors
267
+ rescue
268
+ puts "RWD Startup: An error occured."
269
+ port =port + 1
270
+ puts "trying port: #{port}"
271
+ # Rescue all other errors
272
+ end
273
+
274
+ end
275
+
276
+
277
+ RwdTinker.new( $rwd_gui_tinker ).serve(port) # start the main class and program
@@ -0,0 +1,24 @@
1
+ # rwdweliza - small applet to display one picture
2
+ gui/tinkerbackwindows/superant.com.words
3
+ gui/tinkerbackwindows/superant.com.rwdeliza
4
+ gui/tinkerbackwindows/superant.com.refreshwindow
5
+ code/superant.com.words
6
+ code/superant.com.rwdeliza
7
+ tests/gemspec-rwdweliza
8
+ tests/makedist-rwdweliza.rb
9
+ rwd_files/HowTo_Eliza.txt
10
+ configuration/rwdweliza-0.03.dist
11
+ configuration/rwdweliza-0.03.cnf
12
+ lib/linkparser
13
+ lib/dict.rb
14
+ lib/README
15
+ lib/linguistics
16
+ lib/linkparser.rb
17
+ lib/linguistics.rb
18
+ lib/hashslice.rb
19
+ ElizaData/database
20
+ lib/druida.rb
21
+ ElizaData/words
22
+ ElizaData/tiny.dict
23
+ ElizaData/responses
24
+
@@ -0,0 +1 @@
1
+ # this file does nothing
@@ -0,0 +1,58 @@
1
+ # English Language files for RwdTinker core
2
+
3
+ :applet_installed => '"applet installed!"',
4
+ :application_version => '"Application Version"',
5
+ :clear => "Clear",
6
+ :cancel => "Cancel",
7
+ :clickfor_version => "Click for Version" ,
8
+ :clickbelowtoviewlistof_zip => '"click below to view lists of zips"',
9
+ :documents => '"Documents"',
10
+ :edit => "edit" ,
11
+ :file_name => '"File Name:"',
12
+ :fill_record => '"Fill Record"',
13
+ :help => '"Help"',
14
+ :help_about => '"Help About"',
15
+ :install_applet => '"install (rwdtinker) applet"',
16
+ :jumptoapplication_location => '"Jump to Application Location"',
17
+ :list_applets => '"Remove Applets"',
18
+ :listappletsinthegem_directory => '"List applets in the Gem Directory"',
19
+ :listappletsavailablefor_installation => "List applets available for installation",
20
+ :list_files => '"List Files"',
21
+ :list_installed_gems => '"List installed Gems"' ,
22
+ :list_photos => '"List Photos"',
23
+ :list_zips => '"List Zips"',
24
+ :listzipdirappletsavailable => '"List (zip directory) applets available for installation"',
25
+ :menu_panel => '"Menu Panel"',
26
+ :module_unknown => '"Unknown Module"',
27
+ :next => '"Next"',
28
+ :open => "Open",
29
+ :open_document => '"Open Document"',
30
+ :openselectedhelp_about => '"Open selected help about"',
31
+ :reload_variables => '"Reload Variables"' ,
32
+ :remove_applet => '"remove applet"',
33
+ :return => "Return",
34
+ :rwdtinker_window_2 => "RwdTinker Window 2",
35
+ :rwdtinker => "RwdTinker",
36
+ :rwdtinker_back_window => '"RwdTinker Back Window"',
37
+ :rwdtinker_help => '"RwdTinker Help"',
38
+ :rwdtinker_help_window => '"RwdTinker Help Window"',
39
+ :showjump_links => '"Show Jump Links"',
40
+ :showdocument_list => '"Show Document List"',
41
+ :showhelpabout_links => '"Show Help About Links"',
42
+
43
+ :save => "Save" ,
44
+ :save_changes => '"Save Changes"',
45
+ :selection_panel => '"Menu Panel"',
46
+ :selection_tab => '"Menu Tab"',
47
+ :tinker_logo => "Tinker Logo",
48
+ :tinkerback_window => '"Tinker Back Window"',
49
+ :viewapplet_contents => '"View Applet Contents"',
50
+ :viewalreadyinstalled_applications => '"View already installed GEM applications"',
51
+ :viewinstalled_text => '"View Install Text"',
52
+ :view_platform => '"view platform"',
53
+ :viewplatform_information => '"View Platform Information"',
54
+ :view_event => '"View event"',
55
+ :viewinstall_text => '"View Install Text"' ,
56
+ :viewlistinstall_files => '"View List of Installed Files"',
57
+ :view_photo => '"View Photo"',
58
+ :window => "Window" ,