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,171 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
$rwd_html["WINDOWSLOOKALIKE"] = "
|
4
|
+
<!-- Generated by RubyWebDialog. -->
|
5
|
+
<!-- For more information, please contact Erik Veenstra <rwd@erikveen.dds.nl>. -->
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>%TITLE%</title>
|
9
|
+
|
10
|
+
<meta http-equiv='Content-Type' content='text/html; charset=%CHARSET%'>
|
11
|
+
<meta http-equiv='Content-Style-Type' content='text/css; charset=UTF-8' >
|
12
|
+
<meta http-equiv='Refresh' content='%REFRESH%, javascript:document.bodyform.submit();'>
|
13
|
+
|
14
|
+
<link rel='shortcut icon' href='%LOGO%'>
|
15
|
+
|
16
|
+
<style type='text/css'>
|
17
|
+
<!--
|
18
|
+
|
19
|
+
body {
|
20
|
+
background : url(%WATERMARK%) white center center no-repeat fixed;
|
21
|
+
}
|
22
|
+
|
23
|
+
a {
|
24
|
+
text-decoration : none;
|
25
|
+
}
|
26
|
+
|
27
|
+
a:hover {
|
28
|
+
background : #AAAAAA;
|
29
|
+
}
|
30
|
+
|
31
|
+
td.window {
|
32
|
+
border-color : #EEEEEE #888888 #888888 #EEEEEE;
|
33
|
+
border-width : 3pt;
|
34
|
+
border-style : solid solid solid solid;
|
35
|
+
}
|
36
|
+
|
37
|
+
td.panel1 {
|
38
|
+
border-color : #888888 #EEEEEE #EEEEEE #888888;
|
39
|
+
border-width : 1pt;
|
40
|
+
border-style : solid solid solid solid;
|
41
|
+
}
|
42
|
+
|
43
|
+
td.panel2 {
|
44
|
+
border-color : #EEEEEE #888888 #888888 #EEEEEE;
|
45
|
+
border-width : 1pt;
|
46
|
+
border-style : solid solid solid solid;
|
47
|
+
}
|
48
|
+
|
49
|
+
td.panel1high {
|
50
|
+
border-color : #EEEEEE #888888 #888888 #EEEEEE;
|
51
|
+
border-width : 1pt;
|
52
|
+
border-style : solid solid solid solid;
|
53
|
+
}
|
54
|
+
|
55
|
+
td.panel2high {
|
56
|
+
border-color : #EEEEEE #888888 #888888 #EEEEEE;
|
57
|
+
border-width : 1pt;
|
58
|
+
border-style : none none none none;
|
59
|
+
}
|
60
|
+
|
61
|
+
td.panel1low {
|
62
|
+
border-color : #888888 #EEEEEE #EEEEEE #888888;
|
63
|
+
border-width : 1pt;
|
64
|
+
border-style : solid solid solid solid;
|
65
|
+
}
|
66
|
+
|
67
|
+
td.panel2low {
|
68
|
+
border-color : #888888 #EEEEEE #EEEEEE #888888;
|
69
|
+
border-width : 1pt;
|
70
|
+
border-style : none none none none;
|
71
|
+
}
|
72
|
+
|
73
|
+
td.tabblad {
|
74
|
+
border-color : #EEEEEE #888888 #888888 #EEEEEE;
|
75
|
+
border-width : 1pt;
|
76
|
+
border-style : none solid solid solid;
|
77
|
+
}
|
78
|
+
|
79
|
+
td.passivetab {
|
80
|
+
background-color : #BBBBBB;
|
81
|
+
border-color : #DDDDDD #DDDDDD #EEEEEE #DDDDDD;
|
82
|
+
border-width : 1pt;
|
83
|
+
border-style : solid solid solid solid;
|
84
|
+
}
|
85
|
+
|
86
|
+
td.activetab {
|
87
|
+
border-color : #EEEEEE #888888 #888888 #EEEEEE;
|
88
|
+
border-width : 1pt;
|
89
|
+
border-style : solid solid none solid;
|
90
|
+
}
|
91
|
+
|
92
|
+
td.notab {
|
93
|
+
border-color : #EEEEEE #EEEEEE #EEEEEE #EEEEEE;
|
94
|
+
border-width : 1pt;
|
95
|
+
border-style : none none solid none;
|
96
|
+
}
|
97
|
+
|
98
|
+
//-->
|
99
|
+
</style>
|
100
|
+
|
101
|
+
<script type='text/javascript'>
|
102
|
+
<!--
|
103
|
+
function BodyGo() {
|
104
|
+
$RWD_FOCUS$
|
105
|
+
}
|
106
|
+
//-->
|
107
|
+
</script>
|
108
|
+
</head>
|
109
|
+
|
110
|
+
<body bgcolor='white' onload='BodyGo()' link='#000000' vlink='#000000' alink='#000000'>
|
111
|
+
<form name='bodyform' action='/' method='post'>
|
112
|
+
<table align='center' border='0' cellspacing='0' cellpadding='0' width='100%' height='100%'>
|
113
|
+
<tr align='center' valign='middle'>
|
114
|
+
<td align='center'>
|
115
|
+
|
116
|
+
<table align='center' border='0' cellspacing='0' cellpadding='0'>
|
117
|
+
|
118
|
+
<tr align='center'>
|
119
|
+
<td align='center' class='window'>
|
120
|
+
|
121
|
+
<table align='center' border='0' cellspacing='0' cellpadding='0' %WIDTH1%>
|
122
|
+
<tr align='center'>
|
123
|
+
<td align='center' bgcolor='#444488'>
|
124
|
+
|
125
|
+
<table align='left' border='0' cellspacing='1' cellpadding='0'>
|
126
|
+
<tr align='center'>
|
127
|
+
<td align='border'><img src='%LOGO%' width='14' height='14'></td>
|
128
|
+
<td align='center'><b><small><font color='#FFFFFF'> %TITLE% </font></small></b></td>
|
129
|
+
</tr>
|
130
|
+
</table>
|
131
|
+
|
132
|
+
<table align='right' border='0' cellspacing='1' cellpadding='0'>
|
133
|
+
<tr align='center'>
|
134
|
+
<!-- %HELPBUTTON% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_help\";document.bodyform.submit();'> ? </a></small></b></td>
|
135
|
+
<!-- %BACKBUTTONS% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_main\";document.bodyform.submit();'> << </a></small></b></td>
|
136
|
+
<!-- %BACKBUTTONS% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_back\";document.bodyform.submit();'> < </a></small></b></td>
|
137
|
+
<!-- %CLOSEBUTTON% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_quit\";document.bodyform.submit();'> X </a></small></b></td>
|
138
|
+
</tr>
|
139
|
+
</table>
|
140
|
+
|
141
|
+
</td>
|
142
|
+
</tr>
|
143
|
+
|
144
|
+
<tr align='center'>
|
145
|
+
<td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='%WIDTH2%'></td>
|
146
|
+
</tr>
|
147
|
+
|
148
|
+
<tr align='center'>
|
149
|
+
<td align='center' bgcolor='#CCCCCC'>
|
150
|
+
<table align='center' border='0' cellspacing='3' cellpadding='0'>
|
151
|
+
%BODY%
|
152
|
+
</table>
|
153
|
+
|
154
|
+
<input name='rwd_action' value='$RWD_FIRSTACTION$' type='hidden'>
|
155
|
+
<input name='rwd_session' value='$RWD_SESSION$' type='hidden'>
|
156
|
+
</td>
|
157
|
+
</tr>
|
158
|
+
</table>
|
159
|
+
|
160
|
+
</td>
|
161
|
+
</tr>
|
162
|
+
|
163
|
+
</table>
|
164
|
+
|
165
|
+
</td>
|
166
|
+
</tr>
|
167
|
+
</table>
|
168
|
+
</form>
|
169
|
+
</body>
|
170
|
+
</html>
|
171
|
+
"
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# part of rwdtinker smalllinux@gmail.com
|
2
|
+
# copyleft gpl 2008 Steven Gibson
|
3
|
+
|
4
|
+
require 'lib/rwdtinker/rwdtinkertools'
|
5
|
+
|
6
|
+
tmpmodload = '
|
7
|
+
def RwdtinkerTools.findfilesp(d)
|
8
|
+
|
9
|
+
a = Array.new(Dir[d].entries.sort)
|
10
|
+
#loop through and get the files names
|
11
|
+
a.each do |x|
|
12
|
+
#adjust the filters to the files you want to see...
|
13
|
+
if(!test(?d,x))
|
14
|
+
# only rwd files
|
15
|
+
if x =~ /rb|rwd|txt/
|
16
|
+
fileA=File.open("#{x}","r") #opens the file thats in fileName as read only
|
17
|
+
@@tempdoc+=fileA.read #reads the file into the doc string
|
18
|
+
fileA.close
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
def RwdtinkerTools.findprogramfiles(codedir, specificdir = "")
|
26
|
+
@@tempdoc = ""
|
27
|
+
#get a list of the files and subdirectories on the starting directory only
|
28
|
+
a = Array.new(Dir[codedir].entries.sort)
|
29
|
+
#loop through the list, ignore the files and add all new directories found
|
30
|
+
a.each do |x|
|
31
|
+
#if a directory...
|
32
|
+
if(test(?d,x))
|
33
|
+
# add to the original list of directories
|
34
|
+
@@root = x + "/**"
|
35
|
+
#adds the new ones to the array
|
36
|
+
b = Dir[@@root].entries.sort
|
37
|
+
b.each do |x|
|
38
|
+
if(test(?d,x))
|
39
|
+
a.push(x) #appends to the end of the array...
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
a.each do |x|
|
45
|
+
#if it is a file...
|
46
|
+
if(!test(?d,x))
|
47
|
+
a.delete(x)
|
48
|
+
else #it is a directory...
|
49
|
+
findfilesp(x + "/**")
|
50
|
+
end
|
51
|
+
end
|
52
|
+
return @@tempdoc
|
53
|
+
end
|
54
|
+
'
|
55
|
+
|
56
|
+
RwdtinkerTools.module_eval(tmpmodload)
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# part of rwdtinker smalllinux@gmail.com
|
2
|
+
# copyleft gpl 2008 Steven Gibson
|
3
|
+
|
4
|
+
require 'lib/rwdtinker/rwdtinkertools'
|
5
|
+
|
6
|
+
tmpmodload = '
|
7
|
+
def RwdtinkerTools.loadguifile(d)
|
8
|
+
|
9
|
+
a = Array.new(Dir[d].entries.sort)
|
10
|
+
#loop through and get the files names
|
11
|
+
a.each do |x|
|
12
|
+
#adjust the filters to the files you want to see...
|
13
|
+
if(!test(?d,x))
|
14
|
+
# only rwd files
|
15
|
+
if x =~ /rb|rwd|txt/
|
16
|
+
|
17
|
+
load x #opens the file thats in fileName and reads it
|
18
|
+
@@tempdoc += $rwdguivar # adds the file into the doc string
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def RwdtinkerTools.findguifiles(guidir)
|
25
|
+
@@tempdoc = ""
|
26
|
+
#get a list of the files and subdirectories on the starting directory only
|
27
|
+
a = Array.new(Dir[guidir].entries.sort)
|
28
|
+
#loop through the list, ignore the files and add all new directories found
|
29
|
+
a.each do |x|
|
30
|
+
#if a directory...
|
31
|
+
if(test(?d,x))
|
32
|
+
#use this new dir find to add to the original list of directories
|
33
|
+
@@root = x + "/**"
|
34
|
+
#adds the new ones to the array
|
35
|
+
b = Dir[@@root].entries.sort
|
36
|
+
b.each do |x|
|
37
|
+
if(test(?d,x))
|
38
|
+
a.push(x) #appends to the end of the array...
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
a.each do |x|
|
44
|
+
#if it is a file...
|
45
|
+
if(!test(?d,x))
|
46
|
+
a.delete(x)
|
47
|
+
|
48
|
+
else #it is a directory...
|
49
|
+
loadguifile(x + "/**")
|
50
|
+
end
|
51
|
+
end
|
52
|
+
return @@tempdoc
|
53
|
+
|
54
|
+
end
|
55
|
+
'
|
56
|
+
|
57
|
+
RwdtinkerTools.module_eval(tmpmodload)
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# part of rwdtinker smalllinux@gmail.com
|
2
|
+
# copyleft gpl 2008 Steven Gibson
|
3
|
+
|
4
|
+
require 'lib/rwdtinker/rwdtinkertools'
|
5
|
+
|
6
|
+
tmpmodload = '
|
7
|
+
def RwdtinkerTools.findfilest(d)
|
8
|
+
a = Array.new(Dir[d].entries.sort)
|
9
|
+
#loop through and get the files names
|
10
|
+
a.each do |x|
|
11
|
+
#adjust the filters to the files you want to see...
|
12
|
+
if(!test(?d,x))
|
13
|
+
# only rwd files
|
14
|
+
if x =~ /rb|po|txt/
|
15
|
+
fileA=File.open("#{x}","r") #opens the file thats in fileName as read only
|
16
|
+
@@tempdoc+=fileA.read #reads the file into the doc string
|
17
|
+
fileA.close
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
|
25
|
+
def RwdtinkerTools.findlanguagefiles(langdir,lang)
|
26
|
+
@@tempdoc = ""
|
27
|
+
|
28
|
+
startlangdir = File.join(langdir,lang)
|
29
|
+
#get a list of the files and subdirectories on the starting directory only
|
30
|
+
alanghash = Array.new(Dir[startlangdir].entries.sort)
|
31
|
+
#loop through the list, ignore the files and add all new directories found
|
32
|
+
alanghash.each do |x|
|
33
|
+
#if a directory...
|
34
|
+
if(test(?d,x))
|
35
|
+
# add to the original list of directories
|
36
|
+
@@tmproot = x + "/**"
|
37
|
+
#adds the new ones to the array
|
38
|
+
blanghash = Dir[@@tmproot].entries.sort
|
39
|
+
blanghash.each do |x|
|
40
|
+
if(test(?d,x))
|
41
|
+
alanghash.push(x) #appends to the end of the array...
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
alanghash.each do |x|
|
47
|
+
#if it is a file...
|
48
|
+
if(!test(?d,x))
|
49
|
+
alanghash.delete(x)
|
50
|
+
else #it is a directory...
|
51
|
+
findfilest(x + "/**")
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
return @@tempdoc
|
56
|
+
|
57
|
+
end
|
58
|
+
'
|
59
|
+
|
60
|
+
RwdtinkerTools.module_eval(tmpmodload)
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# part of rwdtinker smalllinux@gmail.com
|
2
|
+
# copyleft gpl 2008 Steven Gibson
|
3
|
+
|
4
|
+
module RwdtinkerTools
|
5
|
+
|
6
|
+
# tools to use in rwdtinker
|
7
|
+
|
8
|
+
def RwdtinkerTools.tail(filename, lines=12)
|
9
|
+
|
10
|
+
|
11
|
+
begin
|
12
|
+
tmpFile = File.open(filename, 'r')
|
13
|
+
|
14
|
+
return tmpFile.readlines.reverse!.slice(0,lines)
|
15
|
+
|
16
|
+
tmpFile.close
|
17
|
+
rescue
|
18
|
+
return "error in opening log"
|
19
|
+
$rwdtinkerlog.error "RwdtinkerTools.tail: file open error"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
|
data/lib/zip/ioextras.rb
ADDED
@@ -0,0 +1,155 @@
|
|
1
|
+
module IOExtras #:nodoc:
|
2
|
+
|
3
|
+
CHUNK_SIZE = 32768
|
4
|
+
|
5
|
+
RANGE_ALL = 0..-1
|
6
|
+
|
7
|
+
def self.copy_stream(ostream, istream)
|
8
|
+
s = ''
|
9
|
+
ostream.write(istream.read(CHUNK_SIZE, s)) until istream.eof?
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
# Implements kind_of? in order to pretend to be an IO object
|
14
|
+
module FakeIO
|
15
|
+
def kind_of?(object)
|
16
|
+
object == IO || super
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
# Implements many of the convenience methods of IO
|
21
|
+
# such as gets, getc, readline and readlines
|
22
|
+
# depends on: input_finished?, produce_input and read
|
23
|
+
module AbstractInputStream
|
24
|
+
include Enumerable
|
25
|
+
include FakeIO
|
26
|
+
|
27
|
+
def initialize
|
28
|
+
super
|
29
|
+
@lineno = 0
|
30
|
+
@outputBuffer = ""
|
31
|
+
end
|
32
|
+
|
33
|
+
attr_accessor :lineno
|
34
|
+
|
35
|
+
def read(numberOfBytes = nil, buf = nil)
|
36
|
+
tbuf = nil
|
37
|
+
|
38
|
+
if @outputBuffer.length > 0
|
39
|
+
if numberOfBytes <= @outputBuffer.length
|
40
|
+
tbuf = @outputBuffer.slice!(0, numberOfBytes)
|
41
|
+
else
|
42
|
+
numberOfBytes -= @outputBuffer.length if (numberOfBytes)
|
43
|
+
rbuf = sysread(numberOfBytes, buf)
|
44
|
+
tbuf = @outputBuffer
|
45
|
+
tbuf << rbuf if (rbuf)
|
46
|
+
@outputBuffer = ""
|
47
|
+
end
|
48
|
+
else
|
49
|
+
tbuf = sysread(numberOfBytes, buf)
|
50
|
+
end
|
51
|
+
|
52
|
+
return nil unless (tbuf)
|
53
|
+
|
54
|
+
if buf
|
55
|
+
buf.replace(tbuf)
|
56
|
+
else
|
57
|
+
buf = tbuf
|
58
|
+
end
|
59
|
+
|
60
|
+
buf
|
61
|
+
end
|
62
|
+
|
63
|
+
def readlines(aSepString = $/)
|
64
|
+
retVal = []
|
65
|
+
each_line(aSepString) { |line| retVal << line }
|
66
|
+
return retVal
|
67
|
+
end
|
68
|
+
|
69
|
+
def gets(aSepString=$/)
|
70
|
+
@lineno = @lineno.next
|
71
|
+
return read if aSepString == nil
|
72
|
+
aSepString="#{$/}#{$/}" if aSepString == ""
|
73
|
+
|
74
|
+
bufferIndex=0
|
75
|
+
while ((matchIndex = @outputBuffer.index(aSepString, bufferIndex)) == nil)
|
76
|
+
bufferIndex=@outputBuffer.length
|
77
|
+
if input_finished?
|
78
|
+
return @outputBuffer.empty? ? nil : flush
|
79
|
+
end
|
80
|
+
@outputBuffer << produce_input
|
81
|
+
end
|
82
|
+
sepIndex=matchIndex + aSepString.length
|
83
|
+
return @outputBuffer.slice!(0...sepIndex)
|
84
|
+
end
|
85
|
+
|
86
|
+
def flush
|
87
|
+
retVal=@outputBuffer
|
88
|
+
@outputBuffer=""
|
89
|
+
return retVal
|
90
|
+
end
|
91
|
+
|
92
|
+
def readline(aSepString = $/)
|
93
|
+
retVal = gets(aSepString)
|
94
|
+
raise EOFError if retVal == nil
|
95
|
+
return retVal
|
96
|
+
end
|
97
|
+
|
98
|
+
def each_line(aSepString = $/)
|
99
|
+
while true
|
100
|
+
yield readline(aSepString)
|
101
|
+
end
|
102
|
+
rescue EOFError
|
103
|
+
end
|
104
|
+
|
105
|
+
alias_method :each, :each_line
|
106
|
+
end
|
107
|
+
|
108
|
+
|
109
|
+
# Implements many of the output convenience methods of IO.
|
110
|
+
# relies on <<
|
111
|
+
module AbstractOutputStream
|
112
|
+
include FakeIO
|
113
|
+
|
114
|
+
def write(data)
|
115
|
+
self << data
|
116
|
+
data.to_s.length
|
117
|
+
end
|
118
|
+
|
119
|
+
|
120
|
+
def print(*params)
|
121
|
+
self << params.to_s << $\.to_s
|
122
|
+
end
|
123
|
+
|
124
|
+
def printf(aFormatString, *params)
|
125
|
+
self << sprintf(aFormatString, *params)
|
126
|
+
end
|
127
|
+
|
128
|
+
def putc(anObject)
|
129
|
+
self << case anObject
|
130
|
+
when Fixnum then anObject.chr
|
131
|
+
when String then anObject
|
132
|
+
else raise TypeError, "putc: Only Fixnum and String supported"
|
133
|
+
end
|
134
|
+
anObject
|
135
|
+
end
|
136
|
+
|
137
|
+
def puts(*params)
|
138
|
+
params << "\n" if params.empty?
|
139
|
+
params.flatten.each {
|
140
|
+
|element|
|
141
|
+
val = element.to_s
|
142
|
+
self << val
|
143
|
+
self << "\n" unless val[-1,1] == "\n"
|
144
|
+
}
|
145
|
+
end
|
146
|
+
|
147
|
+
end
|
148
|
+
|
149
|
+
end # IOExtras namespace module
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
# Copyright (C) 2002-2004 Thomas Sondergaard
|
154
|
+
# rubyzip is free software; you can redistribute it and/or
|
155
|
+
# modify it under the terms of the ruby license.
|