Changes between Version 7 and Version 8 of AppleAddressBookDatasource
- Timestamp:
- 12/12/05 20:32:40 (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AppleAddressBookDatasource
v7 v8 43 43 tell application "Address Book" 44 44 45 set m to properties of my card 45 46 46 set m to properties of my card47 47 set the_file to (((path to desktop) as string) & first name of m & last name of m & ".rdf") as file specification 48 48 49 set rdf to "<rdf:RDF" & return 50 49 51 set rdf to rdf & "xmlns:rdf=" & quote & "http://www.w3.org/1999/02/22-rdf-syntax-ns#" & quote & return 52 50 53 set rdf to rdf & "xmlns:rdfs=" & quote & "http://www.w3.org/2000/01/rdf-schema#" & quote & return 54 51 55 set rdf to rdf & "xmlns:foaf=" & quote & "http://xmlns.com/foaf/0.1/" & quote & return 56 52 57 set rdf to rdf & "xmlns:admin=" & quote & "http://webns.net/mvcb/" & quote & ">" & return 58 53 59 set rdf to rdf & "<foaf:Person rdf:nodeID=" & quote & "me" & quote & ">" & return 60 54 61 set rdf to rdf & "<foaf:name>" & first name of m & " " & last name of m & "</foaf:name>" & return 62 55 63 if nickname of m ≠ "" then 64 56 65 set rdf to rdf & "<foaf:nick>" & nickname of m & "</foaf:nick>" & return 66 57 67 end if 68 58 69 if group foaf exists then 70 59 71 repeat with this_person in every person of group foaf 72 60 73 set rdf to rdf & "<foaf:Person>" & return 74 61 75 set rdf to rdf & "<foaf:name>" & first name of this_person & " " & last name of this_person & "</foaf:name>" & return 76 62 77 repeat with e in emails of this_person 78 63 79 set rdf to rdf & "<foaf:mbox>mailto:" & value of e & "</foaf:mbox>" & return 80 64 81 end repeat 82 65 83 if ((count of urls of this_person) > 0) then 84 66 85 if label of url 1 of this_person is "FOAF" then 86 67 87 set rdf to rdf & "<rdfs:seeAlso rdf:resource=" & quote & value of url 1 of this_person & quote & "/>" & return 88 68 89 end if 90 69 91 end if 92 70 93 set rdf to rdf & "</foaf:Person>" & return 94 71 95 end repeat 96 72 97 end if 98 73 99 100 74 101 set rdf to rdf & "</rdf:RDF>" 102 75 103 104 76 105 106 77 107 end tell 78 108 109 110 79 111 try 112 80 113 open for access the_file with write permission 114 81 115 set eof of the_file to 0 116 82 117 write (rdf) to the_file starting at eof 118 83 119 close access the_file 120 84 121 on error 122 85 123 try 124 86 125 close access the_file 126 87 127 end try 128 88 129 end try 130