rwdgutenberg 0.12 → 0.13
Sign up to get free protection for your applications and to get access to all the features.
- data/code/01rwdcore/01rwdcore.rb +6 -6
- data/code/01rwdcore/02helptexthashbegin.rb +14 -2
- data/code/01rwdcore/03helptexthash.rb +18 -20
- data/code/01rwdcore/jumplinkcommand.rb +14 -4
- data/code/01rwdcore/openhelpwindow.rb +7 -0
- data/code/01rwdcore/runhelpabout.rb +6 -1
- data/code/01rwdcore/runtab.rb +15 -0
- data/code/01rwdcore/selectiontab.rb +2 -0
- data/code/01rwdcore/setuphelpaboutoptions.rb +2 -0
- data/code/01rwdcore/setuptinkerdocuments.rb +1 -0
- data/code/01rwdcore/test_cases.rb +100 -51
- data/code/01rwdcore/test_harness.rb +8 -1
- data/code/01rwdcore/uploadreturns.rb +3 -0
- data/code/dd0viewphoto/dd0viewphoto.rb +2 -0
- data/code/superant.com.gutenberg/0uninstallapplet.rb +2 -0
- data/code/superant.com.gutenberg/changegutenbergname.rb +0 -0
- data/code/superant.com.gutenberg/clearbookscreendisplay.rb +0 -0
- 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 +0 -0
- data/code/superant.com.gutenberg/createnewnote.rb +1 -1
- data/code/superant.com.gutenberg/deletegutenbergrecord.rb +0 -0
- data/code/superant.com.gutenberg/gutenbergcreatefile.rb +0 -0
- data/code/superant.com.gutenberg/helptexthashload.rb +0 -0
- data/code/superant.com.gutenberg/listnamerecord.rb +0 -0
- data/code/superant.com.gutenberg/listtextfilesgutenberg.rb +0 -0
- data/code/superant.com.gutenberg/loadbookrecord.rb +0 -0
- data/code/superant.com.gutenberg/loadconfigurationrecord.rb +0 -0
- data/code/superant.com.gutenberg/loadconfigurationvariables.rb +0 -0
- data/code/superant.com.gutenberg/openhelpwindow.rb +41 -0
- data/code/superant.com.gutenberg/runbackwindow.rb +0 -0
- data/code/superant.com.gutenberg/rungutenbergwindow.rb +0 -0
- data/code/superant.com.gutenberg/rwdgutenbergbackward.rb +0 -0
- data/code/superant.com.gutenberg/rwdtinkerversion.rb +0 -0
- data/code/superant.com.gutenberg/saveconfigurationrecord.rb +0 -0
- data/code/superant.com.gutenberg/savegutenbergrecord.rb +0 -0
- data/code/superant.com.library/marcsearch.rb +30 -0
- data/code/superant.com.rwdtinkerbackwindow/changelocale.rb +84 -0
- data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +30 -102
- data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +2 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +2 -0
- data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +3 -1
- data/code/superant.com.rwdtinkerbackwindow/listzips.rb +4 -0
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +3 -1
- data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +3 -1
- data/code/superant.com.rwdtinkerbackwindow/showlocaleoptions.rb +9 -0
- data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +1 -0
- data/code/superant.com.rwdtinkerbackwindow/viewlogfile.rb +8 -5
- data/code/zz0applicationend/zz0end.rb +2 -1
- data/configuration/rwdtinker.dist +3 -2
- data/configuration/rwdwgutenberg.dist +3 -3
- data/configuration/tinkerwin2variables.dist +4 -8
- data/gui/tinkerbackwindows/superant.com.backgutenberg/30booklistutilities.rwd +1 -1
- data/gui/tinkerbackwindows/superant.com.backgutenberg/40marctab.rwd +26 -0
- data/gui/tinkerbackwindows/superant.com.backgutenberg/67viewconfiguration.rwd +1 -1
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +1 -1
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/80localechanger.rwd +17 -0
- data/init.rb +53 -156
- data/installed/rwdwgutenberg.inf +0 -1
- data/lang/en/rwdcore/en.po +197 -0
- data/lang/es/rwdcore/es.po +184 -0
- data/lang/fr/rwdcore/fr.po +169 -0
- data/lang/hi/rwdcore/hi.po +173 -0
- data/lang/ja/rwdcore/ja.po +171 -0
- data/lang/nl/rwdcore/nl.po +169 -0
- data/lib/marc.rb +38 -0
- data/lib/marc/constants.rb +14 -0
- data/lib/marc/controlfield.rb +47 -0
- data/lib/marc/datafield.rb +163 -0
- data/lib/marc/dublincore.rb +79 -0
- data/lib/marc/exception.rb +9 -0
- data/lib/marc/reader.rb +186 -0
- data/lib/marc/record.rb +147 -0
- data/lib/marc/subfield.rb +31 -0
- data/lib/marc/writer.rb +87 -0
- data/lib/marc/xmlreader.rb +103 -0
- data/lib/marc/xmlwriter.rb +155 -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 +2 -1
- data/lib/zip/ioextras.rb +43 -2
- data/lib/zip/stdrubyext.rb +5 -5
- data/lib/zip/tempfile_bugfixed.rb +2 -2
- data/lib/zip/zip.rb +618 -149
- data/lib/zip/zipfilesystem.rb +59 -8
- data/lib/zip/ziprequire.rb +32 -3
- data/lib/zmarc.rb +140 -0
- data/lib/zoom.so +0 -0
- data/rwd_files/HowTo_Gutenberg.txt +8 -1
- data/rwd_files/HowTo_Tinker.txt +29 -6
- data/rwd_files/Tinkerhelptexthash.txt +84 -0
- data/rwd_files/log/rwdtinker.log +0 -2080
- data/rwd_files/rwdapplications.html +23 -1
- data/rwd_files/rwdgutenberghelpfiles.txt +11 -4
- data/rwdconfig.dist +4 -2
- data/tests/makedist-rwdwgutenberg.rb +1 -1
- data/tests/makedist.rb +1 -1
- data/zips/rwdwfoldeditor-0.07.zip +0 -0
- data/zips/{rwdwgutenberg-0.12.zip → rwdwgutenberg-0.13.zip} +0 -0
- data/zips/rwdwhypernote-0.16.zip +0 -0
- data/zips/rwdwmovies-0.98.zip +0 -0
- data/zips/tinkerbellw-0.04.zip +0 -0
- data/zips/{wrubyslippers-1.07.zip → wrubyslippers-1.08.zip} +0 -0
- metadata +39 -14
- data/code/01rwdcore/04helptextend.rb +0 -6
- data/code/superant.com.gutenberg/openhelpwindowgutenberg.rb +0 -35
- data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +0 -61
- data/lang/en/rwdcore/languagefile.rb +0 -59
- data/lang/es/rwdcore/languagefile-es.rb +0 -63
- data/lang/fr/rwdcore/languagefile.rb +0 -65
- data/lang/jp/rwdcore/languagefile.rb +0 -73
- data/lang/nl/rwdcore/languagefile.rb +0 -76
- data/rwdgutenberg.rb +0 -1
- data/zips/rwdwfoldeditor-0.05.zip +0 -0
data/lib/zip/zipfilesystem.rb
CHANGED
@@ -1,9 +1,42 @@
|
|
1
|
-
require 'zip/zip'
|
1
|
+
require 'lib/zip/zip'
|
2
2
|
|
3
3
|
module Zip
|
4
|
+
|
5
|
+
# The ZipFileSystem API provides an API for accessing entries in
|
6
|
+
# a zip archive that is similar to ruby's builtin File and Dir
|
7
|
+
# classes.
|
8
|
+
#
|
9
|
+
# Requiring 'zip/zipfilesystem' includes this module in ZipFile
|
10
|
+
# making the methods in this module available on ZipFile objects.
|
11
|
+
#
|
12
|
+
# Using this API the following example creates a new zip file
|
13
|
+
# <code>my.zip</code> containing a normal entry with the name
|
14
|
+
# <code>first.txt</code>, a directory entry named <code>mydir</code>
|
15
|
+
# and finally another normal entry named <code>second.txt</code>
|
16
|
+
#
|
17
|
+
# require 'zip/zipfilesystem'
|
18
|
+
#
|
19
|
+
# Zip::ZipFile.open("my.zip", Zip::ZipFile::CREATE) {
|
20
|
+
# |zipfile|
|
21
|
+
# zipfile.file.open("first.txt", "w") { |f| f.puts "Hello world" }
|
22
|
+
# zipfile.dir.mkdir("mydir")
|
23
|
+
# zipfile.file.open("mydir/second.txt", "w") { |f| f.puts "Hello again" }
|
24
|
+
# }
|
25
|
+
#
|
26
|
+
# Reading is as easy as writing, as the following example shows. The
|
27
|
+
# example writes the contents of <code>first.txt</code> from zip archive
|
28
|
+
# <code>my.zip</code> to standard out.
|
29
|
+
#
|
30
|
+
# require 'zip/zipfilesystem'
|
31
|
+
#
|
32
|
+
# Zip::ZipFile.open("my.zip") {
|
33
|
+
# |zipfile|
|
34
|
+
# puts zipfile.file.read("first.txt")
|
35
|
+
# }
|
36
|
+
|
4
37
|
module ZipFileSystem
|
5
38
|
|
6
|
-
def initialize
|
39
|
+
def initialize # :nodoc:
|
7
40
|
mappedZip = ZipFileNameMapper.new(self)
|
8
41
|
@zipFsDir = ZipFsDir.new(mappedZip)
|
9
42
|
@zipFsFile = ZipFsFile.new(mappedZip)
|
@@ -11,14 +44,26 @@ module Zip
|
|
11
44
|
@zipFsFile.dir = @zipFsDir
|
12
45
|
end
|
13
46
|
|
47
|
+
# Returns a ZipFsDir which is much like ruby's builtin Dir (class)
|
48
|
+
# object, except it works on the ZipFile on which this method is
|
49
|
+
# invoked
|
14
50
|
def dir
|
15
51
|
@zipFsDir
|
16
52
|
end
|
17
53
|
|
54
|
+
# Returns a ZipFsFile which is much like ruby's builtin File (class)
|
55
|
+
# object, except it works on the ZipFile on which this method is
|
56
|
+
# invoked
|
18
57
|
def file
|
19
58
|
@zipFsFile
|
20
59
|
end
|
21
|
-
|
60
|
+
|
61
|
+
# Instances of this class are normally accessed via the accessor
|
62
|
+
# ZipFile::file. An instance of ZipFsFile behaves like ruby's
|
63
|
+
# builtin File (class) object, except it works on ZipFile entries.
|
64
|
+
#
|
65
|
+
# The individual methods are not documented due to their
|
66
|
+
# similarity with the methods in File
|
22
67
|
class ZipFsFile
|
23
68
|
|
24
69
|
attr_writer :dir
|
@@ -198,7 +243,7 @@ module Zip
|
|
198
243
|
@mappedZip.get_entry(fileName).size
|
199
244
|
end
|
200
245
|
|
201
|
-
# nil for not found and nil for directories
|
246
|
+
# Returns nil for not found and nil for directories
|
202
247
|
def size?(fileName)
|
203
248
|
entry = @mappedZip.find_entry(fileName)
|
204
249
|
return (entry == nil || entry.directory?) ? nil : entry.size
|
@@ -367,6 +412,12 @@ module Zip
|
|
367
412
|
end
|
368
413
|
end
|
369
414
|
|
415
|
+
# Instances of this class are normally accessed via the accessor
|
416
|
+
# ZipFile::dir. An instance of ZipFsDir behaves like ruby's
|
417
|
+
# builtin Dir (class) object, except it works on ZipFile entries.
|
418
|
+
#
|
419
|
+
# The individual methods are not documented due to their
|
420
|
+
# similarity with the methods in Dir
|
370
421
|
class ZipFsDir
|
371
422
|
|
372
423
|
def initialize(mappedZip)
|
@@ -431,7 +482,7 @@ module Zip
|
|
431
482
|
alias rmdir delete
|
432
483
|
alias unlink delete
|
433
484
|
|
434
|
-
def mkdir(entryName, permissionInt =
|
485
|
+
def mkdir(entryName, permissionInt = 0755)
|
435
486
|
@mappedZip.mkdir(entryName, permissionInt)
|
436
487
|
end
|
437
488
|
|
@@ -441,7 +492,7 @@ module Zip
|
|
441
492
|
|
442
493
|
end
|
443
494
|
|
444
|
-
class ZipFsDirIterator
|
495
|
+
class ZipFsDirIterator # :nodoc:all
|
445
496
|
include Enumerable
|
446
497
|
|
447
498
|
def initialize(arrayOfFileNames)
|
@@ -481,7 +532,7 @@ module Zip
|
|
481
532
|
|
482
533
|
# All access to ZipFile from ZipFsFile and ZipFsDir goes through a
|
483
534
|
# ZipFileNameMapper, which has one responsibility: ensure
|
484
|
-
class ZipFileNameMapper
|
535
|
+
class ZipFileNameMapper # :nodoc:all
|
485
536
|
include Enumerable
|
486
537
|
|
487
538
|
def initialize(zipFile)
|
@@ -520,7 +571,7 @@ module Zip
|
|
520
571
|
&continueOnExistsProc)
|
521
572
|
end
|
522
573
|
|
523
|
-
def mkdir(fileName, permissionInt =
|
574
|
+
def mkdir(fileName, permissionInt = 0755)
|
524
575
|
@zipFile.mkdir(expand_to_entry(fileName), permissionInt)
|
525
576
|
end
|
526
577
|
|
data/lib/zip/ziprequire.rb
CHANGED
@@ -1,6 +1,35 @@
|
|
1
|
-
|
1
|
+
# With ziprequire you can load ruby modules from a zip file. This means
|
2
|
+
# ruby's module include path can include zip-files.
|
3
|
+
#
|
4
|
+
# The following example creates a zip file with a single entry
|
5
|
+
# <code>log/simplelog.rb</code> that contains a single function
|
6
|
+
# <code>simpleLog</code>:
|
7
|
+
#
|
8
|
+
# require 'zip/zipfilesystem'
|
9
|
+
#
|
10
|
+
# Zip::ZipFile.open("my.zip", true) {
|
11
|
+
# |zf|
|
12
|
+
# zf.file.open("log/simplelog.rb", "w") {
|
13
|
+
# |f|
|
14
|
+
# f.puts "def simpleLog(v)"
|
15
|
+
# f.puts ' Kernel.puts "INFO: #{v}"'
|
16
|
+
# f.puts "end"
|
17
|
+
# }
|
18
|
+
# }
|
19
|
+
#
|
20
|
+
# To use the ruby module stored in the zip archive simply require
|
21
|
+
# <code>zip/ziprequire</code> and include the <code>my.zip</code> zip
|
22
|
+
# file in the module search path. The following command shows one
|
23
|
+
# way to do this:
|
24
|
+
#
|
25
|
+
# ruby -rzip/ziprequire -Imy.zip -e " require 'log/simplelog'; simpleLog 'Hello world' "
|
2
26
|
|
3
|
-
|
27
|
+
#$: << 'data/rubycode.zip' << 'data/rubycode2.zip'
|
28
|
+
|
29
|
+
|
30
|
+
require 'lib/zip/zip'
|
31
|
+
|
32
|
+
class ZipList #:nodoc:all
|
4
33
|
def initialize(zipFileList)
|
5
34
|
@zipFileList = zipFileList
|
6
35
|
end
|
@@ -23,7 +52,7 @@ class ZipList
|
|
23
52
|
end
|
24
53
|
|
25
54
|
|
26
|
-
module Kernel
|
55
|
+
module Kernel #:nodoc:all
|
27
56
|
alias :oldRequire :require
|
28
57
|
|
29
58
|
def require(moduleName)
|
data/lib/zmarc.rb
ADDED
@@ -0,0 +1,140 @@
|
|
1
|
+
#!/usr/local/bin/ruby -w
|
2
|
+
|
3
|
+
#based on zmarc.rb by:
|
4
|
+
# William Denton <wtd@pobox.com>
|
5
|
+
# April 2007
|
6
|
+
# Released under the MIT License.
|
7
|
+
|
8
|
+
# Copyright (c) 2007 William Denton
|
9
|
+
#
|
10
|
+
#
|
11
|
+
# ./zmarc.rb 0195024028
|
12
|
+
|
13
|
+
require 'lib/zoom'
|
14
|
+
|
15
|
+
#require 'rubygems'
|
16
|
+
require 'lib/marc'
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
# Two lists of open Z39.50 servers:
|
21
|
+
# http://targettest.indexdata.com/
|
22
|
+
# http://staff.library.mun.ca/staff/toolbox/z3950hosts.htm
|
23
|
+
def marcservers
|
24
|
+
|
25
|
+
return [
|
26
|
+
# Reorder these so that your preferred servers are first
|
27
|
+
# North America
|
28
|
+
['sirsi.library.utoronto.ca', 2200, 'unicorn' ], # U Toronto
|
29
|
+
['amicus.collectionscanada.ca', 210, 'NL' ], # Lib & Archives Canada
|
30
|
+
['aleph.mcgill.ca', 210, 'MUSE' ], # McGill
|
31
|
+
# ['ualapp.library.ualberta.ca', 2200, 'unicorn', ], # U Alberta
|
32
|
+
['portage.library.ubc.ca', 7090, 'voyager' ], # UBC
|
33
|
+
['z3950.loc.gov', 7090, 'Voyager' ], # Library of Congress
|
34
|
+
['catnyp.nypl.org', 210, 'INNOPAC' ], # New York Pub Lib
|
35
|
+
['library.mit.edu', 9909, 'mit01pub' ], # MIT
|
36
|
+
['prodorbis.library.yale.edu', 7090, 'voyager' ], # Yale
|
37
|
+
['catalog.princeton.edu', 7090, 'voyager' ], # Princeton
|
38
|
+
['ipac.lib.uchicago.edu', 210, 'usmarc' ], # Chicago
|
39
|
+
['www.saclibrarycatalog.org', 210, 'INNOPAC' ], # Sacramento Pub Lib
|
40
|
+
['library.bu.edu', 210, 'INNOPAC' ], # Boston U
|
41
|
+
['voyager.wrlc.org', 7090, 'voyager' ], # Wash Res Lib Consor
|
42
|
+
['catalog.lib.jhu.edu', 210, 'horizon' ], # Johns Hopkins
|
43
|
+
['z3950.lib.umich.edu', 210, 'miu01_pub' ], # U Michigan
|
44
|
+
['catalog.library.cornell.edu',7090, 'voyager' ], # Cornell
|
45
|
+
# UK and Ireland
|
46
|
+
# ['library.ucc.ie', 210, 'INNOPAC' ], # U College Cork
|
47
|
+
['library.ox.ac.uk', 210, 'MAIN*BIBMAST'], # Oxford
|
48
|
+
['z3950.nls.uk', 7290, 'voyager' ], # Scottish Nat Lib
|
49
|
+
['lib-15.lse.ac.uk', 7090, 'voyager' ], # LSE
|
50
|
+
['libsys.lib.hull.ac.uk', 210, 'INNOPAC' ], # Hull
|
51
|
+
# Europe (non-English)
|
52
|
+
['sigma.nkp.cz', 9909, 'NKC' ], # Nat Lib Czech R
|
53
|
+
['lib.mpib-berlin.mpg.de', 2020, 'opac' ], # Max Planck Inst
|
54
|
+
['ubsun02.biblio.etc.tu-bs.de',2020, 'bac' ], # Bibliotheken Berlins
|
55
|
+
['z3950.kb.dk', 2100, 'KGL01' ], # Kongelige Bibliothek
|
56
|
+
['www.bne.es', 2210, 'BIMO' ], # Nat Lib Spain
|
57
|
+
['roble.unizar.es', 210, 'INNOPAC' ], # U Zaragoza
|
58
|
+
['www.helmet.fi', 210, 'INNOPAC' ], # Helsinki Lib
|
59
|
+
['carmin.sudoc.abes.fr', 210, 'ABES-Z39-PUBLIC' ], # France
|
60
|
+
# ['gofor.bibli.ens-cachan.fr', 21210, 'ADVANCE' ], # French school
|
61
|
+
# ['gofor.bibli.ens-cachan.fr', 21210, 'MAIN*BIBMAST'], # French school
|
62
|
+
# ['isis.cilea.it', 2100, 'usmarc' ], # U Brescia
|
63
|
+
# ['aleph.library.tudelft.nl', 9909, 'tud01' ], # # Techn U Delft
|
64
|
+
# ['z3950.bibsys.no', 2100, 'BIBSYS' ], # Nat Lib Norway
|
65
|
+
# ['z3950.nb.no', 2100, 'norbok' ], # Nat Lib Norway
|
66
|
+
#['alpha.bn.org.pl', 210, 'INNOPAC' ], # Nat Lib Poland
|
67
|
+
#['z3950.btj.se', 210, 'BURK' ], # Sweden
|
68
|
+
# ['lbsihol.unimaas.nl', 7190, 'lbs' ], # U Maastricht
|
69
|
+
# Australia and New Zealand
|
70
|
+
#['catalogue.nla.gov.au', 7090, 'voyager' ], # Nat Lib Australia
|
71
|
+
#['nlnzcat.natlib.govt.nz', 7190, 'voyager' ], # Nat Lib New Zealand
|
72
|
+
# Asia
|
73
|
+
# ['library.cuhk.edu.hk', 210, 'INNOPAC' ], # Chinesse U HK
|
74
|
+
# ['linc.nus.edu.sg', 210, 'INNOPAC' ], # Nat U Singapore
|
75
|
+
# ['nbinet.ncl.edu.tw', 210, 'INNOPAC' ], # Nat Cent Lib Taiwan
|
76
|
+
# ['wine.wul.waseda.ac.jp', 210, 'INNOPAC' ], # Waseda U
|
77
|
+
# Africa
|
78
|
+
# ['explore.up.ac.za', 210, 'INNOPAC' ], # U Pretoria
|
79
|
+
# ['natlib1.unisa.ac.za', 210, 'INNOPAC' ], # Nat Lib South Africa
|
80
|
+
|
81
|
+
]
|
82
|
+
|
83
|
+
# Given an ISBN and some Z39.50 information, return MARCXML. Why
|
84
|
+
# MARCXML? Because (now) the ruby-zoom module can't return a
|
85
|
+
# ruby-marc MARC object. It can, however, return MARCXML, which
|
86
|
+
# ruby-marc can grok, so we translate it into XML and then back.
|
87
|
+
end
|
88
|
+
|
89
|
+
def z3950query(isbn, host, port, db)
|
90
|
+
begin
|
91
|
+
ZOOM::Connection.open(host, port) do |conn|
|
92
|
+
conn.database_name = db
|
93
|
+
conn.preferred_record_syntax = 'MARC21'
|
94
|
+
rset = conn.search("@attr 1=7 #{isbn}")
|
95
|
+
return rset[0].xml
|
96
|
+
end
|
97
|
+
rescue Exception => e
|
98
|
+
# puts e # Uncomment to see any server erorrs
|
99
|
+
return nil
|
100
|
+
end
|
101
|
+
end
|
102
|
+
tempoutinfo = ""
|
103
|
+
# Now the real business. Loop through all the servers listed above
|
104
|
+
# and query it about the ISBN until one answers or we run out of servers
|
105
|
+
#isbn = '0060932767'
|
106
|
+
require 'stringio'
|
107
|
+
isbn = @@marcisbn
|
108
|
+
isbn = isbn.gsub(/[^0-9X]/, '')
|
109
|
+
|
110
|
+
if (! /(978)*\d{9}[0-9X]/.match(isbn))
|
111
|
+
$stderr.puts "This is not a valid ISBN" # Not a true validity check!
|
112
|
+
return
|
113
|
+
end
|
114
|
+
servers = marcservers
|
115
|
+
threads = []
|
116
|
+
|
117
|
+
servers.each do |server|
|
118
|
+
|
119
|
+
|
120
|
+
xtempstring = "#{server[0]} ..."
|
121
|
+
tempoutinfo = tempoutinfo + xtempstring
|
122
|
+
# $stderr.puts xtempstring
|
123
|
+
marcxml = z3950query(isbn, server[0], server[1], server[2])
|
124
|
+
if marcxml.nil?
|
125
|
+
next
|
126
|
+
else
|
127
|
+
reader = MARC::XMLReader.new(StringIO.new(marcxml))
|
128
|
+
reader.each do |record|
|
129
|
+
# $stderr.puts record
|
130
|
+
tempoutinfo = tempoutinfo + record.to_s
|
131
|
+
end
|
132
|
+
# $stderr.puts "record search finished"
|
133
|
+
end
|
134
|
+
$tmpmarcfilesoutput = tempoutinfo
|
135
|
+
|
136
|
+
|
137
|
+
end
|
138
|
+
|
139
|
+
|
140
|
+
|
data/lib/zoom.so
ADDED
Binary file
|
@@ -22,7 +22,10 @@ To exit, press the x inside the browser window.
|
|
22
22
|
|
23
23
|
Bookdata can be saved in a file in the book directory
|
24
24
|
|
25
|
-
|
25
|
+
Has a MARC lookup feature
|
26
|
+
Uses lists of open Z39.50 servers to lookup MARC records
|
27
|
+
enter the ISBN number
|
28
|
+
|
26
29
|
== Tabs
|
27
30
|
|
28
31
|
There are tabs to enter bookdata and links and edit configurations
|
@@ -117,6 +120,10 @@ Steven Gibson
|
|
117
120
|
steven@superant.com
|
118
121
|
|
119
122
|
== Changelog
|
123
|
+
version 0.13
|
124
|
+
MARC lookup of isbn
|
125
|
+
more help text
|
126
|
+
|
120
127
|
version 0.12
|
121
128
|
more help text
|
122
129
|
moved help text to rwd_files directory
|
data/rwd_files/HowTo_Tinker.txt
CHANGED
@@ -97,8 +97,7 @@ There are two ways to add applets to the directories.
|
|
97
97
|
The gui files go into your gui directory
|
98
98
|
The gui files need to be in order by name and end with .rwd
|
99
99
|
|
100
|
-
|
101
|
-
|
100
|
+
|
102
101
|
If you need a config file that goes in the configuration directory
|
103
102
|
|
104
103
|
internationalization and localization are helped by replacing the
|
@@ -136,9 +135,11 @@ To exit, press the x inside the browser window.
|
|
136
135
|
|
137
136
|
== Languages
|
138
137
|
|
139
|
-
|
140
138
|
You can add tranlations in the lang subdirectory
|
141
|
-
You change the $
|
139
|
+
You change the $langarray constant in Tinker config file in the configuration directory
|
140
|
+
|
141
|
+
to change language => in the tinkerwin2variables.cnf file the [0] setting of $langarray will be the language choosen.
|
142
|
+
|
142
143
|
You can see one translation on the install applet tab, after you have installed and applet
|
143
144
|
|
144
145
|
== Using over a Network
|
@@ -168,14 +169,15 @@ Ruby I am using version 1.8.2
|
|
168
169
|
|
169
170
|
I have tested this under Linux-Debian kernel 2.6.9
|
170
171
|
|
171
|
-
|
172
|
+
== Operation:
|
173
|
+
|
172
174
|
The code files reside in the code directory and are combined before
|
173
175
|
the main Class is loaded
|
174
176
|
|
175
177
|
The rwd files in gui are combined before the gui is activated
|
176
178
|
|
177
179
|
Translated text reside in the lang directory
|
178
|
-
|
180
|
+
|
179
181
|
== Installing:
|
180
182
|
|
181
183
|
untar the file
|
@@ -226,10 +228,31 @@ http://www.erikveen.dds.nl/rubywebdialogs/index.html
|
|
226
228
|
Thanks, Steven Gibson
|
227
229
|
|
228
230
|
== Changelog
|
231
|
+
version 1.85
|
232
|
+
added TabHash way of adding menu choices
|
233
|
+
fixed zip listing tab - showing old files bug 22302
|
234
|
+
|
235
|
+
version 1.84
|
236
|
+
added locale changer tab (have: en,es,ja,hi,nl,fr)
|
237
|
+
updated to newer Rubyzip library
|
238
|
+
replaced testharness framework
|
239
|
+
|
240
|
+
version 1.83
|
241
|
+
adding more Spanish and Hindu po strings
|
242
|
+
changed handling of log file
|
243
|
+
|
244
|
+
version 1.82
|
245
|
+
switch to po files for translation files
|
246
|
+
add beginning of Hindi po file
|
247
|
+
added more Japanese strings
|
248
|
+
changed handling of lang change = in the tinkerwin2variables.cnf file the [0] setting of $langarray will be the language choosen.
|
249
|
+
refactored init.rb to move routines into lib/rwdtinker modules
|
250
|
+
|
229
251
|
version 1.81
|
230
252
|
condensed config files from 4 -> 2
|
231
253
|
fixed document launch bug
|
232
254
|
add $KCODE = 'u'
|
255
|
+
move help files to rwd_files directory
|
233
256
|
|
234
257
|
version 1.80
|
235
258
|
changed pda handling in rwd.rb
|
@@ -0,0 +1,84 @@
|
|
1
|
+
|
2
|
+
# Help files for RwdTinker core Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
|
3
|
+
|
4
|
+
|
5
|
+
Helptext.update( :network_help => "Using over a Network: To serve the application over your local LAN,change the last line in the<br>
|
6
|
+
init.rb file to something like:\n<br>
|
7
|
+
RwdTinker.file(RWDFile).serve(8080, '-r' ? '.rwduids' : nil)\n<br>
|
8
|
+
Then you should be able to login at: http://yourhostname:8080")
|
9
|
+
|
10
|
+
Helptext.update( :general_help => "#{Message[:message_general_help]}" )
|
11
|
+
|
12
|
+
Helptext.update( :documents_rwdtinker => "<b>Documents:
|
13
|
+
<p>
|
14
|
+
|
15
|
+
when you click on a document name, the document should pop up in a <br>
|
16
|
+
browser window, or in another browser tab.</b>
|
17
|
+
")
|
18
|
+
|
19
|
+
Helptext.update( :tinkerwin2_help => " You can view the list of applets you can install
|
20
|
+
by clicking on the list files button
|
21
|
+
<br><br>
|
22
|
+
You can download an applet created by someone else
|
23
|
+
<br><br>
|
24
|
+
put the file in the zips directory
|
25
|
+
<br>
|
26
|
+
rwdtinker applets packaged as RubyGems can be used if you have RubyGems installed.
|
27
|
+
You can download rwdtinker gems at the 'Install Remote Applets' tab
|
28
|
+
to install applets you need the ruby zlib library installed
|
29
|
+
")
|
30
|
+
|
31
|
+
Helptext.update(
|
32
|
+
:applet_viewing => "You can get a list of all installed applets by clicking the 'listfiles button'<br>
|
33
|
+
To see the text of a install file<br>
|
34
|
+
Type in the name of the file you want.<br>
|
35
|
+
<p>
|
36
|
+
type it without the inf ending
|
37
|
+
rwdapplet-0.1<br>
|
38
|
+
<p>
|
39
|
+
Then click the 'View Installed File' button
|
40
|
+
<p>
|
41
|
+
If it finds the file it will open it. It displays the text the search box.
|
42
|
+
<p>
|
43
|
+
You can uninstall applets on this screen")
|
44
|
+
|
45
|
+
Helptext.update(
|
46
|
+
:applet_installation => " You can download an applet created by someone else<br>
|
47
|
+
put the file in the zips directory<br>
|
48
|
+
|
49
|
+
click on the 'list zips' tab<br>
|
50
|
+
click on 'list applets available for installing<br>
|
51
|
+
<br>
|
52
|
+
chose the applet you want<br>
|
53
|
+
click on 'install applet'<br>
|
54
|
+
If all goes well the applet should be installed.<br>
|
55
|
+
You will need to restart rwdtinker to see the new screens<br>
|
56
|
+
to install applets you need the ruby zlib library installed")
|
57
|
+
|
58
|
+
Helptext.update(
|
59
|
+
:applet_tinkerbackeditconfiguration => " You can edit the configuration
|
60
|
+
<p>
|
61
|
+
Remember to reload the configuration variables if you want your
|
62
|
+
changes used.")
|
63
|
+
|
64
|
+
Helptext.update(
|
65
|
+
:remotegemapplet_install => " To download and install use the 'Install Remote Applets'
|
66
|
+
<br>
|
67
|
+
First click on 'List applets in the Remote GEM Repository available for downloading'<br>
|
68
|
+
then go to the very bottom to click on the applet you want<br>
|
69
|
+
then on the top click 'install remote Gem applet package'
|
70
|
+
<br>
|
71
|
+
This installs the package in the Gem system<br>
|
72
|
+
You still need to install it into rwdtinker - do that in the 'List Zips' tab<br>
|
73
|
+
<br>
|
74
|
+
For this feature to work, you need<br>
|
75
|
+
RubyGems installed<br>
|
76
|
+
Variables set correctly in the tinerwin2.cnf file<br>
|
77
|
+
$xpcommand, $gemdirectory_withgemfiles and $geminstalled_directory<br>
|
78
|
+
the defaults as shipped will normally be for a Debian Linux system <br>
|
79
|
+
On Debian Linux, you would usually need to be running rwdtinker as root in order to install RubyGems
|
80
|
+
<br><br>
|
81
|
+
You can view the list of rwdtinker applets you have installed already by clicking 'view already installed GEM applets'
|
82
|
+
"
|
83
|
+
)
|
84
|
+
Helptext.update( :localechanger_help => "#{Message[:locale_changer_help] }" )
|