rwdaddresses 1.04 → 1.05
Sign up to get free protection for your applications and to get access to all the features.
- data/Readme.txt +380 -179
- data/code/01rwdcore/01rwdcore.rb +7 -0
- data/code/01rwdcore/02helptexthashbegin.rb +0 -0
- data/code/01rwdcore/03helptexthash.rb +13 -21
- data/code/01rwdcore/04helptextend.rb +0 -0
- data/code/01rwdcore/jumplinkcommand.rb +1 -1
- data/code/01rwdcore/openhelpwindow.rb +1 -1
- data/code/01rwdcore/returntomain.rb +0 -0
- data/code/01rwdcore/rundocuments.rb +0 -0
- data/code/01rwdcore/runeditconfiguration.rb +0 -0
- data/code/01rwdcore/runhelpabout.rb +0 -0
- data/code/01rwdcore/runopentinkerdocument.rb +7 -0
- data/code/01rwdcore/rwdtinkerversion.rb +11 -3
- data/code/01rwdcore/rwdwindowreturn.rb +0 -0
- data/code/01rwdcore/selectiontab.rb +0 -0
- data/code/01rwdcore/setuphelpaboutoptions.rb +13 -0
- data/code/01rwdcore/setuptinkerdocuments.rb +6 -0
- data/code/01rwdcore/test_cases.rb +0 -0
- data/code/01rwdcore/test_harness.rb +0 -0
- data/code/01rwdcore/uploadreturns.rb +0 -0
- data/code/dd0viewphoto/dd0viewphoto.rb +3 -0
- data/code/superant.com.bigtinker/rwdtinkerversion.rb +10 -0
- data/code/superant.com.rwdaddresses/0uninstallapplet.rb +14 -0
- data/code/superant.com.rwdaddresses/attachtmpcontactphoto.rb +0 -0
- data/code/superant.com.rwdaddresses/clearscreendisplay.rb +0 -0
- data/code/superant.com.rwdaddresses/createnewnamerecord.rb +0 -0
- data/code/superant.com.rwdaddresses/deletecontactrecord.rb +0 -0
- data/code/superant.com.rwdaddresses/deleterwdaddressesupdatefiles.rb +0 -0
- data/code/superant.com.rwdaddresses/downloadrwdaddressfiles.rb +0 -0
- data/code/superant.com.rwdaddresses/helptexthashrwdaddresses.rb +0 -0
- data/code/superant.com.rwdaddresses/listnamerecord.rb +0 -0
- data/code/superant.com.rwdaddresses/listvcardrecord.rb +0 -0
- data/code/superant.com.rwdaddresses/loadconfigurationrecord.rb +22 -45
- data/code/superant.com.rwdaddresses/loadconfigurationvariables.rb +2 -1
- data/code/superant.com.rwdaddresses/loadnamerecord.rb +0 -0
- data/code/superant.com.rwdaddresses/openhelpwindowrwdaddresses.rb +0 -0
- data/code/superant.com.rwdaddresses/renamecontact.rb +0 -0
- data/code/superant.com.rwdaddresses/runaddresseswindow.rb +1 -1
- data/code/superant.com.rwdaddresses/runrwdaddressesmenu1.rb +4 -4
- data/code/superant.com.rwdaddresses/runrwdaddresssyncbackwindow.rb +0 -0
- data/code/superant.com.rwdaddresses/rwdaddressesbackwindow.rb +2 -2
- data/code/superant.com.rwdaddresses/rwdaddresseshelpabout.rb +2 -5
- data/code/superant.com.rwdaddresses/saveconfigurationrecord.rb +1 -1
- data/code/superant.com.rwdaddresses/savevcardrecord.rb +0 -0
- data/code/superant.com.rwdaddresses/syncrwdaddress.rb +0 -0
- data/code/superant.com.rwdaddresses/test_cases.rb +1 -2
- data/code/superant.com.rwdaddresses/uploadrwdaddressfiles.rb +0 -0
- data/code/superant.com.rwdaddresses/viewaddressconfiguration.rb +0 -0
- data/code/superant.com.rwdaddresses/viewnamedata.rb +0 -0
- data/code/superant.com.rwdaddresses/viewphoto.rb +0 -0
- data/code/superant.com.rwdaddresses/viewrwdaddressesconfiguration.rb +0 -0
- data/code/superant.com.rwdaddresses/viewtmpcontactphoto.rb +0 -0
- data/code/superant.com.rwdaddresses/viewvcarddata.rb +0 -0
- data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +0 -0
- data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +0 -0
- data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +240 -0
- data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +18 -5
- data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +0 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +0 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +1 -1
- data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +0 -0
- data/code/superant.com.rwdtinkerbackwindow/listzips.rb +1 -1
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +1 -12
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +0 -0
- data/code/superant.com.rwdtinkerbackwindow/network.rb +0 -0
- data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +0 -0
- data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +1 -5
- data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +0 -0
- data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +19 -6
- data/code/superant.com.rwdtinkerbackwindow/removeappletvariables.rb +52 -0
- data/code/superant.com.rwdtinkerbackwindow/runremoteinstall.rb +0 -0
- data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +4 -0
- data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +0 -0
- data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +2 -2
- data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +1 -1
- data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +1 -1
- data/code/zz0applicationend/zz0end.rb +0 -0
- data/configuration/language.dist +2 -1
- data/configuration/rwdapplicationidentity.dist +2 -2
- data/configuration/rwdtinker.dist +6 -3
- data/configuration/{rwdaddresses.dist → rwdwaddresses-1.05.dist} +6 -2
- data/configuration/tinkerwin2variables.dist +1 -1
- data/gui/00coreguibegin/applicationguitop.rwd +1 -1
- data/gui/frontwindow0/cc0openphoto.rwd +22 -0
- data/gui/{frontwindowselectionbegin/selectiontabbegin/selectiontabbegin.rwd → frontwindowselections/00selectiontabbegin.rwd} +1 -1
- data/gui/frontwindowselections/jumplinkcommands.rwd +15 -0
- data/gui/{frontwindowselectionzend/viewselectionzend/viewselectionend.rwd → frontwindowselections/wwselectionend.rwd} +0 -0
- data/gui/{frontwindowtdocumentbegin/superant.com.documentsbegin/tt0documentbegin.rwd → frontwindowtdocuments/00documentbegin.rwd} +0 -0
- data/gui/frontwindowtdocuments/tinkerdocuments.rwd +14 -0
- data/gui/frontwindowtdocuments/zzdocumentend.rwd +8 -0
- data/gui/{frontwindowz1end/frontwindowend/xx0rwdfirsttab.rwd → helpaboutbegin/zzzrwdlasttab.rwd} +0 -0
- data/gui/helpaboutbegin/zzzzhelpscreenstart.rwd +3 -0
- data/gui/helpaboutbegin/zzzzzzhelpabouttab.rwd +15 -0
- data/gui/helpaboutzend/{superant.com.helpaboutend/helpscreenend.rwd → helpscreenend.rwd} +0 -0
- data/gui/helpaboutzend/zhelpscreenstart2.rwd +3 -0
- data/gui/helpaboutzend/zzzzhelpabout2.rwd +15 -0
- data/gui/helpaboutzend/zzzzhelpscreen2end.rwd +3 -0
- data/gui/tinkerbackwindows/superant.com.addressesphotowindow/yy7addressesphoto.rwd +0 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddresses/10appletbegin.rwd +4 -0
- data/gui/{frontwindow0 → tinkerbackwindows}/superant.com.rwdaddresses/11viewnamedata.rwd +0 -0
- data/gui/{frontwindow0 → tinkerbackwindows}/superant.com.rwdaddresses/13listnamerecordfiles.rwd +0 -0
- data/gui/{frontwindow0 → tinkerbackwindows}/superant.com.rwdaddresses/16editrecord.rwd +0 -0
- data/gui/{frontwindow0 → tinkerbackwindows}/superant.com.rwdaddresses/17viewvcardrecord.rwd +0 -0
- data/gui/{frontwindow0 → tinkerbackwindows}/superant.com.rwdaddresses/18contactutilities.rwd +0 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddresses/81jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddresses/9end.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/1appname.rwd +0 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/20downloadftp.rwd +0 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/70rwddiagnostics.rwd +0 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/87viewconfiguration.rwd +34 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/94selectiontab.rwd +0 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/95jumplink.rwd +0 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/97selectionend.rwd +0 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/zvbackend.rwd +0 -0
- data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/1appname.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/20downloadftp.rwd +45 -0
- data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/67viewconfiguration.rwd +29 -0
- data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/70rwddiagnostics.rwd +16 -0
- data/gui/{frontwindowselections/superant.com.rwdtinkerwin2selectiontab/jumplinkcommands.rwd → tinkerbackwindows/superant.com.rwdschedulebackwindow/m01menubegin.rwd} +5 -2
- data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/zvbackend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/1appname.rwd +1 -1
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +9 -10
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/45installremotezip.rwd +5 -5
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistapplets.rwd +9 -9
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/60editconfiguration.rwd +4 -12
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +1 -1
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/81jumplinkcommands.rwd +4 -4
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/9backend.rwd +0 -0
- data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd +1 -1
- data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/9end.rwd +0 -0
- data/gui/tinkerbackwindows/superant.com.versionwindow/1appname.rwd +2 -2
- data/gui/tinkerbackwindows/superant.com.versionwindow/helpaboutwindow.rwd +17 -0
- data/gui/zzcoreguiend/{tinkerapplicationguiend/yy9rwdend.rwd → yy9rwdend.rwd} +0 -0
- data/init.rb +7 -7
- data/installed/rwdaddressesdata2.inf +7 -0
- data/installed/rwdwaddresses-1.05.inf +12 -0
- data/{lib → installed}/temp.rb +0 -0
- data/lang/en/rwdcore/languagefile.rb +57 -15
- data/lang/es/rwdcore/languagefile-es.rb +61 -13
- data/lang/fr/rwdcore/languagefile.rb +64 -0
- data/lang/jp/rwdcore/languagefile.rb +69 -6
- data/lang/nl/rwdcore/languagefile.rb +56 -0
- data/{extras → lib}/rconftool.rb +0 -0
- data/{ev → lib/rwd}/browser.rb +2 -2
- data/{ev → lib/rwd}/ftools.rb +0 -0
- data/{ev → lib/rwd}/mime.rb +0 -0
- data/{ev → lib/rwd}/net.rb +5 -5
- data/{ev → lib/rwd}/ruby.rb +0 -0
- data/{ev → lib/rwd}/rwd.rb +37 -17
- data/{ev → lib/rwd}/sgml.rb +1 -1
- data/{ev → lib/rwd}/thread.rb +1 -1
- data/{ev → lib/rwd}/tree.rb +2 -2
- data/{ev → lib/rwd}/xml.rb +1 -1
- data/{extras → lib}/zip/ioextras.rb +0 -0
- data/{extras → lib}/zip/stdrubyext.rb +0 -0
- data/{extras → lib}/zip/tempfile_bugfixed.rb +0 -0
- data/{extras → lib}/zip/zip.rb +5 -4
- data/{extras → lib}/zip/zipfilesystem.rb +0 -0
- data/{extras → lib}/zip/ziprequire.rb +0 -0
- data/names/Angelina Jolie.jpg b/data/names/Angelina → Jolie.jpg +0 -0
- data/names/Angelina Jolie.nam b/data/names/Angelina → Jolie.nam +0 -0
- data/names/Angelina Jolie.vcf b/data/names/Angelina → Jolie.vcf +0 -0
- data/names/Steven Gibson.jpg b/data/names/Steven → Gibson.jpg +0 -0
- data/names/Steven Gibson.nam b/data/names/Steven → Gibson.nam +0 -0
- data/names/elektra.jpg +0 -0
- data/names/elektra.nam +0 -0
- data/names/nophoto.jpg +0 -0
- data/rwd_files/HowTo_Addresses.txt +8 -0
- data/rwd_files/HowTo_BigTinker.txt +146 -0
- data/rwd_files/HowTo_Tinker.txt +52 -0
- data/rwd_files/HowTo_TinkerWin2.txt +0 -0
- data/rwd_files/Readme.txt +0 -0
- data/rwd_files/{rwdindex.html → RubyWebDialogs.html} +0 -0
- data/rwd_files/contacttmp.jpg +0 -0
- data/rwd_files/favicon.ico +0 -0
- data/rwd_files/rdoc-style.css +0 -0
- data/rwd_files/rwdapplications.html +0 -0
- data/rwd_files/tinker.png +0 -0
- data/rwdaddresses.rb +1 -0
- data/rwdconfig.dist +11 -2
- data/tests/checkdepends.sh +0 -0
- data/tests/cleancnf.sh +2 -1
- data/tests/makedist-rwdwaddesses.rb +56 -0
- data/tests/makedist.rb +12 -5
- data/tests/rdep.rb +0 -0
- data/tests/totranslate.lang +0 -0
- data/updates/temp.rb +1 -0
- data/zips/rwdwaddresses-1.05.zip +0 -0
- data/zips/rwdwcalc-0.61.zip +0 -0
- data/zips/rwdwgutenberg-0.09.zip +0 -0
- data/zips/rwdwschedule-1.04.zip +0 -0
- data/zips/rwdwshell-1.04.zip +0 -0
- data/zips/temp.rb +1 -0
- data/zips/wrubyslippers-1.06.zip +0 -0
- metadata +78 -77
- data/code/superant.com.rwdaddresses/jumplinkupdate.rb +0 -11
- data/code/superant.com.rwdaddresses/returntomain.rb +0 -10
- data/code/superant.com.rwdtinkerbackwindow/controlclient.rb +0 -96
- data/code/superant.com.rwdtinkerbackwindow/installapplet.rb +0 -25
- data/extras/vpim/date.rb +0 -198
- data/extras/vpim/dirinfo.rb +0 -229
- data/extras/vpim/enumerator.rb +0 -29
- data/extras/vpim/field.rb +0 -497
- data/extras/vpim/maker/vcard.rb +0 -312
- data/extras/vpim/rfc2425.rb +0 -244
- data/extras/vpim/rrule.rb +0 -482
- data/extras/vpim/time.rb +0 -42
- data/extras/vpim/vcard.rb +0 -151
- data/extras/vpim/vpim.rb +0 -94
- data/gui/frontwindowtdocuments/superant.com.addressesdocuments/uu8doc_rwdschedule.rwd +0 -5
- data/gui/frontwindowtdocuments/superant.com.documents/uu5documents.rwd +0 -15
- data/gui/frontwindowtdocuments/superant.com.tinkerwin2documents/uu5documents.rwd +0 -6
- data/gui/frontwindowtdocumentzend/superant.com.documentsend/ww0documentend.rwd +0 -12
- data/gui/helpaboutbegin/superant.com.helpaboutbegin/ya0helpscreenstart.rwd +0 -3
- data/gui/helpaboutinstalled/superant.com.rwdaddresseshelpabout/1appname.rwd +0 -4
- data/gui/helpaboutinstalled/superant.com.rwdaddresseshelpabout/3copyright.rwd +0 -3
- data/gui/helpaboutinstalled/superant.com.rwdaddresseshelpabout/5version.rwd +0 -9
- data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/1appname.rwd +0 -4
- data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/3copyright.rwd +0 -3
- data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/5version.rwd +0 -10
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/88viewconfiguration.rwd +0 -47
- data/installed/rwdviewlogo-0.4.inf +0 -4
- data/zips/rwdahelloworld-0.5.zip +0 -0
data/extras/vpim/time.rb
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
$Id: time.rb,v 1.5 2005/02/02 02:55:59 sam Exp $
|
3
|
-
|
4
|
-
Copyright (C) 2005 Sam Roberts
|
5
|
-
|
6
|
-
This library is free software; you can redistribute it and/or modify it
|
7
|
-
under the same terms as the ruby language itself, see the file COPYING for
|
8
|
-
details.
|
9
|
-
=end
|
10
|
-
|
11
|
-
require 'date'
|
12
|
-
|
13
|
-
# Extensions to builtin Time allowing addition to Time by multiples of other
|
14
|
-
# intervals than a second.
|
15
|
-
|
16
|
-
class Time
|
17
|
-
# Returns a new Time, +years+ later than this time. Feb 29 of a
|
18
|
-
# leap year will be rounded up to Mar 1 if the target date is not a leap
|
19
|
-
# year.
|
20
|
-
def plus_year(years)
|
21
|
-
Time.local(year + years, month, day, hour, min, sec, usec)
|
22
|
-
end
|
23
|
-
|
24
|
-
# Returns a new Time, +months+ later than this time. The day will be
|
25
|
-
# rounded down if it is not valid for that month.
|
26
|
-
# 31 plus 1 month will be on Feb 28!
|
27
|
-
def plus_month(months)
|
28
|
-
d = Date.new(year, month, day)
|
29
|
-
d >>= months
|
30
|
-
Time.local(d.year, d.month, d.day, hour, min, sec, usec)
|
31
|
-
end
|
32
|
-
|
33
|
-
# Returns a new Time, +days+ later than this time.
|
34
|
-
# Does this do as I expect over DST? What if the hour doesn't exist
|
35
|
-
# in the next day, due to DST changes?
|
36
|
-
def plus_day(days)
|
37
|
-
d = Date.new(year, month, day)
|
38
|
-
d += days
|
39
|
-
Time.local(d.year, d.month, d.day, hour, min, sec, usec)
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
data/extras/vpim/vcard.rb
DELETED
@@ -1,151 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
$Id: vcard.rb,v 1.13 2004/12/05 03:16:33 sam Exp $
|
3
|
-
|
4
|
-
Copyright (C) 2005 Sam Roberts
|
5
|
-
|
6
|
-
This library is free software; you can redistribute it and/or modify it
|
7
|
-
under the same terms as the ruby language itself, see the file COPYING for
|
8
|
-
details.
|
9
|
-
=end
|
10
|
-
|
11
|
-
require 'extras/vpim/dirinfo'
|
12
|
-
require 'extras/vpim/vpim'
|
13
|
-
|
14
|
-
module Vpim
|
15
|
-
# A vCard, a specialization of a directory info object.
|
16
|
-
#
|
17
|
-
# The vCard format is specified by:
|
18
|
-
# - RFC2426: vCard MIME Directory Profile (vCard 3.0)
|
19
|
-
# - RFC2425: A MIME Content-Type for Directory Information
|
20
|
-
#
|
21
|
-
# This implements vCard 3.0, but it is also capable of decoding vCard 2.1.
|
22
|
-
#
|
23
|
-
# For information about:
|
24
|
-
# - link:rfc2426.txt: vCard MIME Directory Profile (vCard 3.0)
|
25
|
-
# - link:rfc2425.txt: A MIME Content-Type for Directory Information
|
26
|
-
# - http://www.imc.org/pdi/pdiproddev.html: vCard 2.1 Specifications
|
27
|
-
#
|
28
|
-
# vCards are usually transmitted in files with <code>.vcf</code>
|
29
|
-
# extensions.
|
30
|
-
#
|
31
|
-
# TODO - an open question is what exactly "vcard 2.1" support means. While I
|
32
|
-
# decode vCard 2.1 correctly, I don't encode it. Should I implement a
|
33
|
-
# transcoder, to vCards can be decoded from either version, and then written
|
34
|
-
# to either version? Maybe an option to Field#encode()?
|
35
|
-
#
|
36
|
-
# TODO - there are very few methods that Vcard has that DirectoryInfo
|
37
|
-
# doesn't. I could probably just do away with it entirely, but I suspect
|
38
|
-
# that there are methods that could be usefully added to Vcard, perhaps to
|
39
|
-
# get the email addresses, or the name, or perhaps to set fields, like
|
40
|
-
# email=. What would be useful?
|
41
|
-
#
|
42
|
-
# = Example
|
43
|
-
#
|
44
|
-
# Here's an example of encoding a simple vCard using the low-level API:
|
45
|
-
#
|
46
|
-
# card = Vpim::Vcard.create
|
47
|
-
# card << Vpim::DirectoryInfo::Field.create('email', user.name@example.com, 'type' => "internet" )
|
48
|
-
# card << Vpim::DirectoryInfo::Field.create('url', "http://www.example.com/user" )
|
49
|
-
# card << Vpim::DirectoryInfo::Field.create('fn', "User Name" )
|
50
|
-
# puts card.to_s
|
51
|
-
#
|
52
|
-
# New! Use the Vpim::Maker::Vcard to make vCards!
|
53
|
-
class Vcard < DirectoryInfo
|
54
|
-
|
55
|
-
private_class_method :new
|
56
|
-
|
57
|
-
# Create a vCard 3.0 object with the minimum required fields, plus any
|
58
|
-
# +fields+ you want in the card (they can also be added later).
|
59
|
-
def Vcard.create(fields = [] )
|
60
|
-
fields.unshift Field.create('VERSION', "3.0")
|
61
|
-
super(fields, 'VCARD')
|
62
|
-
end
|
63
|
-
|
64
|
-
# Decode a collection of vCards into an array of Vcard objects.
|
65
|
-
#
|
66
|
-
# +card+ can be either a String or an IO object.
|
67
|
-
#
|
68
|
-
# Since vCards are self-delimited (by a BEGIN:vCard and an END:vCard),
|
69
|
-
# multiple vCards can be concatenated into a single directory info object.
|
70
|
-
# They may or may not be related. For example, AddressBook.app (the OS X
|
71
|
-
# contact manager) will export multiple selected cards in this format.
|
72
|
-
#
|
73
|
-
# The card data must be UTF-8 (ASCII is valid UTF-8) or UCS-2 (2 byte
|
74
|
-
# Unicode). All valid vCards must begin with "BEGIN:VCARD", and the UCS-2
|
75
|
-
# encoding of 'B' is a the nul character (0x00) followed by the ASCII
|
76
|
-
# value of 'B', so the input is considered to be UCS-2 if the first
|
77
|
-
# character in the string is nul, and converted to UTF-8.
|
78
|
-
#
|
79
|
-
# If you know that you have only one vCard, then you can decode that
|
80
|
-
# single vCard by doing something like:
|
81
|
-
#
|
82
|
-
# vcard = Vcard.decode(card_data).first
|
83
|
-
def Vcard.decode(card)
|
84
|
-
if card.respond_to? :to_str
|
85
|
-
string = card.to_str
|
86
|
-
elsif card.kind_of? IO
|
87
|
-
string = card.read(nil)
|
88
|
-
else
|
89
|
-
raise ArgumentError, "Vcard.decode cannot be called with a #{card.type}"
|
90
|
-
end
|
91
|
-
|
92
|
-
# The card representation can be either UTF-8, or UCS-2. If its
|
93
|
-
# UCS-2, then the first byte will be 0, so check for this, and convert
|
94
|
-
# if necessary.
|
95
|
-
#
|
96
|
-
# We know it's 0, because the first character in a vCard must be the 'B'
|
97
|
-
# of "BEGIN:VCARD", and in UCS-2 all ascii are encoded as a 0 byte
|
98
|
-
# followed by the ASCII byte, UNICODE is great.
|
99
|
-
if string[0] == 0
|
100
|
-
string = string.unpack('n*').pack('U*')
|
101
|
-
end
|
102
|
-
|
103
|
-
entities = Vpim.expand(Vpim.decode(string))
|
104
|
-
|
105
|
-
# Since all vCards must have a begin/end, the top-level should consist
|
106
|
-
# entirely of entities/arrays, even if its a single vCard.
|
107
|
-
if entities.detect { |e| ! e.kind_of? Array }
|
108
|
-
raise "Not a valid vCard"
|
109
|
-
end
|
110
|
-
|
111
|
-
vcards = []
|
112
|
-
|
113
|
-
for e in entities
|
114
|
-
vcards.push(new(e.flatten, 'VCARD'))
|
115
|
-
end
|
116
|
-
|
117
|
-
vcards
|
118
|
-
end
|
119
|
-
|
120
|
-
# The vCard version multiplied by 10 as an Integer. If no VERSION field
|
121
|
-
# is present (which is non-conformant), nil is returned. For example, a
|
122
|
-
# version 2.1 vCard would have a version of 21, and a version 3.0 vCard
|
123
|
-
# would have a version of 30.
|
124
|
-
def version
|
125
|
-
v = self["version"]
|
126
|
-
unless v
|
127
|
-
raise Vpim::InvalidEncodingError, 'Invalid vCard - it has no version field!'
|
128
|
-
end
|
129
|
-
v = v.to_f * 10
|
130
|
-
v = v.to_i
|
131
|
-
end
|
132
|
-
|
133
|
-
# The value of the field named +name+, optionally limited to fields of
|
134
|
-
# type +type+. If no match is found, nil is returned, if multiple matches
|
135
|
-
# are found, the first match to have one of its type values be 'pref'
|
136
|
-
# (preferred) is returned, otherwise the first match is returned.
|
137
|
-
def [](name, type=nil)
|
138
|
-
fields = enum_by_name(name).find_all { |f| type == nil || f.type?(type) }
|
139
|
-
|
140
|
-
# limit to preferred, if possible
|
141
|
-
pref = fields.find_all { |f| f.pref? }
|
142
|
-
|
143
|
-
if(pref.first)
|
144
|
-
fields = pref
|
145
|
-
end
|
146
|
-
|
147
|
-
fields.first ? fields.first.value : nil
|
148
|
-
end
|
149
|
-
end
|
150
|
-
end
|
151
|
-
|
data/extras/vpim/vpim.rb
DELETED
@@ -1,94 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
$Id: vpim.rb,v 1.18 2005/02/02 03:05:58 sam Exp $
|
3
|
-
|
4
|
-
Copyright (C) 2005 Sam Roberts
|
5
|
-
|
6
|
-
This library is free software; you can redistribute it and/or modify it
|
7
|
-
under the same terms as the ruby language itself, see the file COPYING for
|
8
|
-
details.
|
9
|
-
=end
|
10
|
-
|
11
|
-
#:main:Vpim
|
12
|
-
#:title:vpim - a library to manipulate vCards and iCalendars
|
13
|
-
#
|
14
|
-
# Author:: Sam Roberts <sroberts@uniserve.com>
|
15
|
-
# Copyright:: Copyright (C) 2005 Sam Roberts
|
16
|
-
# License:: May be distributed under the same terms as Ruby
|
17
|
-
# Version:: 0.14
|
18
|
-
# Homepage:: http://vpim.rubyforge.org
|
19
|
-
#
|
20
|
-
# An implementation of the MIME Content-Type for Directory Information (RFC
|
21
|
-
# 2425), and profiles of this format. The basic RFC 2425 format is implemented
|
22
|
-
# by the DirectoryInfo class.
|
23
|
-
#
|
24
|
-
# Currently the only IETF-defined profile is vCard (RFC 2426), implemented by
|
25
|
-
# the Vcard class.
|
26
|
-
#
|
27
|
-
# iCalendar (RFC 2445) was not specified as a profile of RFC 2425, could have
|
28
|
-
# been, and is implemented by the Icalendar class.
|
29
|
-
#
|
30
|
-
# Both of these "v-formats" are for personal information management, thus the
|
31
|
-
# name "vPim".
|
32
|
-
#
|
33
|
-
# This is my first Ruby library, and I would love to have feedback on
|
34
|
-
# useability. In particular, if anybody using this library could send me
|
35
|
-
# any code showing how they call vPim, that would be very useful to me. It
|
36
|
-
# doesn't have to be complete, I would just like to see how the APIs are
|
37
|
-
# being called, to give me ideas for how to improve them.
|
38
|
-
#
|
39
|
-
# Particularly, I'm interested in examples of encoding.
|
40
|
-
#
|
41
|
-
# Sam Roberts <sroberts@uniserve.com>
|
42
|
-
#
|
43
|
-
# = Project Information
|
44
|
-
#
|
45
|
-
# The latest release can be downloaded from the Ruby Forge project page:
|
46
|
-
#
|
47
|
-
# - http://rubyforge.org/projects/vpim
|
48
|
-
#
|
49
|
-
# If you are interested in notifications about new releases, or
|
50
|
-
# asking questions about vPim, please subscribe to "vpim-talk":
|
51
|
-
#
|
52
|
-
# - http://rubyforge.org/mailman/listinfo/vpim-talk
|
53
|
-
#
|
54
|
-
# = Examples
|
55
|
-
#
|
56
|
-
# Sample utilities are provided as examples of using vPim in samples/.
|
57
|
-
#
|
58
|
-
# vCard examples are:
|
59
|
-
# - link:mutt-aliases-to-vcf.txt: convert a mutt aliases file to vCards
|
60
|
-
# - link:ex_get_vcard_photo.txt: pull photo data from a vCard
|
61
|
-
# - link:ab-query.txt: query the OS X Address Book to find vCards
|
62
|
-
# - link:vcf-to-mutt.txt: query vCards for matches, output in formats useful
|
63
|
-
# with Mutt (see link:README.mutt for details)
|
64
|
-
# - link:vcard-dump.txt: dump all the fields in a vCard
|
65
|
-
# - link:tabbed-file-to-vcf.txt: convert a tab-delimited file to vCards. This
|
66
|
-
# is a (small but) complete application contributed by Dane G. Avilla, thanks!
|
67
|
-
#
|
68
|
-
# iCalendar examples are:
|
69
|
-
# - link:ics-to-rss.txt: prints todos as RSS, or starts a WEBrick servlet
|
70
|
-
# that publishes todos as a RSS feed. Thanks to Dave Thomas for this idea,
|
71
|
-
# from http://pragprog.com/pragdave/Tech/Blog/ToDos.rdoc.
|
72
|
-
# - link:cmd-itip.txt: prints emailed iCalendar invitations in human-readable
|
73
|
-
# form, and see link:README.mutt for instruction on mutt integration. I get
|
74
|
-
# a lot of meeting invitations from Lotus Notes/Domino users at work, and
|
75
|
-
# this is pretty useful in figuring out where and when I am supposed to be.
|
76
|
-
# - link:reminder.txt: prints upcoming events and todos, by default from
|
77
|
-
# Apple's iCal calendars
|
78
|
-
# - link:rrule.txt: utility for printing recurrence rules
|
79
|
-
# - link:ical-dump.txt: utility for dumping contents of .ics files
|
80
|
-
module Vpim
|
81
|
-
VERSION = "0.14"
|
82
|
-
|
83
|
-
# Return the API version as a string.
|
84
|
-
def Vpim.version
|
85
|
-
VERSION
|
86
|
-
end
|
87
|
-
end
|
88
|
-
|
89
|
-
module Vpim
|
90
|
-
# Exception used to indicate that data being decoded is invalid, the message
|
91
|
-
# usually gives some clue as to exactly what is invalid.
|
92
|
-
class InvalidEncodingError < StandardError; end
|
93
|
-
end
|
94
|
-
|
@@ -1,15 +0,0 @@
|
|
1
|
-
$rwdguivar=
|
2
|
-
"
|
3
|
-
<row> <p align=\"left\">
|
4
|
-
<a href=HowTo_Tinker.txt>Howto_Tinker.txt</a></p></row>
|
5
|
-
<row> <p align=\"left\">
|
6
|
-
<a href=Readme.txt>Readme.txt</a></p></row>
|
7
|
-
<row> <p align=\"left\">
|
8
|
-
<a href=COPYING>GPL License </a></p></row>
|
9
|
-
<row> <p align=\"left\">
|
10
|
-
<a href=rwdapplications.html>more information about rwdapplications </a></p></row>
|
11
|
-
<row> <p align=\"left\">
|
12
|
-
<a href=rwdindex.html>Link to online information about RubyWebdialogs </a></p></row>"
|
13
|
-
|
14
|
-
|
15
|
-
|
@@ -1,47 +0,0 @@
|
|
1
|
-
$rwdguivar=
|
2
|
-
"
|
3
|
-
<tab name=\"viewaddressesconfiguration\" caption=\"Rwdaddresses Configuration\">
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
<table>
|
8
|
-
<row> <p> </row>
|
9
|
-
<row> <p align=\"right\">You can view or edit the rwdaddresses configuration file here</row>
|
10
|
-
<row> <p> </row>
|
11
|
-
<horizontal>
|
12
|
-
<button caption=\"Fill Record\" action=\"loadrwdaddressesconfiguration\"/>
|
13
|
-
<button caption=\"Save Changes\" action=\"saverwdaddressesconfiguration\"/>
|
14
|
-
<button caption=\"Reload Variables\" action=\"loadrwdaddressesconfigurationvariables\"/>
|
15
|
-
<button caption=\"Help\" action=\"runhelpwindowrwdaddresses\"/>
|
16
|
-
</horizontal>
|
17
|
-
<table>
|
18
|
-
|
19
|
-
<row> <p align=\"right\">FileName:</p> <text name=\"a_adconfigurationfilename\"/> </row>
|
20
|
-
<row> <p align=\"right\">1:</p> <text size=70 name=\"a_adconfigline1\"/> </row>
|
21
|
-
<row> <p align=\"right\">2:</p> <text size=70 name=\"a_adconfigline2\"/> </row>
|
22
|
-
<row> <p align=\"right\">3:</p> <text size=70 name=\"a_adconfigline3\"/> </row>
|
23
|
-
<row> <p align=\"right\">4:</p> <text size=70 name=\"a_adconfigline4\"/> </row>
|
24
|
-
<row> <p align=\"right\">5:</p> <text size=70 name=\"a_adconfigline5\"/> </row>
|
25
|
-
<row> <p align=\"right\">6:</p> <text size=70 name=\"a_adconfigline6\"/> </row>
|
26
|
-
<row> <p align=\"right\">7:</p> <text size=70 name=\"a_adconfigline7\"/> </row>
|
27
|
-
<row> <p align=\"right\">8:</p> <text size=70 name=\"a_adconfigline8\"/> </row>
|
28
|
-
<row> <p align=\"right\">9:</p> <text size=70 name=\"a_adconfigline9\"/> </row>
|
29
|
-
<row> <p align=\"right\">10:</p> <text size=70 name=\"a_adconfigline10\"/> </row>
|
30
|
-
<row> <p align=\"right\">11:</p> <text size=70 name=\"a_adconfigline11\"/> </row>
|
31
|
-
<row> <p align=\"right\">12:</p> <text size=70 name=\"a_adconfigline12\"/> </row>
|
32
|
-
<row> <p align=\"right\">13:</p> <text size=70 name=\"a_adconfigline13\"/> </row>
|
33
|
-
<row> <p align=\"right\">14:</p> <text size=70 name=\"a_adconfigline14\"/> </row>
|
34
|
-
<row> <p align=\"right\">15:</p> <text size=70 name=\"a_adconfigline15\"/> </row>
|
35
|
-
<row> <p align=\"right\">16:</p> <text size=70 name=\"a_adconfigline16\"/> </row>
|
36
|
-
<row> <p align=\"right\">17:</p> <text size=70 name=\"a_adconfigline17\"/> </row>
|
37
|
-
<row> <p align=\"right\">18:</p> <text size=70 name=\"a_adconfigline18\"/> </row>
|
38
|
-
<row> <p align=\"right\">19:</p> <text size=70 name=\"a_adconfigline19\"/> </row>
|
39
|
-
|
40
|
-
</table>
|
41
|
-
<p>%extraadconfigdatadisplay%</p>
|
42
|
-
<p>
|
43
|
-
<p>%newadconfigurationresult%</p>
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
</tab>"
|
data/zips/rwdahelloworld-0.5.zip
DELETED
Binary file
|