rwdlanguage 0.01
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.
- data/Readme.txt +475 -0
- data/bin/rwdlanguage +19 -0
- data/code/01rwdcore/01rwdcore.rb +29 -0
- data/code/01rwdcore/02helptexthashbegin.rb +16 -0
- data/code/01rwdcore/03helptexthash.rb +21 -0
- data/code/01rwdcore/jumplinkcommand.rb +36 -0
- data/code/01rwdcore/openhelpwindow.rb +38 -0
- data/code/01rwdcore/returntomain.rb +10 -0
- data/code/01rwdcore/rundocuments.rb +10 -0
- data/code/01rwdcore/runeditconfiguration.rb +10 -0
- data/code/01rwdcore/runhelpabout.rb +15 -0
- data/code/01rwdcore/runopentinkerdocument.rb +7 -0
- data/code/01rwdcore/runtab.rb +15 -0
- data/code/01rwdcore/rwdtinkerversion.rb +22 -0
- data/code/01rwdcore/rwdwindowreturn.rb +9 -0
- data/code/01rwdcore/selectiontab.rb +11 -0
- data/code/01rwdcore/setuphelpaboutoptions.rb +15 -0
- data/code/01rwdcore/setuptinkerdocuments.rb +7 -0
- data/code/01rwdcore/test_cases.rb +158 -0
- data/code/01rwdcore/test_harness.rb +20 -0
- data/code/01rwdcore/uploadreturns.rb +65 -0
- data/code/dd0viewphoto/dd0viewphoto.rb +5 -0
- data/code/superant.com.language/0uninstallapplet.rb +22 -0
- data/code/superant.com.language/googlelang.rb +25 -0
- data/code/superant.com.language/helptexthashload.rb +22 -0
- data/code/superant.com.language/loadconfigurationrecord.rb +22 -0
- data/code/superant.com.language/loadconfigurationvariables.rb +14 -0
- data/code/superant.com.language/openhelpwindow.rb +24 -0
- data/code/superant.com.language/rubySteak.rb +40 -0
- data/code/superant.com.language/runappletwindow.rb +12 -0
- data/code/superant.com.language/runrwdshellwindow.rb +12 -0
- data/code/superant.com.language/runrwdwordsbackwindow.rb +10 -0
- data/code/superant.com.language/rwdtinkerversion.rb +10 -0
- data/code/superant.com.language/saveconfigurationrecord.rb +20 -0
- data/code/superant.com.language/test_cases.rb +20 -0
- data/code/superant.com.rwdtinkerbackwindow/changelocale.rb +84 -0
- data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +169 -0
- data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +38 -0
- data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +20 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +12 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +55 -0
- data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +14 -0
- data/code/superant.com.rwdtinkerbackwindow/listzips.rb +37 -0
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +24 -0
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +14 -0
- data/code/superant.com.rwdtinkerbackwindow/network.rb +87 -0
- data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +40 -0
- data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +24 -0
- data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +46 -0
- data/code/superant.com.rwdtinkerbackwindow/removeappletvariables.rb +52 -0
- data/code/superant.com.rwdtinkerbackwindow/runremoteinstall.rb +11 -0
- data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +15 -0
- data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +13 -0
- data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/showlocaleoptions.rb +9 -0
- data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +23 -0
- data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +24 -0
- data/code/superant.com.rwdtinkerbackwindow/viewlogfile.rb +16 -0
- data/code/superant.com.thesaurus/clearhttpview3.rb +9 -0
- data/code/superant.com.thesaurus/listwordlookup.rb +37 -0
- data/code/superant.com.thesaurus/runappletwindow.rb +12 -0
- data/code/superant.com.words/dictlookup.rb +20 -0
- data/code/superant.com.words/runrwdwordsbackwindow.rb +10 -0
- data/code/superant.com.words/rwdtinkerversion.rb +10 -0
- data/code/zz0applicationend/zz0end.rb +5 -0
- data/configuration/rwdtinker.dist +15 -0
- data/configuration/rwdwlanguage.dist +21 -0
- data/configuration/tinkerwin2variables.dist +23 -0
- data/gui/00coreguibegin/applicationguitop.rwd +9 -0
- data/gui/frontwindow0/cc0openphoto.rwd +22 -0
- data/gui/frontwindowselections/00selectiontabbegin.rwd +11 -0
- data/gui/frontwindowselections/jumplinkcommands.rwd +15 -0
- data/gui/frontwindowselections/wwselectionend.rwd +3 -0
- data/gui/frontwindowtdocuments/00documentbegin.rwd +6 -0
- data/gui/frontwindowtdocuments/tinkerdocuments.rwd +14 -0
- data/gui/frontwindowtdocuments/zzdocumentend.rwd +8 -0
- data/gui/helpaboutbegin/zzzrwdlasttab.rwd +6 -0
- data/gui/helpaboutbegin/zzzzhelpscreenstart.rwd +3 -0
- data/gui/helpaboutbegin/zzzzzzhelpabouttab.rwd +15 -0
- data/gui/helpaboutzend/helpscreenend.rwd +3 -0
- data/gui/helpaboutzend/zhelpscreenstart2.rwd +3 -0
- data/gui/helpaboutzend/zzzzhelpabout2.rwd +15 -0
- data/gui/helpaboutzend/zzzzhelpscreen2end.rwd +3 -0
- data/gui/tinkerbackwindows/superant.com.language/1appname.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.language/22google.rwd +38 -0
- data/gui/tinkerbackwindows/superant.com.language/44germany.rwd +19 -0
- data/gui/tinkerbackwindows/superant.com.language/67viewconfiguration.rwd +27 -0
- data/gui/tinkerbackwindows/superant.com.language/77jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.language/z9end.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/1appname.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +41 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/45installremotezip.rwd +44 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistapplets.rwd +44 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/60editconfiguration.rwd +30 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +29 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/75rwdlogfile.rwd +20 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/80localechanger.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/81jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/9backend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd +31 -0
- data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/9end.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.versionwindow/1appname.rwd +19 -0
- data/gui/tinkerbackwindows/superant.com.versionwindow/helpaboutwindow.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.words/1appname.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.words/1dictionary.rwd +19 -0
- data/gui/tinkerbackwindows/superant.com.words/4thesaurus.rwd +36 -0
- data/gui/tinkerbackwindows/superant.com.words/77jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.words/z9end.rwd +6 -0
- data/gui/zzcoreguiend/yy9rwdend.rwd +4 -0
- data/init.rb +179 -0
- data/installed/rwdwlanguage.inf +24 -0
- data/installed/temp.rb +1 -0
- data/lang/en/rwdcore/en.po +197 -0
- data/lang/en/rwdlanguage/en.po +32 -0
- data/lang/es/rwdcore/es.po +184 -0
- data/lang/es/rwdlanguage/en.po +32 -0
- data/lang/fr/rwdcore/fr.po +169 -0
- data/lang/fr/rwdlanguage/en.po +32 -0
- data/lang/hi/rwdcore/hi.po +173 -0
- data/lang/hi/rwdlanguage/en.po +32 -0
- data/lang/ja/rwdcore/ja.po +171 -0
- data/lang/ja/rwdlanguage/en.po +32 -0
- data/lang/nl/rwdcore/nl.po +169 -0
- data/lang/nl/rwdlanguage/en.po +32 -0
- data/lib/dict.rb +438 -0
- data/lib/g_translate.rb +43 -0
- data/lib/g_translate/client.rb +84 -0
- data/lib/g_translate/translator.rb +57 -0
- data/lib/ger-eng.txt +111283 -0
- data/lib/oothesaurus.rb +76 -0
- data/lib/rconftool.rb +387 -0
- data/lib/rwd/browser.rb +123 -0
- data/lib/rwd/ftools.rb +174 -0
- data/lib/rwd/mime.rb +328 -0
- data/lib/rwd/net.rb +877 -0
- data/lib/rwd/ruby.rb +889 -0
- data/lib/rwd/rwd.rb +1425 -0
- data/lib/rwd/sgml.rb +236 -0
- data/lib/rwd/thread.rb +63 -0
- data/lib/rwd/tree.rb +371 -0
- data/lib/rwd/xml.rb +101 -0
- data/lib/rwdthemes/default.rwd +317 -0
- data/lib/rwdthemes/pda.rwd +72 -0
- data/lib/rwdthemes/windowslike.rwd +171 -0
- data/lib/rwdtinker/rwdcodedir.rb +56 -0
- data/lib/rwdtinker/rwdguidir.rb +57 -0
- data/lib/rwdtinker/rwdlangdir.rb +60 -0
- data/lib/rwdtinker/rwdtinkertools.rb +25 -0
- data/lib/zip/ioextras.rb +155 -0
- data/lib/zip/stdrubyext.rb +111 -0
- data/lib/zip/tempfile_bugfixed.rb +195 -0
- data/lib/zip/zip.rb +1847 -0
- data/lib/zip/zipfilesystem.rb +609 -0
- data/lib/zip/ziprequire.rb +90 -0
- data/rwd_files/HowTo_Language.txt +179 -0
- data/rwd_files/HowTo_Tinker.txt +515 -0
- data/rwd_files/HowTo_TinkerWin2.txt +202 -0
- data/rwd_files/Readme.txt +57 -0
- data/rwd_files/RubyWebDialogs.html +6 -0
- data/rwd_files/Tinkerhelptexthash.txt +84 -0
- data/rwd_files/favicon.ico +0 -0
- data/rwd_files/log/rwdtinker.log +726 -0
- data/rwd_files/rdoc-style.css +175 -0
- data/rwd_files/rwdapplications.html +76 -0
- data/rwd_files/rwdlanguagehelpfiles.txt +34 -0
- data/rwd_files/tinker.png +0 -0
- data/rwdconfig.dist +24 -0
- data/rwdlanguage.rb +1 -0
- data/tests/RubyGauge.rb +179 -0
- data/tests/checkdepends.sh +4 -0
- data/tests/cleancnf.sh +6 -0
- data/tests/makedist-rwdwlanguage.rb +56 -0
- data/tests/makedist.rb +66 -0
- data/tests/rdep.rb +354 -0
- data/tests/totranslate.lang +93 -0
- data/zips/rwdwcalc-0.63.zip +0 -0
- data/zips/rwdwfoldeditor-0.08.zip +0 -0
- data/zips/rwdwhypernote-0.16.zip +0 -0
- data/zips/rwdwlanguage-0.01.zip +0 -0
- data/zips/rwdwmovies-0.98.zip +0 -0
- data/zips/rwdwruby-1.08.zip +0 -0
- data/zips/temp.rb +1 -0
- data/zips/tinkerbellw-0.04.zip +0 -0
- data/zips/wrubyslippers-1.08.zip +0 -0
- metadata +246 -0
@@ -0,0 +1,19 @@
|
|
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
|
19
|
+
|
@@ -0,0 +1,40 @@
|
|
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 == "superantcomremotezipsinstall"
|
24
|
+
$help_topic = "remotegemapplet_install"
|
25
|
+
end
|
26
|
+
if @rwd_tab == "localechangertab"
|
27
|
+
$help_topic = "localechanger_help"
|
28
|
+
end
|
29
|
+
|
30
|
+
if @rwd_window != "rwdtinkerhelpwindow"
|
31
|
+
$previouswindow = @rwd_window
|
32
|
+
$previoustab = @rwd_tab
|
33
|
+
else
|
34
|
+
$previouswindow = @rwd_window
|
35
|
+
$previoustab = @rwd_tab
|
36
|
+
end
|
37
|
+
runhelpwindow
|
38
|
+
end
|
39
|
+
|
40
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# This tinker method is to retrieve the list of rwdzip applets available to install from the remote repository
|
2
|
+
def superantcomremotegemlist
|
3
|
+
gemcommandoption = "search --remote "
|
4
|
+
gemfilename = "rwdzip"
|
5
|
+
commandtext = "gem search --remote rwdzip"
|
6
|
+
commandtemp = $xpcommand + commandtext
|
7
|
+
begin # exception trapped block
|
8
|
+
|
9
|
+
tempremotegemappletsresult = `#{commandtemp} 2>&1`
|
10
|
+
@superantcomremotegemappletsfullresult = tempremotegemappletsresult
|
11
|
+
fileList = tempremotegemappletsresult.split(/\n/).delete_if { |x| ! (x =~ /\Arwdzip/) }
|
12
|
+
|
13
|
+
@superantcomremotegemappletsresult = fileList.rwd_method("superantcomremotegemappletdirsname")
|
14
|
+
rescue SystemCallError, StandardError
|
15
|
+
@superantcomremotegemappletsresult = "system call error: " + $!
|
16
|
+
end # exception rescue
|
17
|
+
end
|
18
|
+
|
19
|
+
def superantcomremotegemappletdirsname(inffile)
|
20
|
+
applet = inffile
|
21
|
+
@superantcominstallremoteappletinput = applet
|
22
|
+
|
23
|
+
end
|
24
|
+
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# method to remove a tinker applet
|
2
|
+
def removeapplet
|
3
|
+
require 'fileutils'
|
4
|
+
nametext = "%s" % [@a_removeapplet]
|
5
|
+
|
6
|
+
fileName = "installed/" + nametext + ".inf"
|
7
|
+
@appletremoveresult = removeappletvariables(nametext)
|
8
|
+
|
9
|
+
setuphelpaboutoptions # update the help about list
|
10
|
+
setuptinkerdocuments # update the document pull down list
|
11
|
+
runhelpwindow # update the help menu
|
12
|
+
showjumplinkoptions # update the application link menu
|
13
|
+
runrwdtinkerbackwindow # back to applet window
|
14
|
+
|
15
|
+
begin # exception trapped block
|
16
|
+
|
17
|
+
count = 0
|
18
|
+
fd = File.open(fileName,"r")
|
19
|
+
|
20
|
+
|
21
|
+
fd.each { |oneline|
|
22
|
+
if count == 1
|
23
|
+
if File.exist?(oneline.chop)
|
24
|
+
FileUtils.rm_rf( oneline.chop)
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
count = 1
|
29
|
+
}
|
30
|
+
fd.close
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
FileUtils.rm_rf( fileName)
|
35
|
+
|
36
|
+
|
37
|
+
@removeapplettext = "applet files removed!" + " " + @appletremoveresult
|
38
|
+
|
39
|
+
runbackwindowappletremove
|
40
|
+
|
41
|
+
rescue
|
42
|
+
@removeapplettext = " removeapplet" + " .."
|
43
|
+
|
44
|
+
end # exception rescue
|
45
|
+
|
46
|
+
end
|
@@ -0,0 +1,52 @@
|
|
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 "steven@superant.com".
|
22
|
+
#***********************************************************************/
|
23
|
+
|
24
|
+
def removeappletvariables(tempremovename)
|
25
|
+
|
26
|
+
begin # exception trapped block
|
27
|
+
|
28
|
+
$rwdtinkerlog.info "in removeappletvariables"
|
29
|
+
|
30
|
+
# removefileinf = File.open(tempremove){|f| f.read}
|
31
|
+
|
32
|
+
|
33
|
+
removemethod = tempremovename
|
34
|
+
|
35
|
+
|
36
|
+
send "#{removemethod}"
|
37
|
+
|
38
|
+
tmpremoveapplet = " successfull applet variable removal "
|
39
|
+
|
40
|
+
rescue
|
41
|
+
|
42
|
+
tmpremoveapplet = " removeappletvariables .."
|
43
|
+
|
44
|
+
end # exception rescue
|
45
|
+
|
46
|
+
return tmpremoveapplet
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
# This application is a framework for writing programs from RubyWebDialogs
|
3
|
+
# For information see http://www.rubyforge.net/projects/rwdapplications
|
4
|
+
|
5
|
+
# call the rwdtinker helpwindow
|
6
|
+
|
7
|
+
def runremotezipsinstall
|
8
|
+
@rwd_window = "tinkerbackwindow"
|
9
|
+
@rwd_tab = "superantcomremotezipsinstall"
|
10
|
+
end
|
11
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
# This application is a framework for writing programs from RubyWebDialogs
|
3
|
+
# For information see http://www.rubyforge.net/projects/rwdapplications
|
4
|
+
|
5
|
+
# call the rwdtinker helpwindow
|
6
|
+
|
7
|
+
def runrwdtinkerbackwindow
|
8
|
+
@rwd_window = "tinkerbackwindow"
|
9
|
+
@rwd_tab = "rwdzipslister"
|
10
|
+
end
|
11
|
+
|
12
|
+
def runbackwindowappletremove
|
13
|
+
@rwd_window = "tinkerbackwindow"
|
14
|
+
@rwd_tab = "filelister"
|
15
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
# This application is a framework for writing programs from RubyWebDialogs
|
3
|
+
# For information see http://www.rubyforge.net/projects/rwdapplications
|
4
|
+
|
5
|
+
# return the version constant defined in the config file
|
6
|
+
def runrwdtinkerwin2version
|
7
|
+
@rwd_window = "applicationversion"
|
8
|
+
@versionappnamedisplay = "RwdTinkerWin2"
|
9
|
+
@versioncopyrightdisplay = "(c) 2004 Steven Gibson "
|
10
|
+
@versionnumberdisplay = "Version " + RwdTinkerWin2Version
|
11
|
+
|
12
|
+
end
|
13
|
+
|
@@ -0,0 +1,19 @@
|
|
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_configurationfile
|
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
|
19
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
#view contents of a tinker applet
|
3
|
+
def viewappletcontents
|
4
|
+
require 'fileutils'
|
5
|
+
require 'lib/zip/zip'
|
6
|
+
nametext = "%s" % [@a_installapplet]
|
7
|
+
|
8
|
+
begin # exception trapped block
|
9
|
+
fullname = nametext + ".zip"
|
10
|
+
fileName = File.join($zipslocation,fullname)
|
11
|
+
tempfilecontents = " "
|
12
|
+
zf = Zip::ZipFile.new(fileName)
|
13
|
+
zf.sort.each {
|
14
|
+
|entry|
|
15
|
+
tempfilecontents = tempfilecontents + entry.to_s + "\n"
|
16
|
+
}
|
17
|
+
@appletcontentstext = tempfilecontents
|
18
|
+
|
19
|
+
rescue
|
20
|
+
@installapplettext = "unzip error - error opening applet"
|
21
|
+
end # exception rescue
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#view gem info
|
2
|
+
def viewgemappletcontents
|
3
|
+
require 'fileutils'
|
4
|
+
require 'lib/zip/zip'
|
5
|
+
nametext = "%s" % [@a_installapplet]
|
6
|
+
|
7
|
+
begin # exception trapped block
|
8
|
+
fullname = nametext + ".zip"
|
9
|
+
|
10
|
+
tempfilecontents = " "
|
11
|
+
zf = Zip::ZipFile.new(fullname)
|
12
|
+
zf.sort.each {
|
13
|
+
|entry|
|
14
|
+
tempfilecontents = tempfilecontents + entry.to_s + "\n"
|
15
|
+
}
|
16
|
+
@appletcontentstext = tempfilecontents
|
17
|
+
|
18
|
+
rescue
|
19
|
+
@installapplettext = "unzip error - error opening applet"
|
20
|
+
end # exception rescue
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#view the log on the tab
|
2
|
+
|
3
|
+
def rwdtinkerrunviewlog
|
4
|
+
require 'lib/rwdtinker/rwdtinkertools'
|
5
|
+
|
6
|
+
logfilelocation = File.join(LogDirectory, 'rwdtinker.log')
|
7
|
+
if @a_rwdtinkerlognumber == nil
|
8
|
+
@a_rwdtinkerlognumber = 11
|
9
|
+
|
10
|
+
end
|
11
|
+
|
12
|
+
@returnlogdisplay = RwdtinkerTools.tail(logfilelocation , @a_rwdtinkerlognumber.to_i)
|
13
|
+
|
14
|
+
|
15
|
+
end
|
16
|
+
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# this code is to list the word results
|
2
|
+
def fillthesaurusword(inffile)
|
3
|
+
applet = inffile
|
4
|
+
@a_thesaurusinput = applet
|
5
|
+
|
6
|
+
end
|
7
|
+
|
8
|
+
|
9
|
+
def listwordresults
|
10
|
+
require "lib/oothesaurus"
|
11
|
+
|
12
|
+
the=OOThesaurus.new()
|
13
|
+
history=[]
|
14
|
+
|
15
|
+
filepath = "rwd_files"
|
16
|
+
filepathidx = File.join(filepath,"idx")
|
17
|
+
filepathdat = File.join(filepath,"dat")
|
18
|
+
word = @a_thesaurusinput.downcase.strip
|
19
|
+
notesarray = the::dosearch(the,history,word,true,filepathidx,filepathdat)
|
20
|
+
|
21
|
+
finalarray = []
|
22
|
+
|
23
|
+
a_thesaurusdata = ""
|
24
|
+
notesarray.each { |x| x.each { |x2|
|
25
|
+
|
26
|
+
finalarray << x2 unless x2 == "(noun)" or x2 == "(verb)" or x2 == "(adj)"
|
27
|
+
}
|
28
|
+
|
29
|
+
}
|
30
|
+
@a_thesaurusdata = finalarray.entries.sort.rwd_method("fillthesaurusword")
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# Application Rwdtinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
# This application is a contact book
|
3
|
+
# For more information about see http://www.rubyforge.net/projects/rwdapplications
|
4
|
+
|
5
|
+
# call the window
|
6
|
+
def runrwdthesaurus
|
7
|
+
|
8
|
+
@rwd_window = "rwdwordsbackwindow"
|
9
|
+
@rwd_tab="superantcomthesaurus"
|
10
|
+
|
11
|
+
end
|
12
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# dictionary
|
2
|
+
def dictlookup
|
3
|
+
require 'lib/dict'
|
4
|
+
if ! @a_dictionaryinput.empty?
|
5
|
+
|
6
|
+
dict = DICT.new('dict.org', DICT::DEFAULT_PORT)
|
7
|
+
dict.client('a Ruby/DICT client')
|
8
|
+
definitions = dict.define(DICT::ALL_DATABASES, @a_dictionaryinput)
|
9
|
+
@dictionary_display = ""
|
10
|
+
if definitions
|
11
|
+
definitions.each do |d|
|
12
|
+
@dictionary_display = @dictionary_display + d.description + d.database + "\n"
|
13
|
+
d.definition.each { |line| @dictionary_display = @dictionary_display + line }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
dict.disconnect
|
18
|
+
@dictionary_display = @dictionary_display + "\n\n"
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Application RwdAddresses orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
# This application is a contact book
|
3
|
+
# For more information about see http://www.rubyforge.net/projects/rwdapplications
|
4
|
+
|
5
|
+
# call the window
|
6
|
+
def runrwdwordsbackwindow
|
7
|
+
@rwd_window = "rwdwordsbackwindow"
|
8
|
+
@rwd_tab = "sagdictlookup"
|
9
|
+
end
|
10
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
# This application is a framework for writing programs from RubyWebDialogs
|
3
|
+
# For information see http://www.rubyforge.net/projects/rwdapplications
|
4
|
+
|
5
|
+
# return the version constant defined in the config file
|
6
|
+
def rwdwordshelpaboutsetup
|
7
|
+
return ["RwdWords","(c) 2004,2005 Steven Gibson ","Version #{RwdWordsVersion}"]
|
8
|
+
end
|
9
|
+
|
10
|
+
|