2012-04-04 31 views
0

我正在用紅寶石和寶石vpim'vcards' 我的卡片包含幾個網址。目前,當我將生成的卡導入mac上的聯繫人應用程序時,所有的url都被標記爲主頁之後:我可以使用ruby gem vpim在vcard中設置url的標籤嗎?

有沒有一種方法可以將命名更改爲像「twitter」或「youtube」之類的內容?

這定義了產生VCF文件的URL:

URL:youtube.com/chelseafc 

我創建了這種方式:

maker.add_url("youtube.com/chelseafc") 

而在聯繫人應用程序,我看到的主頁:youtube.com/chelseafc 我希望看到youtube:youtube.com/chelseafc使其更具描述性。

謝謝。

回答

0

我發現了一個很好的例子,我可以看到我需要如何定義我要找的東西。

BEGIN:VCARD 
VERSION:3.0 
N:Doe;John;;; 
FN:John Doe 
ORG:Example.com Inc.; 
TITLE:Imaginary test person 
EMAIL;type=INTERNET;type=WORK;type=pref:[email protected] 
TEL;type=WORK;type=pref:+1 617 555 1212 
TEL;type=CELL:+1 781 555 1212 
TEL;type=HOME:+1 202 555 1212 
TEL;type=WORK:+1 (617) 555-1234 
item1.ADR;type=WORK:;;2 Example Avenue;Anytown;NY;01111;USA 
item1.X-ABADR:us 
item2.ADR;type=HOME;type=pref:;;3 Acacia Avenue;Newtown;MA;02222;USA 
item2.X-ABADR:us 
NOTE:John Doe has a long and varied history\, being documented on more police files that anyone else. Reports of his death are alas numerous. 
item3.URL;type=pref:http\://www.example/com/doe 
item3.X-ABLabel:_$!<HomePage>!$_ 
item4.URL:http\://www.example.com/Joe/foaf.df 
item4.X-ABLabel:FOAF 
item5.X-ABRELATEDNAMES;type=pref:Jane Doe 
item5.X-ABLabel:_$!<Friend>!$_ 
CATEGORIES:Work,Test group 
X-ABUID:5AD380FD-B2DE-4261-BA99-DE1D1DB52FBE\:ABPerson 
END:VCARD 

從這裏摘自:http://www.w3.org/2002/12/cal/vcard-notes.html

相關問題