bigtinker 0.93
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/Books/Mariposa.gut +2 -0
- data/Books/marip10.txt +2598 -0
- data/Notes/changes.lnk +1 -0
- data/Notes/changes.txt +1 -0
- data/Notes/hypernote/hypernote01.txt +1 -0
- data/Notes/hypernote/hypernote02.txt +1 -0
- data/Notes/hypernote/newnote3.txt +2 -0
- data/Notes/rwdtinker/RwdtinkerProgrammingQuickStart.lnk +1 -0
- data/Notes/rwdtinker/RwdtinkerProgrammingQuickStart.txt +11 -0
- data/Notes/rwdtinker/newnote.txt +1 -0
- data/Notes/rwdtinker/rwdtinker01.txt +9 -0
- data/Notes/rwdtinker/testnote2.txt +1 -0
- data/Readme.txt +146 -0
- data/bin/bigtinker +19 -0
- data/code/01rwdcore/01rwdcore.rb +25 -0
- data/code/01rwdcore/02helptexthashbegin.rb +4 -0
- data/code/01rwdcore/03helptexthash.rb +31 -0
- data/code/01rwdcore/04helptextend.rb +6 -0
- data/code/01rwdcore/jumplinkcommand.rb +26 -0
- data/code/01rwdcore/openhelpwindow.rb +31 -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 +10 -0
- data/code/01rwdcore/runopentinkerdocument.rb +7 -0
- data/code/01rwdcore/rwdtinkerversion.rb +22 -0
- data/code/01rwdcore/rwdwindowreturn.rb +9 -0
- data/code/01rwdcore/selectiontab.rb +9 -0
- data/code/01rwdcore/setuphelpaboutoptions.rb +13 -0
- data/code/01rwdcore/setuptinkerdocuments.rb +6 -0
- data/code/01rwdcore/test_cases.rb +109 -0
- data/code/01rwdcore/test_harness.rb +13 -0
- data/code/01rwdcore/uploadreturns.rb +62 -0
- data/code/superant.com.bigtinker/rwdtinkerversion.rb +10 -0
- data/code/superant.com.gutenberg/changegutenbergname.rb +16 -0
- data/code/superant.com.gutenberg/clearbookscreendisplay.rb +8 -0
- data/code/superant.com.gutenberg/copyfilename.rb +24 -0
- data/code/superant.com.gutenberg/createnewnote.rb +23 -0
- data/code/superant.com.gutenberg/deletegutenbergrecord.rb +21 -0
- data/code/superant.com.gutenberg/gutenbergcreatefile.rb +9 -0
- data/code/superant.com.gutenberg/helptexthashrwdgutenberg.rb +41 -0
- data/code/superant.com.gutenberg/jumplinkupdate.rb +7 -0
- data/code/superant.com.gutenberg/listnamerecord.rb +15 -0
- data/code/superant.com.gutenberg/listtextfilesgutenberg.rb +58 -0
- data/code/superant.com.gutenberg/loadbookrecord.rb +21 -0
- data/code/superant.com.gutenberg/loadconfigurationrecord.rb +36 -0
- data/code/superant.com.gutenberg/loadconfigurationvariables.rb +13 -0
- data/code/superant.com.gutenberg/openhelpwindowgutenberg.rb +29 -0
- data/code/superant.com.gutenberg/returntomain.rb +10 -0
- data/code/superant.com.gutenberg/runbackwindow.rb +10 -0
- data/code/superant.com.gutenberg/rungutenbergwindow.rb +57 -0
- data/code/superant.com.gutenberg/rwdgutenbergbackward.rb +27 -0
- data/code/superant.com.gutenberg/rwdhypernotehelpabout.rb +14 -0
- data/code/superant.com.gutenberg/rwdtinkerversion.rb +10 -0
- data/code/superant.com.gutenberg/saveconfigurationrecord.rb +18 -0
- data/code/superant.com.gutenberg/savegutenbergrecord.rb +20 -0
- data/code/superant.com.gutenberg/savelinkrecord.rb +23 -0
- data/code/superant.com.hypernote/archiveevent.rb +14 -0
- data/code/superant.com.hypernote/changehypernotename.rb +21 -0
- data/code/superant.com.hypernote/clearhypernotescreendisplay.rb +8 -0
- data/code/superant.com.hypernote/clearlinkscreendisplay.rb +8 -0
- data/code/superant.com.hypernote/copyfilename.rb +10 -0
- data/code/superant.com.hypernote/createnewnote.rb +14 -0
- data/code/superant.com.hypernote/deletehypernoterecord.rb +20 -0
- data/code/superant.com.hypernote/helptexthashrwdhypernote.rb +74 -0
- data/code/superant.com.hypernote/hyperlinkcreatelinkfile.rb +19 -0
- data/code/superant.com.hypernote/jumplinkupdate.rb +7 -0
- data/code/superant.com.hypernote/listhypernotelinks.rb +55 -0
- data/code/superant.com.hypernote/listhypernotes.rb +63 -0
- data/code/superant.com.hypernote/listlinknotes.rb +33 -0
- data/code/superant.com.hypernote/loadconfigurationrecord.rb +34 -0
- data/code/superant.com.hypernote/loadconfigurationvariables.rb +13 -0
- data/code/superant.com.hypernote/loadlinksrecord.rb +21 -0
- data/code/superant.com.hypernote/loadnoterecord.rb +24 -0
- data/code/superant.com.hypernote/openhelpwindowrwdhyernote.rb +34 -0
- data/code/superant.com.hypernote/returntomain.rb +10 -0
- data/code/superant.com.hypernote/runrwdhypernotconfiguration.rb +12 -0
- data/code/superant.com.hypernote/runrwdhypernotebackwindow.rb +12 -0
- data/code/superant.com.hypernote/rwdhypernotehelpabout.rb +14 -0
- data/code/superant.com.hypernote/rwdtinkerversion.rb +10 -0
- data/code/superant.com.hypernote/saveconfigurationrecord.rb +18 -0
- data/code/superant.com.hypernote/savehypernoterecord.rb +20 -0
- data/code/superant.com.hypernote/savelinkrecord.rb +23 -0
- data/code/superant.com.rwdaddresses/attachtmpcontactphoto.rb +24 -0
- data/code/superant.com.rwdaddresses/clearscreendisplay.rb +15 -0
- data/code/superant.com.rwdaddresses/createnewnamerecord.rb +19 -0
- data/code/superant.com.rwdaddresses/deletecontactrecord.rb +25 -0
- data/code/superant.com.rwdaddresses/deleterwdaddressesupdatefiles.rb +19 -0
- data/code/superant.com.rwdaddresses/downloadrwdaddressfiles.rb +36 -0
- data/code/superant.com.rwdaddresses/helptexthashrwdaddresses.rb +69 -0
- data/code/superant.com.rwdaddresses/jumplinkupdate.rb +9 -0
- data/code/superant.com.rwdaddresses/listnamerecord.rb +15 -0
- data/code/superant.com.rwdaddresses/listvcardrecord.rb +15 -0
- data/code/superant.com.rwdaddresses/loadconfigurationrecord.rb +45 -0
- data/code/superant.com.rwdaddresses/loadconfigurationvariables.rb +14 -0
- data/code/superant.com.rwdaddresses/loadnamerecord.rb +30 -0
- data/code/superant.com.rwdaddresses/openhelpwindowrwdaddresses.rb +30 -0
- data/code/superant.com.rwdaddresses/renamecontact.rb +15 -0
- data/code/superant.com.rwdaddresses/runaddresseswindow.rb +10 -0
- data/code/superant.com.rwdaddresses/runrwdaddressesmenu1.rb +34 -0
- data/code/superant.com.rwdaddresses/runrwdaddresssyncbackwindow.rb +10 -0
- data/code/superant.com.rwdaddresses/rwdaddressesbackwindow.rb +10 -0
- data/code/superant.com.rwdaddresses/rwdaddresseshelpabout.rb +13 -0
- data/code/superant.com.rwdaddresses/rwdtinkerversion.rb +10 -0
- data/code/superant.com.rwdaddresses/saveconfigurationrecord.rb +20 -0
- data/code/superant.com.rwdaddresses/savevcardrecord.rb +76 -0
- data/code/superant.com.rwdaddresses/syncrwdaddress.rb +28 -0
- data/code/superant.com.rwdaddresses/test_cases.rb +46 -0
- data/code/superant.com.rwdaddresses/uploadrwdaddressfiles.rb +46 -0
- data/code/superant.com.rwdaddresses/viewaddressconfiguration.rb +21 -0
- data/code/superant.com.rwdaddresses/viewnamedata.rb +28 -0
- data/code/superant.com.rwdaddresses/viewphoto.rb +4 -0
- data/code/superant.com.rwdaddresses/viewrwdaddressesconfiguration.rb +23 -0
- data/code/superant.com.rwdaddresses/viewtmpcontactphoto.rb +12 -0
- data/code/superant.com.rwdaddresses/viewvcarddata.rb +22 -0
- data/code/superant.com.rwdcalc/ca2multiply.rb +10 -0
- data/code/superant.com.rwdcalc/changescriptname.rb +16 -0
- data/code/superant.com.rwdcalc/clearrubyscriptscreendisplay.rb +9 -0
- data/code/superant.com.rwdcalc/clearscriptscreendisplay.rb +9 -0
- data/code/superant.com.rwdcalc/deletescriptrecord.rb +20 -0
- data/code/superant.com.rwdcalc/fadd.rb +10 -0
- data/code/superant.com.rwdcalc/frwdcleartape.rb +9 -0
- data/code/superant.com.rwdcalc/frwddivide.rb +10 -0
- data/code/superant.com.rwdcalc/frwdmultiply.rb +10 -0
- data/code/superant.com.rwdcalc/frwdsubtract.rb +10 -0
- data/code/superant.com.rwdcalc/helptexthashrwdcalc.rb +14 -0
- data/code/superant.com.rwdcalc/jumplinkupdate.rb +11 -0
- data/code/superant.com.rwdcalc/listscripts.rb +13 -0
- data/code/superant.com.rwdcalc/loadrubyrecord.rb +20 -0
- data/code/superant.com.rwdcalc/loadscriptrecord.rb +20 -0
- data/code/superant.com.rwdcalc/mathcommands.rb +53 -0
- data/code/superant.com.rwdcalc/openhelpwindowrwdcalc.rb +21 -0
- data/code/superant.com.rwdcalc/playscript.rb +22 -0
- data/code/superant.com.rwdcalc/renamecalcrecord.rb +14 -0
- data/code/superant.com.rwdcalc/runrwdcalcwindow.rb +10 -0
- data/code/superant.com.rwdcalc/rwdadd.rb +10 -0
- data/code/superant.com.rwdcalc/rwdcleartape.rb +9 -0
- data/code/superant.com.rwdcalc/rwddivision.rb +10 -0
- data/code/superant.com.rwdcalc/rwdsubtraction.rb +10 -0
- data/code/superant.com.rwdcalc/savechangedscript.rb +19 -0
- data/code/superant.com.rwdcalc/saverubyscript.rb +20 -0
- data/code/superant.com.rwdcalc/viewscript.rb +18 -0
- data/code/superant.com.rwdcalendar/gh9calendar.rb +40 -0
- data/code/superant.com.rwdcalendar/helptexthashrwdschedule.rb +14 -0
- data/code/superant.com.rwdcalendar/openhelpwindowrwdschedule.rb +17 -0
- data/code/superant.com.rwdshell/changescriptname.rb +16 -0
- data/code/superant.com.rwdshell/clearscriptscreendisplay.rb +9 -0
- data/code/superant.com.rwdshell/deletescriptrecord.rb +20 -0
- data/code/superant.com.rwdshell/helptexthashshell.rb +31 -0
- data/code/superant.com.rwdshell/listrubyscripts.rb +13 -0
- data/code/superant.com.rwdshell/listscripts.rb +13 -0
- data/code/superant.com.rwdshell/loadconfigurationrecord.rb +33 -0
- data/code/superant.com.rwdshell/loadconfigurationvariables.rb +13 -0
- data/code/superant.com.rwdshell/loadscriptrecord.rb +20 -0
- data/code/superant.com.rwdshell/openhelpwindowshell.rb +33 -0
- data/code/superant.com.rwdshell/playrubyscript.rb +23 -0
- data/code/superant.com.rwdshell/playscript.rb +23 -0
- data/code/superant.com.rwdshell/returntomain.rb +10 -0
- data/code/superant.com.rwdshell/rubyeval.rb +25 -0
- data/code/superant.com.rwdshell/runrwdshellbackwindow.rb +10 -0
- data/code/superant.com.rwdshell/runrwdshellwindow.rb +12 -0
- data/code/superant.com.rwdshell/rwdshellversion.rb +14 -0
- data/code/superant.com.rwdshell/savechangedscript.rb +19 -0
- data/code/superant.com.rwdshell/saveconfigurationrecord.rb +18 -0
- data/code/superant.com.rwdshell/shelleval.rb +20 -0
- data/code/superant.com.rwdshell/viewrubyscript.rb +18 -0
- data/code/superant.com.rwdshell/viewscript.rb +18 -0
- data/code/superant.com.rwdtinkerbackwindow/controlclient.rb +96 -0
- data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +61 -0
- data/code/superant.com.rwdtinkerbackwindow/installapplet.rb +25 -0
- data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +21 -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 +53 -0
- data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +12 -0
- data/code/superant.com.rwdtinkerbackwindow/listzips.rb +27 -0
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +39 -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 +42 -0
- data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +24 -0
- data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +33 -0
- data/code/superant.com.rwdtinkerbackwindow/runremoteinstall.rb +11 -0
- data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +11 -0
- data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +13 -0
- data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +22 -0
- data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +22 -0
- data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +24 -0
- data/code/superant.com.words/dictlookup.rb +20 -0
- data/code/superant.com.words/jumplinkupdate.rb +6 -0
- data/code/superant.com.words/runfortunewindow.rb +14 -0
- data/code/superant.com.words/runrwdwordsbackwindow.rb +10 -0
- data/code/superant.com.words/runrwdwordsversion.rb +14 -0
- data/code/superant.com.words/rwdtinkerversion.rb +10 -0
- data/code/zz0applicationend/zz0end.rb +4 -0
- data/configuration/bigtinker.dist +3 -0
- data/configuration/language.dist +7 -0
- data/configuration/rwdaddresses.dist +21 -0
- data/configuration/rwdapplicationidentity.dist +3 -0
- data/configuration/rwdcalc.dist +8 -0
- data/configuration/rwdcalendar.dist +10 -0
- data/configuration/rwdgutenberg.dist +14 -0
- data/configuration/rwdhypernote.dist +13 -0
- data/configuration/rwdshell.dist +4 -0
- data/configuration/rwdtinker.dist +19 -0
- data/configuration/rwdwords.dist +18 -0
- data/configuration/tinkerwin2variables.dist +17 -0
- data/ev/browser.rb +109 -0
- data/ev/ftools.rb +170 -0
- data/ev/net.rb +750 -0
- data/ev/ruby.rb +819 -0
- data/ev/rwd.rb +1849 -0
- data/ev/sgml.rb +236 -0
- data/ev/thread.rb +63 -0
- data/ev/tree.rb +343 -0
- data/ev/xml.rb +4 -0
- data/extras/cal.rb +158 -0
- data/extras/dict.rb +438 -0
- data/extras/icalendar/base.rb +17 -0
- data/extras/icalendar/calendar.rb +44 -0
- data/extras/icalendar/calendar_parser.rb +237 -0
- data/extras/icalendar/component/alarm.rb +16 -0
- data/extras/icalendar/component/event.rb +25 -0
- data/extras/icalendar/component/freebusy.rb +12 -0
- data/extras/icalendar/component/journal.rb +25 -0
- data/extras/icalendar/component/timezone.rb +26 -0
- data/extras/icalendar/component/todo.rb +21 -0
- data/extras/icalendar/component.rb +91 -0
- data/extras/icalendar/helpers.rb +103 -0
- data/extras/icalendar/parameter.rb +25 -0
- data/extras/icalendar.rb +18 -0
- data/extras/rconftool.rb +380 -0
- data/extras/zip/ioextras.rb +114 -0
- data/extras/zip/stdrubyext.rb +111 -0
- data/extras/zip/tempfile_bugfixed.rb +195 -0
- data/extras/zip/zip.rb +1377 -0
- data/extras/zip/zipfilesystem.rb +558 -0
- data/extras/zip/ziprequire.rb +61 -0
- data/gui/00coreguibegin/applicationguitop.rwd +4 -0
- data/gui/frontwindow0/superant.com.rwdcalendar/hl9calendar.rwd +27 -0
- data/gui/frontwindow0/superant.com.shellscripts/1listplayscripts.rwd +17 -0
- data/gui/frontwindow0/superant.com.shellscripts/2listscripts.rwd +25 -0
- data/gui/frontwindow0/superant.com.shellscripts/3editscripts.rwd +26 -0
- data/gui/frontwindow0/superant.com.shellscripts/4scriptutilities.rwd +24 -0
- data/gui/frontwindow0/superant.com.shellscripts/6rwdshelleval.rwd +15 -0
- data/gui/frontwindow0/superant.com.shellscripts/cb7rwdrubyeval.rwd +13 -0
- data/gui/frontwindowselectionbegin/selectiontabbegin/00selectiontabbegin.rwd +11 -0
- data/gui/frontwindowselections/superant.com.rwdtinkerwin2selectiontab/jumplinkcommands.rwd +15 -0
- data/gui/frontwindowselectionzend/viewselectionzend/wwselectionend.rwd +3 -0
- data/gui/frontwindowselectionzend/viewselectionzend/zzdocumentbegin.rwd +6 -0
- data/gui/frontwindowtdocuments/superant.com.documents/tinkerdocuments.rwd +14 -0
- data/gui/helpaboutbegin/superant.com.helpaboutbegin/zzdocumentend.rwd +8 -0
- data/gui/helpaboutbegin/superant.com.helpaboutbegin/zzzrwdlasttab.rwd +6 -0
- data/gui/helpaboutbegin/superant.com.helpaboutbegin/zzzzhelpscreenstart.rwd +3 -0
- data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/helpabouttab.rwd +15 -0
- data/gui/helpaboutzend/superant.com.helpaboutend/helpscreenend.rwd +3 -0
- data/gui/helpaboutzend/superant.com.helpaboutend/zhelpscreenstart2.rwd +3 -0
- data/gui/helpaboutzend/superant.com.helpaboutend/zzzzhelpabout2.rwd +15 -0
- data/gui/helpaboutzend/superant.com.helpaboutend/zzzzhelpscreen2end.rwd +3 -0
- data/gui/tinkerbackwindows/superant.com.addressesphotowindow/yy7addressesphoto.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/00rwdgutenberg.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/10viewnote.rwd +32 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/20listfiles.rwd +35 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/30booklistutilities.rwd +28 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/35displaytab.rwd +10 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/40rwdgutenberg.rwd +16 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/67viewconfiguration.rwd +40 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/77jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/zvbackend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.gutendisplay/gutendisplaywindow.rwd +9 -0
- data/gui/tinkerbackwindows/superant.com.hypernote/00windowbegin.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.hypernote/10viewnote.rwd +32 -0
- data/gui/tinkerbackwindows/superant.com.hypernote/20editlinks.rwd +34 -0
- data/gui/tinkerbackwindows/superant.com.hypernote/30noteutilities.rwd +27 -0
- data/gui/tinkerbackwindows/superant.com.hypernote/67viewconfiguration.rwd +38 -0
- data/gui/tinkerbackwindows/superant.com.hypernote/m01menubegin.rwd +18 -0
- data/gui/tinkerbackwindows/superant.com.hypernote/zbackend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.refreshwindow/fortunerefreshwindowtwo.rwd +9 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddresses/00rwdaddresses.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddresses/11viewnamedata.rwd +19 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddresses/13listnamerecordfiles.rwd +21 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddresses/16editrecord.rwd +39 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddresses/17viewvcardrecord.rwd +32 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddresses/18contactutilities.rwd +34 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddresses/m01menubegin.rwd +18 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddresses/zvbackend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/1appname.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/20downloadftp.rwd +45 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/70rwddiagnostics.rwd +23 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/88viewconfiguration.rwd +47 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/94selectiontab.rwd +11 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/95jumplink.rwd +15 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/97selectionend.rwd +3 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/zvbackend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.rwdcalc/1appname.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.rwdcalc/20floatrwdcalc.rwd +23 -0
- data/gui/tinkerbackwindows/superant.com.rwdcalc/30intrwdcalc.rwd +23 -0
- data/gui/tinkerbackwindows/superant.com.rwdcalc/35mathcommands.rwd +25 -0
- data/gui/tinkerbackwindows/superant.com.rwdcalc/44listplayscripts.rwd +19 -0
- data/gui/tinkerbackwindows/superant.com.rwdcalc/45listscripts.rwd +25 -0
- data/gui/tinkerbackwindows/superant.com.rwdcalc/46editscriptrecord.rwd +30 -0
- data/gui/tinkerbackwindows/superant.com.rwdcalc/4scriptutilities.rwd +25 -0
- data/gui/tinkerbackwindows/superant.com.rwdcalc/81jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.rwdcalc/z9end.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/1appname.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/44listplayscripts.rwd +19 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/45listscripts.rwd +25 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/46editscriptrecord.rwd +30 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/92viewconfiguration.rwd +38 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/94rwddiagnostics.rwd +16 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/98jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/zbackend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/1appname.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +42 -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 +44 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +29 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/75rwdcontrol.rwd +33 -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/3rwdfortune.rwd +14 -0
- data/gui/tinkerbackwindows/superant.com.words/77jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.words/80tab1.rwd +11 -0
- data/gui/tinkerbackwindows/superant.com.words/z9end.rwd +6 -0
- data/gui/zzcoreguiend/tinkerapplicationguiend/yy9rwdend.rwd +4 -0
- data/init.rb +277 -0
- data/installed/gutenbergdata01.inf +3 -0
- data/installed/hypernotedata1.inf +12 -0
- data/installed/rwdaddressesdata2.inf +8 -0
- data/installed/rwdgutenberg-0.03.inf +9 -0
- data/installed/rwdviewlogo-0.4.inf +4 -0
- data/installed/rwdwaddresses-1.04.inf +13 -0
- data/installed/rwdwhypernote-0.07.inf +7 -0
- data/installed/rwdwwords-0.02.inf +10 -0
- data/lang/en/rwdcalendar/calendar-en.rb +6 -0
- data/lang/en/rwdcore/languagefile.rb +16 -0
- data/lang/es/rwdcalendar/calendar-nl.rb +6 -0
- data/lang/es/rwdcore/languagefile-es.rb +14 -0
- data/lang/jp/rwdcore/languagefile.rb +9 -0
- data/lang/nl/rwdcalendar/calendar-nl.rb +6 -0
- data/lang/nl/rwdcore/languagefile.rb +19 -0
- data/lib/temp.rb +1 -0
- data/names/Angelina Jolie.jpg +0 -0
- data/names/Angelina Jolie.nam +8 -0
- data/names/Angelina Jolie.vcf +8 -0
- data/names/Steven Gibson.jpg +0 -0
- data/names/Steven Gibson.nam +5 -0
- data/names/elektra.jpg +0 -0
- data/names/elektra.nam +7 -0
- data/names/nophoto.jpg +0 -0
- data/rwd_files/HowTo_Addresses.txt +259 -0
- data/rwd_files/HowTo_BigTinker.txt +146 -0
- data/rwd_files/HowTo_Gutenberg.txt +94 -0
- data/rwd_files/HowTo_HyperNote.txt +121 -0
- data/rwd_files/HowTo_RubyEval.html +80 -0
- data/rwd_files/HowTo_RwdCalc.txt +110 -0
- data/rwd_files/HowTo_Shell.txt +257 -0
- data/rwd_files/HowTo_Tinker.txt +425 -0
- data/rwd_files/HowTo_TinkerWin2.txt +202 -0
- data/rwd_files/HowTo_Words.txt +132 -0
- data/rwd_files/Readme.txt +57 -0
- data/rwd_files/RubyWebDialogs.html +6 -0
- data/rwd_files/contacttmp.jpg +0 -0
- data/rwd_files/favicon.ico +0 -0
- data/rwd_files/rdoc-style.css +175 -0
- data/rwd_files/rwdapplications.html +54 -0
- data/rwd_files/tinker.png +0 -0
- data/rwdconfig.dist +18 -0
- data/tests/RubyGauge.rb +179 -0
- data/tests/checkdepends.sh +4 -0
- data/tests/cleancnf.sh +5 -0
- data/tests/makedist.rb +59 -0
- data/tests/makerwdwaddresses-1.04.rb +40 -0
- data/tests/rdep.rb +354 -0
- data/tests/totranslate.lang +93 -0
- data/zips/rwdahelloworld-0.5.zip +0 -0
- metadata +447 -0
data/extras/cal.rb
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
#! /usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
# cal.rb: Written by Tadayoshi Funaba 1998-2004
|
|
4
|
+
# $Id: cal.rb,v 2.8 2004-09-25 12:50:10+09 tadf Exp $
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
|
|
8
|
+
class Cal
|
|
9
|
+
|
|
10
|
+
START =
|
|
11
|
+
{
|
|
12
|
+
'cn' => true, # China
|
|
13
|
+
'de' => 2342032, # Germany (protestant states)
|
|
14
|
+
'dk' => 2342032, # Denmark
|
|
15
|
+
'en' => 2361222, # English
|
|
16
|
+
'es' => 2299161, # Spain
|
|
17
|
+
'fi' => 2361390, # Finland
|
|
18
|
+
'fr' => 2299227, # France
|
|
19
|
+
'gb' => 2361222, # United Kingdom
|
|
20
|
+
'gr' => 2423868, # Greece
|
|
21
|
+
'hu' => 2301004, # Hungary
|
|
22
|
+
'it' => 2299161, # Italy
|
|
23
|
+
'jp' => true, # Japan
|
|
24
|
+
'no' => 2342032, # Norway
|
|
25
|
+
'nl' => 2361222,
|
|
26
|
+
'pl' => 2299161, # Poland
|
|
27
|
+
'pt' => 2299161, # Portugal
|
|
28
|
+
'ru' => 2421639, # Russia
|
|
29
|
+
'se' => 2361390, # Sweden
|
|
30
|
+
'us' => 2361222, # United States
|
|
31
|
+
'os' => false, # (old style)
|
|
32
|
+
'ns' => true # (new style)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
DEFAULT_START = 'gb'
|
|
36
|
+
|
|
37
|
+
def initialize
|
|
38
|
+
opt_j; opt_m; opt_t; opt_y; opt_c
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def opt_j(flag=false) @opt_j = flag end
|
|
42
|
+
def opt_m(flag=false) @opt_m = flag end
|
|
43
|
+
def opt_t(flag=false) @opt_t = flag end
|
|
44
|
+
def opt_y(flag=false) @opt_y = flag end
|
|
45
|
+
|
|
46
|
+
def opt_c(arg=DEFAULT_START) @start = START[arg] end
|
|
47
|
+
|
|
48
|
+
def set_params
|
|
49
|
+
@dw = if @opt_j then 3 else 2 end
|
|
50
|
+
@mw = (@dw + 1) * 7 - 1
|
|
51
|
+
@mn = if @opt_j then 2 else 3 end
|
|
52
|
+
@tw = (@mw + 2) * @mn - 2
|
|
53
|
+
@k = if @opt_m then 1 else 0 end
|
|
54
|
+
@da = if @opt_j then :yday else :mday end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def nl_pict(y, m)
|
|
60
|
+
d = (1..31).detect{|d| Date.valid_date?(y, m, d, @start)}
|
|
61
|
+
fi = Date.new(y, m, d, @start)
|
|
62
|
+
fi -= (fi.jd - @k + 1) % 7
|
|
63
|
+
|
|
64
|
+
ve = (fi..fi + 6).collect{|cu|
|
|
65
|
+
%w(zo ma di wo do vr za)[cu.wday]
|
|
66
|
+
}
|
|
67
|
+
ve += (fi..fi + 41).collect{|cu|
|
|
68
|
+
if cu.mon == m then cu.send(@da) end.to_s
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
ve = ve.collect{|e| e.rjust(@dw)}
|
|
72
|
+
|
|
73
|
+
gr = group(ve, 7)
|
|
74
|
+
gr = trans(gr) if @opt_t
|
|
75
|
+
ta = gr.collect{|xs| xs.join(' ')}
|
|
76
|
+
|
|
77
|
+
ca = %w(januari februari maart april mei juni juli
|
|
78
|
+
augustus september oktober november december)[m - 1]
|
|
79
|
+
ca = ca + ' ' + y.to_s if not @opt_y
|
|
80
|
+
ca = ca.center(@mw)
|
|
81
|
+
|
|
82
|
+
ta.unshift(ca)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def en_pict(y, m)
|
|
87
|
+
d = (1..31).detect{|d| Date.valid_date?(y, m, d, @start)}
|
|
88
|
+
fi = Date.new(y, m, d, @start)
|
|
89
|
+
fi -= (fi.jd - @k + 1) % 7
|
|
90
|
+
|
|
91
|
+
ve = (fi..fi + 6).collect{|cu|
|
|
92
|
+
%w(Su Mo Tu We Th Fr Sa)[cu.wday]
|
|
93
|
+
}
|
|
94
|
+
ve += (fi..fi + 41).collect{|cu|
|
|
95
|
+
if cu.mon == m then cu.send(@da) end.to_s
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
ve = ve.collect{|e| e.rjust(@dw)}
|
|
99
|
+
|
|
100
|
+
gr = group(ve, 7)
|
|
101
|
+
gr = trans(gr) if @opt_t
|
|
102
|
+
ta = gr.collect{|xs| xs.join(' ')}
|
|
103
|
+
|
|
104
|
+
ca = %w(January February March April May June July
|
|
105
|
+
August September October November December)[m - 1]
|
|
106
|
+
ca = ca + ' ' + y.to_s if not @opt_y
|
|
107
|
+
ca = ca #.center(@mw)
|
|
108
|
+
|
|
109
|
+
ta.unshift(ca)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
def group(xs, n)
|
|
113
|
+
(0..xs.size / n - 1).collect{|i| xs[i * n, n]}
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
def trans(xs)
|
|
117
|
+
(0..xs[0].size - 1).collect{|i| xs.collect{|x| x[i]}}
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
def stack(xs)
|
|
121
|
+
if xs.empty? then [] else xs[0] + stack(xs[1..-1]) end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
def block(xs, n)
|
|
125
|
+
stack(group(xs, n).collect{|ys| trans(ys).collect{|zs| zs.join(' ')}})
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
def unlines(xs)
|
|
129
|
+
xs.collect{|x| x + "\n"}.join
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
def monthly(y, m)
|
|
133
|
+
if $lang == "nl"
|
|
134
|
+
return nl_pict(y,m)
|
|
135
|
+
end
|
|
136
|
+
return en_pict(y,m)
|
|
137
|
+
#unlines(pict(y, m))
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
def addmon(y, m, n)
|
|
141
|
+
y, m = (y * 12 + (m - 1) + n).divmod(12)
|
|
142
|
+
return y, m + 1
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
def yearly(y)
|
|
146
|
+
y.to_s.center(@tw) + "\n\n" +
|
|
147
|
+
unlines(block((0..11).collect{|n| pict(*addmon(y, 1, n))}, @mn)) + "\n"
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
def print(y, m)
|
|
151
|
+
set_params
|
|
152
|
+
if @opt_y then yearly(y) else monthly(y, m) end
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
data/extras/dict.rb
ADDED
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
# dict.rb - a client-side implementation of the DICT protocol (RFC 2229)
|
|
2
|
+
#
|
|
3
|
+
# $Id: dict.rb,v 1.25 2003/04/19 06:53:41 ianmacd Exp $
|
|
4
|
+
#
|
|
5
|
+
# Version : 0.9.2
|
|
6
|
+
# Author : Ian Macdonald <ian@caliban.org>
|
|
7
|
+
#
|
|
8
|
+
# Copyright (C) 2002-2003 Ian Macdonald
|
|
9
|
+
#
|
|
10
|
+
# This program is free software; you can redistribute it and/or modify
|
|
11
|
+
# it under the terms of the GNU General Public License as published by
|
|
12
|
+
# the Free Software Foundation; either version 2, or (at your option)
|
|
13
|
+
# any later version.
|
|
14
|
+
#
|
|
15
|
+
# This program is distributed in the hope that it will be useful,
|
|
16
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
17
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
18
|
+
# GNU General Public License for more details.
|
|
19
|
+
#
|
|
20
|
+
# You should have received a copy of the GNU General Public License
|
|
21
|
+
# along with this program; if not, write to the Free Software Foundation,
|
|
22
|
+
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
23
|
+
|
|
24
|
+
=begin
|
|
25
|
+
|
|
26
|
+
= NAME
|
|
27
|
+
Ruby/DICT - client-side DICT protocol library
|
|
28
|
+
= SYNOPSIS
|
|
29
|
+
|
|
30
|
+
require 'dict'
|
|
31
|
+
|
|
32
|
+
dict = DICT.new('dict.org', DICT::DEFAULT_PORT)
|
|
33
|
+
dict.client('a Ruby/DICT client')
|
|
34
|
+
definitions = dict.define(DICT::ALL_DATABASES, 'ruby')
|
|
35
|
+
|
|
36
|
+
if definitions
|
|
37
|
+
definitions.each do |d|
|
|
38
|
+
printf("From %s [%s]:\n\n", d.description, d.database)
|
|
39
|
+
d.definition.each { |line| print line }
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
dict.disconnect
|
|
44
|
+
|
|
45
|
+
= DESCRIPTION
|
|
46
|
+
Ruby/DICT is a client-side library implementation of the DICT protocol,
|
|
47
|
+
as described in ((<RFC 2229|URL:ftp://ftp.isi.edu/in-notes/rfc2229.txt>)).
|
|
48
|
+
= CLASS METHODS
|
|
49
|
+
--- DICT.new(hosts, port = DICT::DEFAULT_PORT, debug = false, verbose = false)
|
|
50
|
+
This creates a new instance of the DICT class. A DICT object has four
|
|
51
|
+
instance variables: ((|capabilities|)), ((|code|)), ((|message|)) and
|
|
52
|
+
((|msgid|)). ((|capabilities|)) is an array of Strings relating to
|
|
53
|
+
capabilities implemented on the server, ((|code|)) is the last status
|
|
54
|
+
code returned by the server, ((|message|)) is the text of the message
|
|
55
|
+
related to ((|code|)), and ((|msgid|)) is the message ID returned by the
|
|
56
|
+
server.
|
|
57
|
+
= INSTANCE METHODS
|
|
58
|
+
--- DICT#disconnect
|
|
59
|
+
Disconnect from the server.
|
|
60
|
+
--- DICT#define(database, word)
|
|
61
|
+
Obtain definitions for ((|word|)) from ((|database|)). A list of valid
|
|
62
|
+
databases can be obtained using DICT#show(DICT::DATABASES).
|
|
63
|
+
|
|
64
|
+
To show just the first definition found, use ((|DICT::FIRST_DATABASE|))
|
|
65
|
+
as the database name. To show definitions from all databases, use
|
|
66
|
+
((|DICT::ALL_DATABASES|)).
|
|
67
|
+
|
|
68
|
+
On success, this returns an array of Struct:Definition objects.
|
|
69
|
+
((*nil*)) is returned on failure.
|
|
70
|
+
--- DICT#match(database, strategy, word)
|
|
71
|
+
Obtain matches for ((|word|)) from ((|database|)) using ((|strategy|)).
|
|
72
|
+
|
|
73
|
+
On success, a hash of arrays is returned. The keys of the hash are the
|
|
74
|
+
database names and the values are arrays of word matches that were found
|
|
75
|
+
in that database. ((*nil*)) is returned on failure.
|
|
76
|
+
--- DICT#show_server
|
|
77
|
+
This method retrieves information on the server itself.
|
|
78
|
+
|
|
79
|
+
A String is returned on success, while ((*nil*)) is returned on failure.
|
|
80
|
+
--- DICT#show_db
|
|
81
|
+
This method retrieves information on the databases offered by the server.
|
|
82
|
+
|
|
83
|
+
A Hash indexed on database name and containing database descriptions
|
|
84
|
+
is returned on success, while ((*nil*)) is returned on failure.
|
|
85
|
+
--- DICT#show_info(database)
|
|
86
|
+
This method retrieves information on a particular database offered by
|
|
87
|
+
the server.
|
|
88
|
+
|
|
89
|
+
A String is returned on success, while ((*nil*)) is returned on failure.
|
|
90
|
+
--- DICT#show_strat
|
|
91
|
+
This method retrieves information on the strategies offered by the server.
|
|
92
|
+
|
|
93
|
+
A Hash indexed on strategy name and containing strategy descriptions
|
|
94
|
+
is returned on success, while ((*nil*)) is returned on failure.
|
|
95
|
+
--- DICT#status
|
|
96
|
+
This method returns a single line String of status information from the
|
|
97
|
+
server.
|
|
98
|
+
--- DICT#help
|
|
99
|
+
This method returns a String of help information from the server,
|
|
100
|
+
describing the commands it implements.
|
|
101
|
+
--- DICT#client
|
|
102
|
+
This method sends a single line String of information describing a client
|
|
103
|
+
application to the server.
|
|
104
|
+
--- DICT#auth(user, secret)
|
|
105
|
+
This method attempts to authenticate ((|user|)) to the server using
|
|
106
|
+
((|secret|)). Note that ((|secret|)) is not literally passed to the server.
|
|
107
|
+
= CONSTANTS
|
|
108
|
+
Ruby/DICT uses a lot of constants, mostly for the status codes
|
|
109
|
+
returned by DICT servers. See the source for details.
|
|
110
|
+
|
|
111
|
+
Some of the more interesting other constants:
|
|
112
|
+
: DICT::FIRST_DATABASE
|
|
113
|
+
Define or match, stopping at first database where match is found
|
|
114
|
+
: DICT::ALL_DATABASES
|
|
115
|
+
Define or match, gathering matches from all databases
|
|
116
|
+
: DICT::DEFAULT_MATCH_STRATEGY
|
|
117
|
+
Match using a server-dependent default strategy, which should be the best
|
|
118
|
+
strategy available for interactive spell checking
|
|
119
|
+
: DICT::DEFAULT_PORT
|
|
120
|
+
The default port used by DICT servers, namely 2628
|
|
121
|
+
: DICT::ERROR
|
|
122
|
+
A Regex constant matching any server status code indicating an error
|
|
123
|
+
= EXCEPTIONS
|
|
124
|
+
Exception classes are subclasses of the container class DICTError, which is,
|
|
125
|
+
itself, a subclass of RuntimeError
|
|
126
|
+
--- ConnectError.new(message, code = 2)
|
|
127
|
+
A ConnectError is raised if DICT::new is unable to connect to the chosen
|
|
128
|
+
DICT server for any reason. Program execution will terminate.
|
|
129
|
+
--- ProtocolError.new(message, code = 3)
|
|
130
|
+
A ProtocolError exception can be used if a server operation returns a
|
|
131
|
+
status code matching DICT::ERROR. This does not happen automatically. The
|
|
132
|
+
code is stored in the ((|code|)) attribute of the instance of the DICT
|
|
133
|
+
object. Program execution will terminate.
|
|
134
|
+
= AUTHOR
|
|
135
|
+
Written by Ian Macdonald <ian@caliban.org>
|
|
136
|
+
= COPYRIGHT
|
|
137
|
+
Copyright (C) 2002-2003 Ian Macdonald
|
|
138
|
+
|
|
139
|
+
This is free software; see the source for copying conditions.
|
|
140
|
+
There is NO warranty; not even for MERCHANTABILITY or FITNESS
|
|
141
|
+
FOR A PARTICULAR PURPOSE.
|
|
142
|
+
= SEE ALSO
|
|
143
|
+
* ((<"Ruby/DICT home page - http://www.caliban.org/ruby/"|URL:http://www.caliban.org/ruby/>))
|
|
144
|
+
* ((<"The DICT development group - http://www.dict.org/"|URL:http://www.dict.org/>))
|
|
145
|
+
* ((<"RFC 2229 - ftp://ftp.isi.edu/in-notes/rfc2229.txt"|URL:ftp://ftp.isi.edu/in-notes/rfc2229.txt>))
|
|
146
|
+
= BUGS
|
|
147
|
+
Send all bug reports, enhancement requests and patches to the
|
|
148
|
+
author.
|
|
149
|
+
= HISTORY
|
|
150
|
+
$Id: dict.rb,v 1.25 2003/04/19 06:53:41 ianmacd Exp $
|
|
151
|
+
|
|
152
|
+
=end
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
require 'socket'
|
|
156
|
+
require 'md5'
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
# lines that start with .. need to be reduced to .
|
|
160
|
+
#
|
|
161
|
+
class String
|
|
162
|
+
def undot!
|
|
163
|
+
sub!(/^\.\./, '.')
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
# a basic exception class for DICT errors
|
|
169
|
+
#
|
|
170
|
+
class DICTError < RuntimeError
|
|
171
|
+
def initialize(message, code = 1)
|
|
172
|
+
$stderr.puts message
|
|
173
|
+
exit code
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
# deal with connection errors
|
|
179
|
+
#
|
|
180
|
+
class ConnectError < DICTError
|
|
181
|
+
def initialize(message, code = 2)
|
|
182
|
+
super
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
# deal with status code errors
|
|
188
|
+
#
|
|
189
|
+
class ProtocolError < DICTError
|
|
190
|
+
def initialize(message, code = 3)
|
|
191
|
+
super
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# a structure for definitions
|
|
196
|
+
#
|
|
197
|
+
Definition = Struct.new('Definition', :word, :definition, :database,
|
|
198
|
+
:description)
|
|
199
|
+
|
|
200
|
+
class DICT
|
|
201
|
+
attr_reader :capabilities, :code, :message, :msgid
|
|
202
|
+
|
|
203
|
+
DATABASES_PRESENT = '110'
|
|
204
|
+
STRATEGIES_AVAILABLE = '111'
|
|
205
|
+
DATABASE_INFORMATION = '112'
|
|
206
|
+
HELP_TEXT = '113'
|
|
207
|
+
SERVER_INFORMATION = '114'
|
|
208
|
+
CHALLENGE_FOLLOWS = '130'
|
|
209
|
+
DEFINITIONS_RETRIEVED = '150'
|
|
210
|
+
WORD_DEFINITION = '151'
|
|
211
|
+
MATCHES_PRESENT = '152'
|
|
212
|
+
STATUS_RESPONSE = '210'
|
|
213
|
+
CONNECTION_ESTABLISHED = '220'
|
|
214
|
+
CLOSING_CONNECTION = '221'
|
|
215
|
+
AUTHENTICATION_SUCCESSFUL = '230'
|
|
216
|
+
OK = '250'
|
|
217
|
+
SEND_RESPONSE = '330'
|
|
218
|
+
TEMPORARILY_UNAVAILABLE = '420'
|
|
219
|
+
SHUTTING_DOWN = '421'
|
|
220
|
+
UNRECOGNISED_COMMAND = '500'
|
|
221
|
+
ILLEGAL_PARAMETERS = '501'
|
|
222
|
+
COMMAND_NOT_IMPLEMENTED = '502'
|
|
223
|
+
PARAMETER_NOT_IMPLEMENTED = '503'
|
|
224
|
+
ACCESS_DENIED = '530'
|
|
225
|
+
AUTH_DENIED = '531'
|
|
226
|
+
UNKNOWN_MECHANISM = '532'
|
|
227
|
+
INVALID_DATABASE = '550'
|
|
228
|
+
INVALID_STRATEGY = '551'
|
|
229
|
+
NO_MATCH = '552'
|
|
230
|
+
NO_DATABASES_PRESENT = '554'
|
|
231
|
+
NO_STRATEGIES_AVAILABLE = '555'
|
|
232
|
+
|
|
233
|
+
ALL_DATABASES = '*'
|
|
234
|
+
DEFAULT_MATCH_STRATEGY = '.'
|
|
235
|
+
DEFAULT_PORT = 2628
|
|
236
|
+
ERROR = /^[45]/
|
|
237
|
+
FIRST_DATABASE = '!'
|
|
238
|
+
MAX_LINE_LENGTH = 1024
|
|
239
|
+
PAIR = /^(\S+)\s"(.+)"\r$/
|
|
240
|
+
REPLY_CODE = /^\d\d\d/
|
|
241
|
+
|
|
242
|
+
def initialize(hosts, port = DEFAULT_PORT, debug = false, verbose = false)
|
|
243
|
+
hosts.each do |host|
|
|
244
|
+
@debug = debug
|
|
245
|
+
@verbose = verbose
|
|
246
|
+
printf("Attempting to connect to %s:%d...\n", host, port) if @verbose
|
|
247
|
+
|
|
248
|
+
begin
|
|
249
|
+
@sock = TCPSocket.open(host, port)
|
|
250
|
+
rescue
|
|
251
|
+
next # cycle through list of servers, if more than one
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
break # continue if connection to this host succeeded
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# catch failure
|
|
258
|
+
raise ConnectError, 'Unable to connect to host' unless defined? @sock
|
|
259
|
+
|
|
260
|
+
# check status line on connect
|
|
261
|
+
line = get_line
|
|
262
|
+
raise ConnectError, line if line =~ ERROR
|
|
263
|
+
|
|
264
|
+
caps, @msgid = /<(.+?)>\s(<.+>)/.match(line)[1..2]
|
|
265
|
+
@capabilities = caps.split(/\./)
|
|
266
|
+
if @verbose
|
|
267
|
+
printf("Capabilities: %s\n", @capabilities.join(', '))
|
|
268
|
+
printf("Msgid: %s\n", @msgid)
|
|
269
|
+
end
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
private
|
|
273
|
+
|
|
274
|
+
# output a line to the server
|
|
275
|
+
#
|
|
276
|
+
def send_line(command)
|
|
277
|
+
line = command + "\r\n"
|
|
278
|
+
$stderr.printf("SEND: %s", line) if @debug
|
|
279
|
+
@sock.print(line)
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
# get a line of input from the server
|
|
283
|
+
#
|
|
284
|
+
def get_line
|
|
285
|
+
line = @sock.readline("\r\n")
|
|
286
|
+
$stderr.printf("RECV: %s", line) if @debug
|
|
287
|
+
line
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# send a command and get a response
|
|
291
|
+
#
|
|
292
|
+
def exec_cmd(command)
|
|
293
|
+
send_line(command)
|
|
294
|
+
line = get_line
|
|
295
|
+
@code, @message = /^(\d\d\d)\s(.*)$/.match(line)[1..2]
|
|
296
|
+
# remember the command just executed
|
|
297
|
+
@command = command
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# determine whether we're at the end of this response
|
|
301
|
+
#
|
|
302
|
+
def end_of_text?(line)
|
|
303
|
+
line =~ /^\.\r$/ ? true : false
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# generic method to issue command and parse response
|
|
307
|
+
#
|
|
308
|
+
def parse_response
|
|
309
|
+
return nil if @code =~ ERROR
|
|
310
|
+
|
|
311
|
+
while line = get_line
|
|
312
|
+
# on first pass through loop, create list as either a hash
|
|
313
|
+
# or a string, depending # on what data looks like
|
|
314
|
+
list ||= line =~ PAIR ? Hash.new : ''
|
|
315
|
+
|
|
316
|
+
# check for end of data
|
|
317
|
+
return list if line =~ REPLY_CODE
|
|
318
|
+
|
|
319
|
+
if ! end_of_text? line
|
|
320
|
+
line.undot!
|
|
321
|
+
(list << line; next) if list.is_a?(String) # list is just text
|
|
322
|
+
|
|
323
|
+
# list is a hash of data pairings
|
|
324
|
+
name, desc = PAIR.match(line)[1..2]
|
|
325
|
+
if @command =~ /^MATCH/
|
|
326
|
+
list[name] = Array.new unless list[name]
|
|
327
|
+
list[name] << desc
|
|
328
|
+
else
|
|
329
|
+
list[name] = desc
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
end
|
|
333
|
+
end
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
public
|
|
337
|
+
|
|
338
|
+
# QUIT from the server
|
|
339
|
+
#
|
|
340
|
+
def disconnect
|
|
341
|
+
exec_cmd('QUIT')
|
|
342
|
+
@sock.close
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
# DEFINE a word
|
|
346
|
+
#
|
|
347
|
+
def define(db, word)
|
|
348
|
+
definitions = Array.new
|
|
349
|
+
d = Definition.new
|
|
350
|
+
d.word = word
|
|
351
|
+
d.definition = Array.new
|
|
352
|
+
|
|
353
|
+
exec_cmd('DEFINE %s "%s"' % [ db, word ])
|
|
354
|
+
|
|
355
|
+
return nil if @code =~ ERROR
|
|
356
|
+
|
|
357
|
+
while line = get_line
|
|
358
|
+
return definitions if line =~ /^#{OK}/
|
|
359
|
+
|
|
360
|
+
if line =~ /^#{WORD_DEFINITION}/
|
|
361
|
+
word, d.database, d.description =
|
|
362
|
+
/^\d\d\d\s"(.+?)"\s(\S+)\s"(.+)"\r$/.match(line)[1..3]
|
|
363
|
+
elsif end_of_text? line # finish definition and start a new one
|
|
364
|
+
definitions << d
|
|
365
|
+
d = Definition.new
|
|
366
|
+
d.word = word
|
|
367
|
+
d.definition = Array.new
|
|
368
|
+
else
|
|
369
|
+
line.undot!
|
|
370
|
+
d.definition << line
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
end
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
# MATCH a word
|
|
377
|
+
#
|
|
378
|
+
def match(db, strategy, word)
|
|
379
|
+
exec_cmd('MATCH %s %s "%s"' % [ db, strategy, word ])
|
|
380
|
+
parse_response
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
# get database list
|
|
384
|
+
#
|
|
385
|
+
def show_db
|
|
386
|
+
exec_cmd("SHOW DB")
|
|
387
|
+
parse_response
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
# get strategy list
|
|
391
|
+
#
|
|
392
|
+
def show_strat
|
|
393
|
+
exec_cmd("SHOW STRAT")
|
|
394
|
+
parse_response
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
# get information on database
|
|
398
|
+
#
|
|
399
|
+
def show_info(db)
|
|
400
|
+
exec_cmd('SHOW INFO %s' % db)
|
|
401
|
+
parse_response
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
# get server information
|
|
405
|
+
#
|
|
406
|
+
def show_server
|
|
407
|
+
exec_cmd("SHOW SERVER")
|
|
408
|
+
parse_response
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
# request server STATUS information
|
|
412
|
+
#
|
|
413
|
+
def status
|
|
414
|
+
exec_cmd('STATUS')
|
|
415
|
+
@message
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
# request server-side HELP
|
|
419
|
+
#
|
|
420
|
+
def help
|
|
421
|
+
exec_cmd('HELP')
|
|
422
|
+
parse_response
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
# send CLIENT information
|
|
426
|
+
#
|
|
427
|
+
def client(info)
|
|
428
|
+
exec_cmd('CLIENT %s' % info)
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
# AUTHorise user
|
|
432
|
+
#
|
|
433
|
+
def auth(user, secret)
|
|
434
|
+
auth = MD5::new(@msgid + secret).hexdigest
|
|
435
|
+
exec_cmd('AUTH %s %s' % [ user, auth ])
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require 'logger'
|
|
2
|
+
|
|
3
|
+
module Icalendar #:nodoc:
|
|
4
|
+
class IcalendarError < StandardError #:nodoc:
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
class InvalidComponentClass < IcalendarError
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
class InvalidPropertyValue < IcalendarError
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
class Base
|
|
14
|
+
@@logger = Logger.new(STDOUT)
|
|
15
|
+
@@logger.level = Logger::INFO
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
module Icalendar
|
|
2
|
+
class Calendar < Component
|
|
3
|
+
|
|
4
|
+
attr_accessor :events, :todos, :journals, :freebusys, :timezones
|
|
5
|
+
|
|
6
|
+
def initialize()
|
|
7
|
+
super("VCALENDAR")
|
|
8
|
+
@properties = {}
|
|
9
|
+
@property_params = {}
|
|
10
|
+
|
|
11
|
+
@events = []
|
|
12
|
+
@todos = []
|
|
13
|
+
@journals = []
|
|
14
|
+
@freebusys = []
|
|
15
|
+
@timezones = []
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def add(component)
|
|
19
|
+
if component.is_a? Event
|
|
20
|
+
@events << component
|
|
21
|
+
elsif component.is_a? Todo
|
|
22
|
+
@todos << component
|
|
23
|
+
elsif component.is_a? Journal
|
|
24
|
+
@journals << component
|
|
25
|
+
elsif component.is_a? Freebusy
|
|
26
|
+
@freebusys << component
|
|
27
|
+
elsif component.is_a? Timezone
|
|
28
|
+
@timezones << component
|
|
29
|
+
else
|
|
30
|
+
raise InvalidComponentClass
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def to_s
|
|
35
|
+
print_string do |s|
|
|
36
|
+
@events.each { |event| s << event.to_s }
|
|
37
|
+
@todos.each { |todo| s << todo.to_s }
|
|
38
|
+
@journals.each { |journal| s << journal.to_s }
|
|
39
|
+
@freebusys.each { |freebusy| s << freebusy.to_s }
|
|
40
|
+
@timezones.each { |timezone| s << timezone.to_s }
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|