rwdgutenberg 0.09 → 0.12
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 +20 -7
- data/code/01rwdcore/01rwdcore.rb +3 -0
- data/code/01rwdcore/openhelpwindow.rb +1 -1
- data/code/01rwdcore/runopentinkerdocument.rb +1 -1
- data/code/01rwdcore/rwdtinkerversion.rb +1 -1
- data/code/superant.com.gutenberg/0uninstallapplet.rb +17 -11
- data/code/superant.com.gutenberg/changegutenbergname.rb +2 -2
- data/code/superant.com.gutenberg/clearbookscreendisplay.rb +5 -5
- data/code/superant.com.gutenberg/cleargutenbergfiles.rb +0 -0
- data/code/superant.com.gutenberg/cleargutrecordfiles.rb +0 -0
- data/code/superant.com.gutenberg/copyfilename.rb +2 -2
- data/code/superant.com.gutenberg/createnewnote.rb +13 -12
- data/code/superant.com.gutenberg/deletegutenbergrecord.rb +9 -8
- data/code/superant.com.gutenberg/gutenbergcreatefile.rb +22 -10
- data/code/superant.com.gutenberg/helptexthashload.rb +21 -0
- data/code/superant.com.gutenberg/launchurl.rb +13 -0
- data/code/superant.com.gutenberg/listdirectories.rb +32 -0
- data/code/superant.com.gutenberg/listnamerecord.rb +10 -10
- data/code/superant.com.gutenberg/listnotedirshtml3.rb +57 -0
- data/code/superant.com.gutenberg/listtextfilesgutenberg.rb +72 -47
- data/code/superant.com.gutenberg/loadbookrecord.rb +55 -17
- data/code/superant.com.gutenberg/loadconfigurationrecord.rb +4 -4
- data/code/superant.com.gutenberg/loadconfigurationvariables.rb +19 -9
- data/code/superant.com.gutenberg/loadhtmlnoterecord.rb +31 -0
- data/code/superant.com.gutenberg/openhelpwindowgutenberg.rb +8 -2
- data/code/superant.com.gutenberg/resetdir.rb +7 -0
- data/code/superant.com.gutenberg/runbackwindow.rb +16 -10
- data/code/superant.com.gutenberg/rungutenbergwindow.rb +89 -71
- data/code/superant.com.gutenberg/rwdgutenbergbackward.rb +27 -27
- data/code/superant.com.gutenberg/rwdtinkerversion.rb +10 -10
- data/code/superant.com.gutenberg/saveconfigurationrecord.rb +4 -4
- data/code/superant.com.gutenberg/savegutenbergrecord.rb +13 -11
- data/code/superant.com.gutenberg/updir.rb +7 -0
- data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +110 -108
- data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +10 -8
- data/code/superant.com.rwdtinkerbackwindow/listzips.rb +8 -2
- data/code/superant.com.rwdtinkerbackwindow/removeappletvariables.rb +6 -6
- data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +1 -1
- data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +1 -1
- data/code/superant.com.rwdtinkerbackwindow/viewlogfile.rb +13 -0
- data/configuration/rwdtinker.dist +4 -8
- data/configuration/rwdwgutenberg.dist +23 -0
- data/configuration/tinkerwin2variables.dist +17 -7
- data/gui/00coreguibegin/applicationguitop.rwd +1 -1
- data/gui/frontwindow0/{viewlogo/cc0openphoto.rwd → cc0openphoto.rwd} +0 -0
- data/gui/{frontwindowselectionbegin/selectiontabbegin → frontwindowselections}/00selectiontabbegin.rwd +0 -0
- data/gui/frontwindowselections/jumplinkcommands.rwd +15 -0
- data/gui/{frontwindowselectionzend/viewselectionzend → frontwindowselections}/wwselectionend.rwd +0 -0
- data/gui/{frontwindowselectionzend/viewselectionzend/zzdocumentbegin.rwd → frontwindowtdocuments/00documentbegin.rwd} +0 -0
- data/gui/frontwindowtdocuments/{superant.com.documents/tinkerdocuments.rwd → tinkerdocuments.rwd} +0 -0
- data/gui/{helpaboutbegin/superant.com.helpaboutbegin → frontwindowtdocuments}/zzdocumentend.rwd +0 -0
- data/gui/helpaboutbegin/{superant.com.helpaboutbegin/zzzrwdlasttab.rwd → zzzrwdlasttab.rwd} +0 -0
- data/gui/helpaboutbegin/{superant.com.helpaboutbegin/zzzzhelpscreenstart.rwd → zzzzhelpscreenstart.rwd} +0 -0
- data/gui/{helpaboutinstalled/superant.com.tinkerhelpabout/helpabouttab.rwd → helpaboutbegin/zzzzzzhelpabouttab.rwd} +0 -0
- data/gui/helpaboutzend/{superant.com.helpaboutend/helpscreenend.rwd → helpscreenend.rwd} +0 -0
- data/gui/helpaboutzend/{superant.com.helpaboutend/zhelpscreenstart2.rwd → zhelpscreenstart2.rwd} +0 -0
- data/gui/helpaboutzend/{superant.com.helpaboutend/zzzzhelpabout2.rwd → zzzzhelpabout2.rwd} +0 -0
- data/gui/helpaboutzend/{superant.com.helpaboutend/zzzzhelpscreen2end.rwd → zzzzhelpscreen2end.rwd} +0 -0
- data/gui/tinkerbackwindows/superant.com.backgutenberg/10appletbegin.rwd +4 -0
- data/gui/tinkerbackwindows/{superant.com.gutenberg → superant.com.backgutenberg}/1tabfirst.rwd +0 -0
- data/gui/tinkerbackwindows/{superant.com.gutenberg → superant.com.backgutenberg}/20listfiles.rwd +5 -4
- data/gui/tinkerbackwindows/{superant.com.gutenberg → superant.com.backgutenberg}/30booklistutilities.rwd +0 -0
- data/gui/tinkerbackwindows/superant.com.backgutenberg/35displaytab.rwd +26 -0
- data/gui/tinkerbackwindows/{superant.com.gutenberg → superant.com.backgutenberg}/67viewconfiguration.rwd +0 -0
- data/gui/{frontwindowselections/superant.com.rwdtinkerwin2selectiontab/jumplinkcommands.rwd → tinkerbackwindows/superant.com.backgutenberg/81jumplinkcommands.rwd} +2 -0
- data/gui/tinkerbackwindows/superant.com.backgutenberg/9end.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/10htmlnote.rwd +46 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/12tabfirst.rwd +39 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/35displaytab.rwd +4 -1
- data/gui/tinkerbackwindows/superant.com.gutenberg/50listfiles.rwd +37 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/81jumplinkcommands.rwd +1 -1
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/75rwdlogfile.rwd +20 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/81jumplinkcommands.rwd +1 -1
- data/gui/zzcoreguiend/{tinkerapplicationguiend/yy9rwdend.rwd → yy9rwdend.rwd} +0 -0
- data/init.rb +15 -10
- data/installed/gutenbergdata02.inf +2 -2
- data/installed/{rwdwgutenberg-0.09.inf → rwdwgutenberg.inf} +3 -2
- data/lang/en/rwdcore/languagefile.rb +4 -3
- data/lang/es/rwdcore/languagefile-es.rb +1 -0
- data/lang/fr/rwdcore/languagefile.rb +1 -0
- data/lang/jp/rwdcore/languagefile.rb +1 -0
- data/lang/nl/rwdcore/languagefile.rb +1 -0
- data/{extras → lib}/rconftool.rb +13 -6
- data/{ev → lib/rwd}/browser.rb +2 -2
- data/{ev → lib/rwd}/ftools.rb +0 -0
- data/{ev → lib/rwd}/mime.rb +0 -0
- data/{ev → lib/rwd}/net.rb +18 -7
- data/{ev → lib/rwd}/ruby.rb +1 -1
- data/{ev → lib/rwd}/rwd.rb +108 -625
- data/{ev → lib/rwd}/sgml.rb +1 -1
- data/{ev → lib/rwd}/thread.rb +1 -1
- data/{ev → lib/rwd}/tree.rb +2 -2
- data/{ev → lib/rwd}/xml.rb +1 -1
- data/lib/rwdthemes/default.rwd +317 -0
- data/lib/rwdthemes/pda.rwd +72 -0
- data/lib/rwdthemes/windowslike.rwd +171 -0
- data/lib/rwdtinker/rwdtinkertools.rb +24 -0
- data/{extras → lib}/zip/ioextras.rb +0 -0
- data/{extras → lib}/zip/stdrubyext.rb +0 -0
- data/{extras → lib}/zip/tempfile_bugfixed.rb +0 -0
- data/{extras → lib}/zip/zip.rb +2 -2
- data/{extras → lib}/zip/zipfilesystem.rb +0 -0
- data/{extras → lib}/zip/ziprequire.rb +0 -0
- data/rwd_files/Books/marip10.lnk +6 -0
- data/{Books → rwd_files/Books}/marip10.txt +0 -0
- data/{Books → rwd_files/Books}/shannon1948.html +0 -0
- data/{Books/Shannon.gut → rwd_files/Books/shannon1948.lnk} +1 -1
- data/rwd_files/Books/shannon1948.txt +2667 -0
- data/rwd_files/HowTo_Gutenberg.txt +21 -1
- data/rwd_files/HowTo_Tinker.txt +58 -1
- data/rwd_files/log/rwdtinker.log +2082 -0
- data/{code/superant.com.gutenberg/helptexthashrwdgutenberg.rb → rwd_files/rwdgutenberghelpfiles.txt} +26 -19
- data/rwdconfig.dist +14 -13
- data/tests/makedist-rwdwgutenberg.rb +9 -7
- data/tests/makedist.rb +2 -2
- data/zips/rwdwcalc-0.63.zip +0 -0
- data/zips/rwdwfoldeditor-0.05.zip +0 -0
- data/zips/rwdwgutenberg-0.12.zip +0 -0
- data/zips/rwdwruby-1.08.zip +0 -0
- data/zips/wrubyslippers-1.07.zip +0 -0
- metadata +74 -59
- data/Books/Mariposa.gut +0 -6
- data/code/superant.com.gutenberg/rwdhypernotehelpabout.rb +0 -14
- data/code/superant.com.rwdtinkerbackwindow/installapplet.rb +0 -27
- data/configuration/language.dist +0 -8
- data/configuration/rwdapplicationidentity.dist +0 -3
- data/configuration/rwdwgutenberg-0.09.dist +0 -20
- data/gui/tinkerbackwindows/superant.com.gutenberg/36displaytab.rwd +0 -15
- data/gui/tinkerbackwindows/superant.com.gutenberg/40rwdgutenberg.rwd +0 -16
- data/gui/tinkerbackwindows/superant.com.gutenberg/40rwdgutenberghtml.rwd +0 -16
- data/lib/temp.rb +0 -1
data/Readme.txt
CHANGED
|
@@ -19,13 +19,6 @@ ruby init.rb
|
|
|
19
19
|
Then point your web browser to:
|
|
20
20
|
http://localhost:7705/
|
|
21
21
|
|
|
22
|
-
Change language at:
|
|
23
|
-
|
|
24
|
-
configuration/language.dist
|
|
25
|
-
|
|
26
|
-
Change to Windows XP directory structure at:
|
|
27
|
-
configuration/tinkerwin2variables.dist
|
|
28
|
-
|
|
29
22
|
== Viewing installed Applets:
|
|
30
23
|
|
|
31
24
|
Go to "List Scripts" tab
|
|
@@ -234,6 +227,26 @@ http://www.erikveen.dds.nl/rubywebdialogs/index.html
|
|
|
234
227
|
Thanks, Steven Gibson
|
|
235
228
|
|
|
236
229
|
== Changelog
|
|
230
|
+
Version 1.77
|
|
231
|
+
Fixed zips location to be relative or absolute
|
|
232
|
+
Made themes loadable
|
|
233
|
+
|
|
234
|
+
Version 1.76
|
|
235
|
+
Move rwd code files into lib directory - bug - 21886
|
|
236
|
+
change tab name list applets - bug - 21864
|
|
237
|
+
change extra folder to be lib folder - bug 21887
|
|
238
|
+
remove duplicate intall applet code - bug 21885
|
|
239
|
+
On Menu tab/Selection Tab - add help button - bug 21884
|
|
240
|
+
clean up directory structure in gui directory - bug 21882
|
|
241
|
+
|
|
242
|
+
Version 1.75
|
|
243
|
+
change rwd.rb to use UTF-8 for web pages
|
|
244
|
+
add language load for applets
|
|
245
|
+
|
|
246
|
+
Version 1.74
|
|
247
|
+
remove remote control from help
|
|
248
|
+
more dependable gui loading for applets
|
|
249
|
+
|
|
237
250
|
Version 1.73
|
|
238
251
|
more debug info in initiateapplet
|
|
239
252
|
remove gutenberg lang translations
|
data/code/01rwdcore/01rwdcore.rb
CHANGED
|
@@ -4,12 +4,15 @@
|
|
|
4
4
|
# For more information about RwdTinker see http://www.rubyforge.net/projects/rwdapplications
|
|
5
5
|
# This class is the top class for the RwdTinker application
|
|
6
6
|
|
|
7
|
+
$DEBUG=false
|
|
8
|
+
$VERBOSE=false
|
|
7
9
|
|
|
8
10
|
class RwdTinker < RWDialog
|
|
9
11
|
|
|
10
12
|
def main
|
|
11
13
|
@rwd_window = "main"
|
|
12
14
|
@result = "idle"
|
|
15
|
+
|
|
13
16
|
@display= "idle"
|
|
14
17
|
if TestNow
|
|
15
18
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# this code is to call the help window
|
|
2
2
|
def runhelpwindow
|
|
3
|
-
$helptopicsarray = $helptopicsarray | ["applet_installation","applet_viewing","applet_tinkerbackeditconfiguration"
|
|
3
|
+
$helptopicsarray = $helptopicsarray | ["applet_installation","applet_viewing","applet_tinkerbackeditconfiguration"]
|
|
4
4
|
|
|
5
5
|
if @rwd_window == "main"
|
|
6
6
|
if @rwd_tab == "documentsrwdtinkerone"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# open document for rwdtinker application
|
|
2
2
|
def runopentinkerdocument
|
|
3
3
|
|
|
4
|
-
tinkerdocumenturl = "http://localhost
|
|
4
|
+
tinkerdocumenturl = "http://localhost:#{$port}/" + @a_tinkerdocumentinput
|
|
5
5
|
Thread.new( tinkerdocumenturl){ |t| `#{Browser_Exe} #{tinkerdocumenturl}` }
|
|
6
6
|
end
|
|
7
7
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# return the version constant defined in the config file
|
|
6
6
|
def tinkerhelpaboutsetup
|
|
7
|
-
return ["RwdTinker","(c) 2004 Steven Gibson ","Version #{RwdTinkerVersion}"]
|
|
7
|
+
return ["RwdTinker","(c) 2004-2008 Steven Gibson ","Version #{RwdTinkerVersion}"]
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
def runrwdtinkerversion
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
$
|
|
4
|
-
|
|
5
|
-
Helptext.delete_if {|key, value| key == :
|
|
6
|
-
Helptext.delete_if {|key, value| key == :
|
|
7
|
-
Helptext.delete_if {|key, value| key == :
|
|
8
|
-
|
|
9
|
-
$rwdjumplink.delete_if {|x| x == "
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
def rwdwgutenberg()
|
|
2
|
+
$tinkerdocumentsarray.delete_if {|x| x == "HowTo_Gutenberg.txt"}
|
|
3
|
+
$tinkerhelpaboutarray.delete_if {|x| x == "RwdGutenberg"}
|
|
4
|
+
Helptext.delete_if {|key, value| key == :rwdgutenberg_generalhelp}
|
|
5
|
+
Helptext.delete_if {|key, value| key == :gutenbergedit_help }
|
|
6
|
+
Helptext.delete_if {|key, value| key == :gutenbergutility_help }
|
|
7
|
+
Helptext.delete_if {|key, value| key == :rwdgutenberg_configuration }
|
|
8
|
+
$rwdjumplink.delete_if {|x| x == "RwdGutenbergMainWindow"}
|
|
9
|
+
$rwdjumplink.delete_if {|x| x == "GutenbergBackWindow"}
|
|
10
|
+
if DeleteGutenbergConfig
|
|
11
|
+
|
|
12
|
+
fileName = File.join("configuration","rwdwgutenberg.cnf")
|
|
13
|
+
File.delete(fileName)
|
|
14
|
+
end
|
|
15
|
+
return true
|
|
16
|
+
|
|
17
|
+
end
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
def changegutenbergdata
|
|
3
3
|
if ! @a_changegutenbergdata.empty?
|
|
4
4
|
if ! @a_viewgutenberg.empty?
|
|
5
|
-
oldName = @a_viewgutenberg + ".
|
|
5
|
+
oldName = @a_viewgutenberg + ".lnk"
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
newName = @a_changehypernotedata + ".
|
|
8
|
+
newName = @a_changehypernotedata + ".lnk"
|
|
9
9
|
if File.exist?(oldName)
|
|
10
10
|
File.rename(oldName, newName)
|
|
11
11
|
end
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
@a_viewgutenberg = ""
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
@a_gutenbergdatainfo = ""
|
|
8
|
-
@a_gutenbergdatalocation = ""
|
|
9
|
-
@a_gutenbergdatalines = ""
|
|
6
|
+
@a_gutenbergdatapath = ""
|
|
7
|
+
@a_gutenbergdatainfo = ""
|
|
8
|
+
@a_gutenbergdatalocation = ""
|
|
9
|
+
@a_gutenbergdatalines = ""
|
|
10
10
|
@a_gutenbergdataspeed = ""
|
|
11
|
-
|
|
11
|
+
@a_gutenbergdatacomments = ""
|
|
12
12
|
|
|
13
13
|
end
|
|
File without changes
|
|
File without changes
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
if ! @a_viewgutenberg.empty?
|
|
6
6
|
|
|
7
|
-
sourcefile = $rwdgutenberg_directory + "/" + @a_viewgutenberg + ".
|
|
7
|
+
sourcefile = $rwdgutenberg_directory + "/" + @a_viewgutenberg + ".lnk"
|
|
8
8
|
begin
|
|
9
9
|
if File.exist?(sourcefile)
|
|
10
10
|
if ! @a_changegutenbergdata.empty?
|
|
11
|
-
distfile = $rwdgutenberg_directory + "/" + @a_changegutenbergdata + ".
|
|
11
|
+
distfile = $rwdgutenberg_directory + "/" + @a_changegutenbergdata + ".lnk"
|
|
12
12
|
File.copy(sourcefile,distfile)
|
|
13
13
|
@gutenbergfilechangeresult = "#{@a_changegutenbergdata} Created"
|
|
14
14
|
else
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
#
|
|
2
|
-
def rwdgutenbergcreatebookrecord
|
|
1
|
+
#
|
|
2
|
+
def rwdgutenbergcreatebookrecord
|
|
3
3
|
if @a_gutenbergdatapath.empty?
|
|
4
|
-
|
|
4
|
+
newnotecontent = 'new note'
|
|
5
5
|
else
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@a_gutenbergdatalines.to_s + "\n" +
|
|
6
|
+
newnotecontent = @a_gutenbergdatapath.to_s.rstrip+ "\n" +
|
|
7
|
+
@a_gutenbergdatainfo.to_s + "\n" +
|
|
8
|
+
@a_gutenbergdatalocation.to_s + "\n" +
|
|
9
|
+
@a_gutenbergdatalines.to_s + "\n" +
|
|
10
10
|
@a_gutenbergdataspeed.to_s + "\n" +
|
|
11
|
-
|
|
11
|
+
@a_gutenbergdatacomments.to_s + "\n"
|
|
12
12
|
end
|
|
13
13
|
if @a_viewgutenberg.empty?
|
|
14
|
-
newnotefilename = $rwdgutenberg_directory
|
|
14
|
+
newnotefilename = File.join ($rwdgutenberg_directory , "newnote.lnk")
|
|
15
15
|
else
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
tmplinkfilename = @a_viewgutenberg.to_s.strip + ".lnk"
|
|
17
|
+
newnotefilename = File.join($rwdgutenberg_directory, tmplinkfilename)
|
|
18
|
+
end
|
|
18
19
|
begin # exception trapped block
|
|
19
20
|
|
|
20
21
|
fd = File.open(newnotefilename,"w")
|
|
@@ -22,7 +23,7 @@
|
|
|
22
23
|
fd.close
|
|
23
24
|
|
|
24
25
|
rescue SystemCallError, StandardError
|
|
25
|
-
$
|
|
26
|
+
$rwdtinkerlog.error "system call error: #{$!}"
|
|
26
27
|
end
|
|
27
28
|
|
|
28
29
|
end
|
|
@@ -3,19 +3,20 @@
|
|
|
3
3
|
|
|
4
4
|
require 'fileutils'
|
|
5
5
|
if ! @a_viewgutenberg.empty?
|
|
6
|
-
fileName = $rwdgutenberg_directory + "/" + @a_viewgutenberg + ".
|
|
7
|
-
|
|
6
|
+
fileName = $rwdgutenberg_directory + "/" + @a_viewgutenberg + ".lnk"
|
|
7
|
+
|
|
8
8
|
begin # exception trapped block
|
|
9
|
-
if File.exist?(fileName)
|
|
9
|
+
if File.exist?(fileName)
|
|
10
10
|
File.delete(fileName)
|
|
11
|
-
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
#gutenbergrecordsresult = ""
|
|
15
|
-
|
|
11
|
+
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
#gutenbergrecordsresult = ""
|
|
15
|
+
|
|
16
16
|
@gutenbergfilechangeresult = "File Deleted!"
|
|
17
17
|
rescue
|
|
18
18
|
@gutenbergfilechangeresult = "File Deletion error"
|
|
19
|
+
$rwdtinkerlog.error "deletegutenbergrecord: File Deletion error"
|
|
19
20
|
end # exception rescue
|
|
20
21
|
end
|
|
21
22
|
end
|
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
# create new gutenberg data file
|
|
2
|
-
def gutenbergcreatefile
|
|
3
|
-
|
|
4
|
-
filelocation =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
# create new gutenberg data file
|
|
2
|
+
def gutenbergcreatefile
|
|
3
|
+
|
|
4
|
+
filelocation = File.join(@a_searchdirectorygutenberg.strip, @a_newgutenbergdata.strip)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
$rwdtinkerlog.info "gutenbergcreatefile: #{filelocation}"
|
|
8
|
+
|
|
9
|
+
begin
|
|
10
|
+
|
|
11
|
+
if File.file?( filelocation)
|
|
12
|
+
|
|
13
|
+
$rwdtinkerlog.debug "file already exists"
|
|
14
|
+
else # create the file
|
|
15
|
+
fileB=File.open(filelocation,"w") #deletes, opens the file
|
|
16
|
+
fileB.write(@a_newfilegutenberg) #writes the doc into the file
|
|
17
|
+
fileB.close
|
|
18
|
+
end
|
|
19
|
+
rescue
|
|
20
|
+
$rwdtinkerlog.error "gutenbergcreatefile: file error"
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# this code loads the help text
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
tmphelpfilename = "rwdgutenberghelpfiles.txt"
|
|
5
|
+
tmphelpdir = "rwd_files"
|
|
6
|
+
|
|
7
|
+
begin # exception trapped block
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
fileName = File.join(tmphelpdir ,tmphelpfilename )
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
fd = File.open(fileName,"r")
|
|
14
|
+
tmphelptext = fd.read
|
|
15
|
+
fd.close
|
|
16
|
+
eval tmphelptext
|
|
17
|
+
rescue SystemCallError, StandardError
|
|
18
|
+
$rwdtinkerlog.error "gutenberg help file load: system call error: "
|
|
19
|
+
end # exception rescue
|
|
20
|
+
|
|
21
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# launch the browser with a url
|
|
2
|
+
def saggutenberglaunchurl
|
|
3
|
+
|
|
4
|
+
tmppath = File.expand_path(@a_viewgutenberghtml.to_s.strip)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
if File.file?( tmppath )
|
|
8
|
+
url = "file://" + tmppath
|
|
9
|
+
`#{$rwdgutenbergbrowser} "#{url}"`
|
|
10
|
+
else
|
|
11
|
+
$rwdtinkerlog.info "saggutenberglaunchurl: #{url} not found "
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# this code is to list the directories
|
|
2
|
+
def saggutenbergdirectories
|
|
3
|
+
if $temp_rwdgutenberg_directory.to_s.empty?
|
|
4
|
+
temp_dir = $rwdgutenberg_directory
|
|
5
|
+
else
|
|
6
|
+
temp_dir = $temp_rwdgutenberg_directory
|
|
7
|
+
end
|
|
8
|
+
@gutenberg_directory = temp_dir
|
|
9
|
+
|
|
10
|
+
if FileTest.directory?(temp_dir)
|
|
11
|
+
|
|
12
|
+
fileList = Dir.new(temp_dir).entries.sort.reverse.delete_if { |x| (x =~ /lnk$|nam$|htm$|html$|db$|jpg$|png$|exe$|sch$|rwd$|txt$/) }
|
|
13
|
+
@noterecordsresult = ""
|
|
14
|
+
@noterecordsresulth = ""
|
|
15
|
+
|
|
16
|
+
@gutenbergdirectoriesresult = fileList.rwd_method("fillsaggutenbergdirs")
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def fillsaggutenbergdirs(inffile)
|
|
21
|
+
applet = inffile
|
|
22
|
+
|
|
23
|
+
if $temp_rwdgutenberg_directory.to_s.empty?
|
|
24
|
+
temp_topdirectory = $rwdgutenberg_directory
|
|
25
|
+
else
|
|
26
|
+
temp_topdirectory = $temp_rwdgutenberg_directory
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
$temp_rwdgutenberg_directory = File.join(temp_topdirectory ,applet)
|
|
30
|
+
@gutenberg_directory = temp_topdirectory
|
|
31
|
+
|
|
32
|
+
end
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
# this code is to list the file data
|
|
1
|
+
# this code is to list the file data
|
|
2
2
|
def listgutrecordfiles
|
|
3
|
-
if File.exist?($rwdgutenberg_directory)
|
|
4
|
-
fileList = Dir.new($rwdgutenberg_directory).entries.sort
|
|
5
|
-
|
|
3
|
+
if File.exist?($rwdgutenberg_directory)
|
|
4
|
+
fileList = Dir.new($rwdgutenberg_directory).entries.sort
|
|
5
|
+
|
|
6
6
|
@gutenbergrecordsresult = fileList.rwd_method("fillgutenbergrecordname")
|
|
7
|
-
end
|
|
7
|
+
end
|
|
8
8
|
end
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
# this method is to help fill in list of names
|
|
11
|
-
|
|
12
|
-
applet = inffile
|
|
11
|
+
def fillgutenbergrecordname(inffile)
|
|
12
|
+
applet = inffile
|
|
13
13
|
@a_viewgutenberg = applet
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
end
|
|
15
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# this code is to list the notes
|
|
2
|
+
|
|
3
|
+
def fillgutenbergnameh3(inffile)
|
|
4
|
+
applet = inffile
|
|
5
|
+
@a_viewgutenberghtml = applet
|
|
6
|
+
tmpdirname = File.dirname(@a_viewgutenberghtml)
|
|
7
|
+
tmpext = File.extname(@a_viewgutenberghtml)
|
|
8
|
+
tmpfilename = File.basename(@a_viewgutenberghtml,"#{tmpext}")
|
|
9
|
+
newname = tmpfilename.to_s + tmpext
|
|
10
|
+
@a_viewgutenberg = File.join(tmpdirname,newname)
|
|
11
|
+
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def findgutenbergfilesh(d)
|
|
15
|
+
|
|
16
|
+
a = Array.new(Dir[d].entries.sort)
|
|
17
|
+
|
|
18
|
+
#loop through and get the files names
|
|
19
|
+
a.each do |x|
|
|
20
|
+
#adjust the filters to the files you want to see...
|
|
21
|
+
if(!test(?d,x))
|
|
22
|
+
# only txt files
|
|
23
|
+
if x =~ /htm|html|pdf|pdb|gif|jpg|png|ps|chm|rwd|nam|sch|txt/
|
|
24
|
+
# puts "#{x}" #opens the file thats in fileName as read only
|
|
25
|
+
$saggutenbergarray = $saggutenbergarray | ["#{x}"]
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def listnotedirsgutenberg
|
|
32
|
+
|
|
33
|
+
if $temp_rwdgutenberg_directory.to_s.empty?
|
|
34
|
+
startlangdir = $rwdgutenberg_directory
|
|
35
|
+
else
|
|
36
|
+
startlangdir = $temp_rwdgutenberg_directory
|
|
37
|
+
end
|
|
38
|
+
@rwdgutenberg_directory = startlangdir
|
|
39
|
+
|
|
40
|
+
$saggutenbergarray = [""]
|
|
41
|
+
|
|
42
|
+
#get a list of the files and subdirectories on the starting directory only
|
|
43
|
+
anotearray = Array.new(Dir[startlangdir].entries.sort)
|
|
44
|
+
|
|
45
|
+
#loop through the list, ignore the files and add all new directories found
|
|
46
|
+
anotearray.each do |x|
|
|
47
|
+
#if it is a file...
|
|
48
|
+
|
|
49
|
+
if(!test(?d,x))
|
|
50
|
+
anotearray.delete(x)
|
|
51
|
+
else #it is a directory...
|
|
52
|
+
findgutenbergfilesh(x + "/**")
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
@gutenbergrecordsresulth = $saggutenbergarray.entries.sort.rwd_method("fillgutenbergnameh3")
|
|
57
|
+
end
|
|
@@ -5,55 +5,80 @@ def fillhypergutenbergname(inffile)
|
|
|
5
5
|
@a_newfilegutenberg = inffile
|
|
6
6
|
end
|
|
7
7
|
|
|
8
|
-
def findgutenbergfiles(d)
|
|
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 lnk files
|
|
15
|
-
if x =~ /rb|txt|lst/
|
|
16
|
-
# puts "#{x}"
|
|
17
|
-
|
|
18
|
-
$gutenbergarray = $gutenbergarray | ["#{x}"]
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
8
|
+
def findgutenbergfiles(d)
|
|
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 lnk files
|
|
15
|
+
if x =~ /rb|txt|lst/
|
|
16
|
+
# puts "#{x}"
|
|
17
|
+
|
|
18
|
+
$gutenbergarray = $gutenbergarray | ["#{x}"]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def rwdgutenbergfiles
|
|
25
|
-
$gutenbergarray = [""]
|
|
26
|
-
startlangdir = @a_searchdirectorygutenberg
|
|
27
|
-
puts startlangdir
|
|
28
|
-
#get a list of the files and subdirectories on the starting directory only
|
|
29
|
-
agutenbergarray = Array.new(Dir[startlangdir].entries.sort)
|
|
30
|
-
p agutenbergarray
|
|
31
|
-
#loop through the list, ignore the files and add all new directories found
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
p bgutenbergarray
|
|
41
|
-
bgutenbergarray.each do |x|
|
|
42
|
-
p x
|
|
43
|
-
if(test(?d,x))
|
|
44
|
-
agutenbergarray.push(x) #appends to the end of the array...
|
|
45
|
-
p agutenbergarray
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
end
|
|
50
|
-
agutenbergarray.each do |x|
|
|
51
|
-
#if it is a file...
|
|
52
|
-
if(!test(?d,x))
|
|
53
|
-
agutenbergarray.delete(x)
|
|
54
|
-
else #it is a directory...
|
|
55
|
-
findgutenbergfiles(x + "/**")
|
|
56
|
-
end
|
|
25
|
+
$gutenbergarray = [""]
|
|
26
|
+
startlangdir = @a_searchdirectorygutenberg
|
|
27
|
+
puts startlangdir
|
|
28
|
+
#get a list of the files and subdirectories on the starting directory only
|
|
29
|
+
agutenbergarray = Array.new(Dir[startlangdir].entries.sort)
|
|
30
|
+
p agutenbergarray
|
|
31
|
+
#loop through the list, ignore the files and add all new directories found
|
|
32
|
+
|
|
33
|
+
agutenbergarray.each do |x|
|
|
34
|
+
#if it is a file...
|
|
35
|
+
if(!test(?d,x))
|
|
36
|
+
agutenbergarray.delete(x)
|
|
37
|
+
else #it is a directory...
|
|
38
|
+
findgutenbergfiles(x + "/**")
|
|
39
|
+
end
|
|
57
40
|
end
|
|
58
41
|
@textsfilesrecordsresult = $gutenbergarray.rwd_method("fillhypergutenbergname")
|
|
59
|
-
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def findgutenbergfileslnk(d)
|
|
46
|
+
tmpgutenbergarray = [""]
|
|
47
|
+
a = Array.new(Dir[d].entries.sort)
|
|
48
|
+
#loop through and get the files names
|
|
49
|
+
a.each do |x|
|
|
50
|
+
#adjust the filters to the files you want to see...
|
|
51
|
+
if(!test(?d,x))
|
|
52
|
+
# only lnk files
|
|
53
|
+
if x =~ /lnk/
|
|
54
|
+
# puts "#{x}"
|
|
55
|
+
|
|
56
|
+
tmpgutenbergarray = tmpgutenbergarray | ["#{x}"]
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
return tmpgutenbergarray
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def rwdgutenberglnkfiles
|
|
64
|
+
gutenbergarray = [""]
|
|
65
|
+
startlangdir = @a_searchdirectorygutenberg.strip
|
|
66
|
+
puts startlangdir
|
|
67
|
+
#get a list of the files and subdirectories on the starting directory only
|
|
68
|
+
agutenbergarray = Array.new(Dir[startlangdir].entries.sort)
|
|
69
|
+
$rwdtinkerlog.info agutenbergarray
|
|
70
|
+
#loop through the list, ignore the files and add all new directories found
|
|
71
|
+
|
|
72
|
+
agutenbergarray.each do |x|
|
|
73
|
+
#if it is a file...
|
|
74
|
+
if(!test(?d,x))
|
|
75
|
+
agutenbergarray.delete(x)
|
|
76
|
+
else #it is a directory...
|
|
77
|
+
gutenbergarray = findgutenbergfileslnk(x + "/**")
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
@lnkgutenbergresult = gutenbergarray.rwd_method("fillhypergutenbergname")
|
|
81
|
+
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
|