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
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
module Icalendar
|
|
2
|
+
class CalendarParser < Icalendar::Base
|
|
3
|
+
# 1*(ALPHA / DIGIT / "=")
|
|
4
|
+
NAME = '[-a-z0-9]+'
|
|
5
|
+
|
|
6
|
+
# <"> <Any character except CTLs, DQUOTE> <">
|
|
7
|
+
QSTR = '"[^"]*"'
|
|
8
|
+
|
|
9
|
+
# *<Any character except CTLs, DQUOTE, ";", ":", ",">
|
|
10
|
+
PTEXT = '[^";:,]*'
|
|
11
|
+
|
|
12
|
+
# param-value = ptext / quoted-string
|
|
13
|
+
PVALUE = "#{PTEXT}|#{QSTR}"
|
|
14
|
+
|
|
15
|
+
# Contentline
|
|
16
|
+
LINE = "(#{NAME})([^:]*)\:(.*)"
|
|
17
|
+
|
|
18
|
+
# param = name "=" param-value *("," param-value)
|
|
19
|
+
# Note: v2.1 allows a type or encoding param-value to appear without the type=
|
|
20
|
+
# or the encoding=. This is hideous, but we try and support it, if there # is no "=", then $2 will be "", and we will treat it as a v2.1 param.
|
|
21
|
+
PARAM = ";(#{NAME})(=?)((?:#{PVALUE})(?:,#{PVALUE})*)"
|
|
22
|
+
|
|
23
|
+
# date = date-fullyear ["-"] date-month ["-"] date-mday
|
|
24
|
+
# date-fullyear = 4 DIGIT
|
|
25
|
+
# date-month = 2 DIGIT
|
|
26
|
+
# date-mday = 2 DIGIT
|
|
27
|
+
DATE = '(\d\d\d\d)-?(\d\d)-?(\d\d)'
|
|
28
|
+
|
|
29
|
+
# time = time-hour [":"] time-minute [":"] time-second [time-secfrac] [time-zone]
|
|
30
|
+
# time-hour = 2 DIGIT
|
|
31
|
+
# time-minute = 2 DIGIT
|
|
32
|
+
# time-second = 2 DIGIT
|
|
33
|
+
# time-secfrac = "," 1*DIGIT
|
|
34
|
+
# time-zone = "Z" / time-numzone
|
|
35
|
+
# time-numzome = sign time-hour [":"] time-minute
|
|
36
|
+
TIME = '(\d\d):?(\d\d):?(\d\d)(\.\d+)?(Z|[-+]\d\d:?\d\d)?'
|
|
37
|
+
|
|
38
|
+
def initialize(src)
|
|
39
|
+
@@logger.info("New Calendar Parser")
|
|
40
|
+
|
|
41
|
+
# Define the next line method different depending on whether
|
|
42
|
+
# this is a string or an IO object so we can be efficient about
|
|
43
|
+
# parsing large files...
|
|
44
|
+
|
|
45
|
+
# Just do the unfolding work in one shot if its a whole string
|
|
46
|
+
if src.respond_to?(:split)
|
|
47
|
+
unfolded = []
|
|
48
|
+
|
|
49
|
+
# Split into an array of lines, then unfold those into a new array
|
|
50
|
+
src.split(/\r?\n/).each do |line|
|
|
51
|
+
|
|
52
|
+
# If it's a continuation line, add it to the last.
|
|
53
|
+
# If it's an empty line, drop it from the input.
|
|
54
|
+
if( line =~ /^[ \t]/ )
|
|
55
|
+
unfolded << unfolded.pop + line[1, line.size-1]
|
|
56
|
+
elsif( line =~ /^$/ )
|
|
57
|
+
else
|
|
58
|
+
unfolded << line
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
@lines = unfolded
|
|
63
|
+
@index = 0
|
|
64
|
+
|
|
65
|
+
# Now that we are unfolded we can just iterate through the array.
|
|
66
|
+
# Dynamically define next line for a string.
|
|
67
|
+
def next_line
|
|
68
|
+
if @index == @lines.size
|
|
69
|
+
return nil
|
|
70
|
+
else
|
|
71
|
+
line = @lines[@index]
|
|
72
|
+
@index += 1
|
|
73
|
+
return line
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# If its a file we need to read and unfold on the go to save from reading
|
|
78
|
+
# large amounts of data into memory.
|
|
79
|
+
elsif src.respond_to?(:gets)
|
|
80
|
+
@file = src
|
|
81
|
+
@prev_line = src.gets
|
|
82
|
+
if !@prev_line.nil?
|
|
83
|
+
@prev_line.chomp!
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Dynamically define next line for an IO object
|
|
87
|
+
def next_line
|
|
88
|
+
line = @prev_line
|
|
89
|
+
|
|
90
|
+
if line.nil?
|
|
91
|
+
return nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Loop through until we get to a non-continuation line...
|
|
95
|
+
loop do
|
|
96
|
+
nextLine = @file.gets
|
|
97
|
+
if !nextLine.nil?
|
|
98
|
+
nextLine.chomp!
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# If it's a continuation line, add it to the last.
|
|
102
|
+
# If it's an empty line, drop it from the input.
|
|
103
|
+
if( nextLine =~ /^[ \t]/ )
|
|
104
|
+
line << nextLine[1, nextLine.size]
|
|
105
|
+
elsif( nextLine =~ /^$/ )
|
|
106
|
+
else
|
|
107
|
+
@prev_line = nextLine
|
|
108
|
+
break
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
line
|
|
112
|
+
end
|
|
113
|
+
else
|
|
114
|
+
raise ArgumentError, "CalendarParser.new cannot be called with a #{src.class} type!"
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Parse the calendar into an object representation
|
|
119
|
+
def parse
|
|
120
|
+
calendars = []
|
|
121
|
+
|
|
122
|
+
# Outer loop for Calendar objects
|
|
123
|
+
while (line = next_line)
|
|
124
|
+
fields = parse_line(line)
|
|
125
|
+
|
|
126
|
+
# Just iterate through until we find the beginning of a calendar object
|
|
127
|
+
if fields[:name] == "BEGIN" and fields[:value] == "VCALENDAR"
|
|
128
|
+
cal = parse_calendar
|
|
129
|
+
calendars << cal
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
calendars
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Parse a single VCALENDAR object
|
|
137
|
+
# -- This should consist of the PRODID, VERSION, option METHOD & CALSCALE,
|
|
138
|
+
# and then one or more calendar components: VEVENT, VTODO, VJOURNAL,
|
|
139
|
+
# VFREEBUSY, VTIMEZONE
|
|
140
|
+
def parse_calendar(component = Calendar.new)
|
|
141
|
+
while (line = next_line)
|
|
142
|
+
fields = parse_line(line)
|
|
143
|
+
|
|
144
|
+
name = fields[:name]
|
|
145
|
+
|
|
146
|
+
# Although properties are supposed to come before components, we should
|
|
147
|
+
# be able to handle them in any order...
|
|
148
|
+
if name == "END"
|
|
149
|
+
break
|
|
150
|
+
elsif name == "BEGIN" # New component
|
|
151
|
+
case(fields[:value])
|
|
152
|
+
when "VEVENT"
|
|
153
|
+
component.events << parse_calendar(Event.new)
|
|
154
|
+
when "VTODO"
|
|
155
|
+
component.todos << parse_calendar(Todo.new)
|
|
156
|
+
when "VJOURNAL"
|
|
157
|
+
component.journals << parse_calendar(Journal.new)
|
|
158
|
+
when "VFREEBUSY"
|
|
159
|
+
component.freebusys << parse_calendar(Freebusy.new)
|
|
160
|
+
when "VTIMEZONE"
|
|
161
|
+
component.timezones << parse_calendar(Timezone.new)
|
|
162
|
+
when "VALARM"
|
|
163
|
+
component.alarms << parse_calendar(Alarm.new)
|
|
164
|
+
end
|
|
165
|
+
else # If its not a component then it should be properties...
|
|
166
|
+
|
|
167
|
+
# Just set the properties ourselves so that the parser can still
|
|
168
|
+
# parse invalid files...
|
|
169
|
+
@@logger.debug("Setting #{name} => #{fields[:value]}")
|
|
170
|
+
component.properties[name] = fields[:value]
|
|
171
|
+
if not fields[:params].empty?
|
|
172
|
+
component.property_params[name] = fields[:params]
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# This will generate the correctly formed calls to the dynamic method
|
|
176
|
+
# handler.
|
|
177
|
+
# component.send("#{name}=", fields[:value])
|
|
178
|
+
# component.send("#{name}_params=", fields[:params]) unless fields[:params].empty?
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
component
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
def parse_line(line)
|
|
186
|
+
unless line =~ %r{#{LINE}}i # Case insensitive match for a valid line
|
|
187
|
+
raise "Invalid line in calendar string!"
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
name = $1.upcase # The case insensitive part is upcased for easier comparison...
|
|
191
|
+
paramslist = $2
|
|
192
|
+
value = $3
|
|
193
|
+
|
|
194
|
+
params = {}
|
|
195
|
+
|
|
196
|
+
# Collect the params, if any.
|
|
197
|
+
if paramslist.size > 1
|
|
198
|
+
|
|
199
|
+
# v3.0 and v2.1 params
|
|
200
|
+
paramslist.scan( %r{#{PARAM}}i ) do
|
|
201
|
+
|
|
202
|
+
# param names are case-insensitive, and multi-valued
|
|
203
|
+
pname = $1
|
|
204
|
+
pvals = $3
|
|
205
|
+
|
|
206
|
+
# v2.1 pvals have no '=' sign, figure out what kind of param it
|
|
207
|
+
# is (either its a known encoding, or we treat it as a 'type'
|
|
208
|
+
# param).
|
|
209
|
+
if $2 == ""
|
|
210
|
+
pvals = $1
|
|
211
|
+
case $1
|
|
212
|
+
when /quoted-printable/i
|
|
213
|
+
pname = 'encoding'
|
|
214
|
+
|
|
215
|
+
when /base64/i
|
|
216
|
+
pname = 'encoding'
|
|
217
|
+
|
|
218
|
+
else
|
|
219
|
+
pname = 'type'
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
unless params.key? pname
|
|
224
|
+
params[pname] = []
|
|
225
|
+
end
|
|
226
|
+
pvals.scan( %r{(#{PVALUE})} ) do
|
|
227
|
+
if $1.size > 0
|
|
228
|
+
params[pname] << $1
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
{:name => name, :params => params, :value => value}
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module Icalendar
|
|
2
|
+
# An Alarm calendar component is a grouping of component
|
|
3
|
+
# properties that is a reminder or alarm for an event or a
|
|
4
|
+
# to-do. For example, it may be used to define a reminder for a
|
|
5
|
+
# pending Event or an overdue Todo.
|
|
6
|
+
class Alarm < Component
|
|
7
|
+
def initialize()
|
|
8
|
+
super("VALARM")
|
|
9
|
+
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def to_s
|
|
13
|
+
print_string {}
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Icalendar
|
|
2
|
+
# A Event calendar component is a grouping of component
|
|
3
|
+
# properties, and possibly including Alarm calendar components, that
|
|
4
|
+
# represents a scheduled amount of time on a calendar. For example, it
|
|
5
|
+
# can be an activity; such as a one-hour long, department meeting from
|
|
6
|
+
# 8:00 AM to 9:00 AM, tomorrow. Generally, an event will take up time
|
|
7
|
+
# on an individual calendar.
|
|
8
|
+
class Event < Component
|
|
9
|
+
include Dtstart
|
|
10
|
+
|
|
11
|
+
attr_accessor :alarms
|
|
12
|
+
|
|
13
|
+
def initialize()
|
|
14
|
+
super("VEVENT")
|
|
15
|
+
|
|
16
|
+
@alarms = []
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def to_s
|
|
20
|
+
print_string do |s|
|
|
21
|
+
@alarms.each { |alarm| s << alarm.to_s }
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
module Icalendar
|
|
2
|
+
# A Freebusy calendar component is a grouping of
|
|
3
|
+
# component properties that represents either a request for, a reply to
|
|
4
|
+
# a request for free or busy time information or a published set of
|
|
5
|
+
# busy time information.
|
|
6
|
+
class Freebusy < Component
|
|
7
|
+
|
|
8
|
+
def initialize()
|
|
9
|
+
super("VFREEBUSY")
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Icalendar
|
|
2
|
+
# A Journal calendar component is a grouping of
|
|
3
|
+
# component properties that represent one or more descriptive text
|
|
4
|
+
# notes associated with a particular calendar date. The "DTSTART"
|
|
5
|
+
# property is used to specify the calendar date that the journal entry
|
|
6
|
+
# is associated with. Generally, it will have a DATE value data type,
|
|
7
|
+
# but it can also be used to specify a DATE-TIME value data type.
|
|
8
|
+
# Examples of a journal entry include a daily record of a legislative
|
|
9
|
+
# body or a journal entry of individual telephone contacts for the day
|
|
10
|
+
# or an ordered list of accomplishments for the day. The Journal
|
|
11
|
+
# calendar component can also be used to associate a document with a
|
|
12
|
+
# calendar date.
|
|
13
|
+
class Journal < Component
|
|
14
|
+
|
|
15
|
+
def initialize()
|
|
16
|
+
super("VJOURNAL")
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def to_s
|
|
20
|
+
print_string { }
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module Icalendar
|
|
2
|
+
# A Timezone is unambiguously defined by the set of time
|
|
3
|
+
# measurement rules determined by the governing body for a given
|
|
4
|
+
# geographic area. These rules describe at a minimum the base offset
|
|
5
|
+
# from UTC for the time zone, often referred to as the Standard Time
|
|
6
|
+
# offset. Many locations adjust their Standard Time forward or backward
|
|
7
|
+
# by one hour, in order to accommodate seasonal changes in number of
|
|
8
|
+
# daylight hours, often referred to as Daylight Saving Time. Some
|
|
9
|
+
# locations adjust their time by a fraction of an hour. Standard Time
|
|
10
|
+
# is also known as Winter Time. Daylight Saving Time is also known as
|
|
11
|
+
# Advanced Time, Summer Time, or Legal Time in certain countries. The
|
|
12
|
+
# following table shows the changes in time zone rules in effect for
|
|
13
|
+
# New York City starting from 1967. Each line represents a description
|
|
14
|
+
# or rule for a particular observance.
|
|
15
|
+
class Timezone < Component
|
|
16
|
+
|
|
17
|
+
def initialize()
|
|
18
|
+
super("VTIMEZONE")
|
|
19
|
+
@components = components
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def to_s
|
|
23
|
+
super.to_s { |s| s << @components.each { |component| component.to_s } }
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module Icalendar
|
|
2
|
+
# A Todo calendar component is a grouping of component
|
|
3
|
+
# properties and possibly Alarm calendar components that represent
|
|
4
|
+
# an action-item or assignment. For example, it can be used to
|
|
5
|
+
# represent an item of work assigned to an individual; such as "turn in
|
|
6
|
+
# travel expense today".
|
|
7
|
+
class Todo < Component
|
|
8
|
+
|
|
9
|
+
attr_reader :alarms
|
|
10
|
+
|
|
11
|
+
def initialize()
|
|
12
|
+
super("VTODO")
|
|
13
|
+
|
|
14
|
+
@alarms = alarms
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def to_s
|
|
18
|
+
print_string { |s| @alarms.each { |alarm| alarm.to_s } }
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
module Icalendar
|
|
2
|
+
# The body of the iCalendar object consists of a sequence of calendar
|
|
3
|
+
# properties and one or more calendar components. The calendar
|
|
4
|
+
# properties are attributes that apply to the calendar as a whole. The
|
|
5
|
+
# calendar components are collections of properties that express a
|
|
6
|
+
# particular calendar semantic. For example, the calendar component can
|
|
7
|
+
# specify an event, a to-do, a journal entry, time zone information, or
|
|
8
|
+
# free/busy time information, or an alarm.
|
|
9
|
+
class Component < Icalendar::Base
|
|
10
|
+
|
|
11
|
+
attr_reader :name
|
|
12
|
+
attr_accessor :properties, :property_params
|
|
13
|
+
|
|
14
|
+
def initialize(name)
|
|
15
|
+
@name = name
|
|
16
|
+
@properties = {}
|
|
17
|
+
@property_params = {}
|
|
18
|
+
|
|
19
|
+
@@logger.info("New #{@name[1,@name.size].capitalize}...")
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def print_string
|
|
23
|
+
s = ""
|
|
24
|
+
|
|
25
|
+
# Begin a new component
|
|
26
|
+
s << "BEGIN:#{@name.upcase}\r\n"
|
|
27
|
+
|
|
28
|
+
# Then print the properties, possible parameters and potentially
|
|
29
|
+
# multiple parameter values for each parameter.
|
|
30
|
+
@properties.each do |key,value|
|
|
31
|
+
# Property name
|
|
32
|
+
s << "#{key.upcase}"
|
|
33
|
+
|
|
34
|
+
# Possible parameters
|
|
35
|
+
if @property_params.has_key?(key)
|
|
36
|
+
params = @property_params[key]
|
|
37
|
+
params.each do |key,val|
|
|
38
|
+
s << ";#{key}"
|
|
39
|
+
unless val.respond_to?(:to_ary)
|
|
40
|
+
val = [ val ]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Possible parameter values
|
|
44
|
+
unless val.empty?
|
|
45
|
+
s << "="
|
|
46
|
+
sep = "" # First entry comes after = sign, but then we need commas
|
|
47
|
+
val.each do |pval|
|
|
48
|
+
s << sep << pval
|
|
49
|
+
sep = ","
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Property value
|
|
56
|
+
s << ":#{value}\r\n"
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Any custom body of the derived component
|
|
60
|
+
yield(s)
|
|
61
|
+
|
|
62
|
+
# End of this component
|
|
63
|
+
s << "END:#{@name.upcase}\r\n"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Dynamically execute getters and setters for properties and
|
|
67
|
+
# property parameters. This lets us handle all the general text properties
|
|
68
|
+
# as well as custom app related properties in a natural way, but we don't
|
|
69
|
+
# have to write a million getters and setters for every possible thing we
|
|
70
|
+
# want to support.
|
|
71
|
+
def method_missing(method_id, *args)
|
|
72
|
+
method_name = method_id.id2name.upcase
|
|
73
|
+
|
|
74
|
+
if method_name =~ /\w+_PARAMS/ # Its a parameter request
|
|
75
|
+
hash = @property_params
|
|
76
|
+
val = args
|
|
77
|
+
else # Or its a property request
|
|
78
|
+
hash = @properties
|
|
79
|
+
val = args.first unless args.empty?
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if method_name =~ /(.*)(=)/ # Its a setter
|
|
83
|
+
hash[$1] = val
|
|
84
|
+
@@logger.debug("Setting #{$1} => #{val}")
|
|
85
|
+
else # Or its a getter
|
|
86
|
+
@@logger.debug("Getting #{method_name} => #{hash[method_name]}")
|
|
87
|
+
return hash[method_name]
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
module Icalendar
|
|
2
|
+
# date = date-fullyear date-month date-mday
|
|
3
|
+
# date-fullyear = 4 DIGIT
|
|
4
|
+
# date-month = 2 DIGIT
|
|
5
|
+
# date-mday = 2 DIGIT
|
|
6
|
+
DATE = '(\d\d\d\d)(\d\d)(\d\d)'
|
|
7
|
+
|
|
8
|
+
# time = time-hour [":"] time-minute [":"] time-second [time-secfrac] [time-zone]
|
|
9
|
+
# time-hour = 2 DIGIT
|
|
10
|
+
# time-minute = 2 DIGIT
|
|
11
|
+
# time-second = 2 DIGIT
|
|
12
|
+
# time-secfrac = "," 1*DIGIT
|
|
13
|
+
# time-zone = "Z" / time-numzone
|
|
14
|
+
# time-numzome = sign time-hour [":"] time-minute
|
|
15
|
+
TIME = '(\d\d)(\d\d)(\d\d)(Z)?'
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# Maps to dtstart property
|
|
19
|
+
# TODO: Look into having the DateTime library do more of the work...
|
|
20
|
+
module Dtstart
|
|
21
|
+
|
|
22
|
+
# Set the starting DateTime of an Event, Todo,
|
|
23
|
+
# Freebusy or Timezone component. If utc is set to true
|
|
24
|
+
# then this time represents absolute time without regard for
|
|
25
|
+
# timezone information.
|
|
26
|
+
def setStart(start, utc = false)
|
|
27
|
+
if start.respond_to?(:year) # Date format
|
|
28
|
+
s = ""
|
|
29
|
+
|
|
30
|
+
# 4 digit year
|
|
31
|
+
s << start.year.to_s
|
|
32
|
+
|
|
33
|
+
# Double digit month
|
|
34
|
+
s << "0" unless start.month > 9
|
|
35
|
+
s << start.month.to_s
|
|
36
|
+
|
|
37
|
+
# Double digit day
|
|
38
|
+
s << "0" unless start.day > 9
|
|
39
|
+
s << start.day.to_s
|
|
40
|
+
else
|
|
41
|
+
raise InvalidPropertyValue, "Cannot access year on start argument object!"
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
if start.respond_to?(:hour) # include Time format if possible
|
|
45
|
+
s << "T"
|
|
46
|
+
|
|
47
|
+
# Double digit hour
|
|
48
|
+
s << "0" unless start.hour > 9
|
|
49
|
+
s << start.hour.to_s
|
|
50
|
+
|
|
51
|
+
# Double digit minute
|
|
52
|
+
s << "0" unless start.min > 9
|
|
53
|
+
s << start.min.to_s
|
|
54
|
+
|
|
55
|
+
# Double digit second
|
|
56
|
+
s << "0" unless start.sec > 9
|
|
57
|
+
s << start.sec.to_s
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# UTC time gets a Z suffix
|
|
61
|
+
if utc
|
|
62
|
+
s << "Z"
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
@properties["DTSTART"] = s
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Returns the starting DateTime of an Event, Todo, Freebusy or
|
|
69
|
+
# Timezone component.
|
|
70
|
+
def getStart
|
|
71
|
+
# If we don't have a start time then return nil.
|
|
72
|
+
unless @properties.has_key?("DTSTART")
|
|
73
|
+
return nil
|
|
74
|
+
end
|
|
75
|
+
s = @properties["DTSTART"]
|
|
76
|
+
|
|
77
|
+
# If we can't parse the start time figure its bad and return nil.
|
|
78
|
+
unless s =~ %r{#{DATE}}i
|
|
79
|
+
return nil
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# We can at least create a Date object
|
|
83
|
+
year = $1
|
|
84
|
+
month = $2
|
|
85
|
+
day = $3
|
|
86
|
+
|
|
87
|
+
puts "s: #{s}"
|
|
88
|
+
puts "#{DATE}T#{TIME}"
|
|
89
|
+
# We might be able to get the time too
|
|
90
|
+
if s =~ %r{"#{DATE}T#{TIME}"}i
|
|
91
|
+
hour = $5
|
|
92
|
+
min = $6
|
|
93
|
+
sec = $7
|
|
94
|
+
|
|
95
|
+
puts "Hour: #{hour.to_s}"
|
|
96
|
+
|
|
97
|
+
return DateTime.new(year, month, day, hour, min, sec)
|
|
98
|
+
else
|
|
99
|
+
return Date.new(year.to_i, month.to_i, day.to_i)
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Icalendar
|
|
2
|
+
|
|
3
|
+
# A property can have attributes associated with it. These "property
|
|
4
|
+
# parameters" contain meta-information about the property or the
|
|
5
|
+
# property value. Property parameters are provided to specify such
|
|
6
|
+
# information as the location of an alternate text representation for a
|
|
7
|
+
# property value, the language of a text property value, the data type
|
|
8
|
+
# of the property value and other attributes.
|
|
9
|
+
class Parameter < Icalendar::Content
|
|
10
|
+
|
|
11
|
+
def to_s
|
|
12
|
+
s = ""
|
|
13
|
+
|
|
14
|
+
s << "#{@name}="
|
|
15
|
+
if is_escapable?
|
|
16
|
+
s << escape(print_value())
|
|
17
|
+
else
|
|
18
|
+
s << print_value
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
s
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
end
|
|
25
|
+
end
|
data/extras/icalendar.rb
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
$:.unshift(File.dirname(__FILE__))
|
|
2
|
+
|
|
3
|
+
# Base classes and mixin modules
|
|
4
|
+
require 'icalendar/base'
|
|
5
|
+
require 'icalendar/component'
|
|
6
|
+
require 'icalendar/helpers'
|
|
7
|
+
|
|
8
|
+
# Calendar and components
|
|
9
|
+
require 'icalendar/calendar'
|
|
10
|
+
require 'icalendar/component/event'
|
|
11
|
+
require 'icalendar/component/journal'
|
|
12
|
+
require 'icalendar/component/todo'
|
|
13
|
+
require 'icalendar/component/freebusy'
|
|
14
|
+
require 'icalendar/component/timezone'
|
|
15
|
+
require 'icalendar/component/alarm'
|
|
16
|
+
|
|
17
|
+
# Calendar parser
|
|
18
|
+
require 'icalendar/calendar_parser'
|