用于创建联系人的 Applescript :
set phoneDad to "Dad Mobile" --Use your own custom variables imported from CSV
-- would need to parse CSV
tell application "Contacts"
set thePerson to make new person with properties ¬
{first name:"John", last name:"Doe", organization:"ABC Apps"} ¬
-- see the "Contacts" AppleScript dictionary
-- for other attributes than may be added
make new email at end of emails of thePerson with properties ¬
{label:"Work", value:"john@example.com"}
make new phone at end of phones of thePerson with properties ¬
{label:phoneDad, value:"555.555.1212"} --Use a variable to replace hardcoded number
make new url at end of urls of thePerson with properties ¬
{label:"Work", value:"http://www.example.com/"}
save
end tell
您可以根据CSV解析设置自定义变量。
这应该指向正确的方向。因此,在回答您的问题时,您可以使用Applescript添加自定义字段。只需使用与上述代码类似的语法。您只需要相应地解析CSV文件。我不知道您使用的第三方应用程序,但这通常是直接从Filemaker等数据库应用程序完成的。
进一步阅读:vCard维基百科
vCard 3.0
开始:VCARD版本:3.0 N:阿甘;福雷斯特;;先生。FN:Forrest Gump ORG:Bubba Gump Shrimp Co.标题:虾人照片; VALUE = URL; TYPE = GIF:http://www.example.com/dir_photos/my_photo.gif
TEL; TYPE = WORK,VOICE:(111 )555-1212 TEL; TYPE = HOME,VOICE:(404)555-1212 ADR; TYPE = WORK:;; 100 Waters Edge; Baytown; LA; 30314; United States of America LABEL; TYPE = WORK:100 Waters Edge \ nBaytown \,LA 30314 \ n美国美国ADR; TYPE = HOME:;; 42 Plantation St.; Baytown; LA; 30314;美国LABEL; TYPE = HOME:42 Plantation St. \ nBaytown \,LA 30314 \ n美国的Ame rica电子邮件; TYPE = PREF,INTERNET:forrestgump@example.com REV:2008-04-24T19:52:43Z END:VCARD