Contacts: Social Network parsing for imports

Created on 19 Mar 2018  路  11Comments  路  Source: nextcloud/contacts

When I imported from Gmail, I had a lot of URL's in peoples records that were links to their social networking profiles. Because you can detect the string of twitter.com/___, you could probably re-write many of my imported links from full URL's to social media usernames. Maybe you could even have the parsed data for username pushed into a link testing function to see if your parsing guessed right. Same goes for the Instant Messaging contact object. I had URL's for people's Skype address.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

enhancement

Most helpful comment

@skjnldsv Here's some more info for you. I built a sample contact and did screen shots. Turns out the custom fields don't seem to export correctly while the native ones do. This is what it built: _contacts.vcf_

BEGIN:VCARD
VERSION:3.0
FN:John Doe
N:Doe;John;;;
EMAIL;TYPE=INTERNET;TYPE=WORK:[email protected]
X-GTALK:itsmejodo
item1.URL:http\://somewhere.com/
item1.X-ABLabel:I wrote this
END:VCARD

screenshot from 2018-10-02 10-31-28

screenshot from 2018-10-02 10-31-57

screenshot from 2018-10-02 10-32-13

screenshot from 2018-10-02 10-32-36

screenshot from 2018-10-02 10-32-52

screenshot from 2018-10-02 10-33-04

screenshot from 2018-10-02 10-41-42

screenshot from 2018-10-02 10-42-00

screenshot from 2018-10-02 10-42-21

screenshot from 2018-10-02 10-42-32

screenshot from 2018-10-02 10-51-59

screenshot from 2018-10-02 10-52-07

screenshot from 2018-10-02 10-56-16

screenshot from 2018-10-02 10-56-33

screenshot from 2018-10-02 10-57-17

screenshot from 2018-10-02 10-57-23

All 11 comments

@WNYmathGuy what format outputted on the vcard are displayed the urls? :)

@skjnldsv It was the standard Google Contacts from back then that I built the list with. I exported from Google into whatever seemed appropriate for NextCloud at the time. Probably the Outlook CSV format option.

Nono, I meant the url in the vcards :)
We only support vcf files, so in the end that's the only thing you could have imported.

I had a lot of URL's in peoples records

When you say that, could you give a little hint on how to add a social url to a contact?
Was it done automatically or using the google contacts manager?

@skjnldsv I found the old exports from Google. Here's one example:

BEGIN:VCARD
VERSION:3.0
FN:VOC of WNY
N:WNY;VOC;of;;
TEL;TYPE=WORK:(716) 898-0110
ADR;TYPE=WORK:;;1280 Main St.\, 2nd Floor;Buffalo;NY;14209;
ORG:Veterans One-stop Center
TITLE:Receptionist
item1.URL:http\://vocwny.org/
item1.X-ABLabel:_$!<HomePage>!$_
item2.URL:https\://twitter.com/VocofWNY
item2.X-ABLabel:Twitter
item3.URL:https\://www.linkedin.com/company/veterans-one-stop-center-of-wny
 -inc-
item3.X-ABLabel:LinkedIN
item4.URL:https\://www.facebook.com/VOCofWNY
item4.X-ABLabel:Farcebook
NOTE:Regular business hours are Monday-Friday\, from 8\:30 AM to 4\:30 PM.
END:VCARD

In the URL list, I manually labled the Twitter link in Google Contacts, but a SED type regex could identify that https\://twitter.com/ and make @VOCofWNY into a social media type in NextCloud.

Here's another example:

BEGIN:VCARD
VERSION:3.0
FN:July Mae Zapodafi
N:Zapodafi;July;Mae;;
NICKNAME:Juju
EMAIL;TYPE=INTERNET;TYPE=WORK:[email protected]
X-YAHOO:zapodafi432
TEL;TYPE=CELL:(858) 386-8989
ADR;TYPE=WORK:;;87 Hannibal Ct ;Hollowbrook;NJ;04532;
item1.URL:https\://www.linkedin.com/in/july-zapodafi-543b7264
item1.X-ABLabel:PROFILE
END:VCARD

In Google their native type X-YAHOO: tagged the Yahoo Messenger handle.

Is that what you were hoping to see?

_P.S. the second VCF is fictional._

Thanks a lot! There is probably something we can do here indeed :)

@skjnldsv Here's some more info for you. I built a sample contact and did screen shots. Turns out the custom fields don't seem to export correctly while the native ones do. This is what it built: _contacts.vcf_

BEGIN:VCARD
VERSION:3.0
FN:John Doe
N:Doe;John;;;
EMAIL;TYPE=INTERNET;TYPE=WORK:[email protected]
X-GTALK:itsmejodo
item1.URL:http\://somewhere.com/
item1.X-ABLabel:I wrote this
END:VCARD

screenshot from 2018-10-02 10-31-28

screenshot from 2018-10-02 10-31-57

screenshot from 2018-10-02 10-32-13

screenshot from 2018-10-02 10-32-36

screenshot from 2018-10-02 10-32-52

screenshot from 2018-10-02 10-33-04

screenshot from 2018-10-02 10-41-42

screenshot from 2018-10-02 10-42-00

screenshot from 2018-10-02 10-42-21

screenshot from 2018-10-02 10-42-32

screenshot from 2018-10-02 10-51-59

screenshot from 2018-10-02 10-52-07

screenshot from 2018-10-02 10-56-16

screenshot from 2018-10-02 10-56-33

screenshot from 2018-10-02 10-57-17

screenshot from 2018-10-02 10-57-23

I just created a test account on an iPhone 8 and added all available social media networks to that record.
After importing the data to a Nextcloud address book, all entries have shown URLs too, as described in this issue ticket.
BTW, the custom defined entry is not displayed correctly. I would assume that x-user= contains the label of the custom record and x-apple would identify the name or address of the social media record

20190105_iphone_chat_clients

Here you can see how the original vcf file looked like:

BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//iPhone OS 12.1//EN
N:Ichats;Tom;;;
FN: Tom Ichats
X-SOCIALPROFILE;type=twitter:http://twitter.com/chat-twitter
X-SOCIALPROFILE;type=facebook:http://www.facebook.com/chat-fb
X-SOCIALPROFILE;type=flickr:http://www.flickr.com/photos/chat-flickr
X-SOCIALPROFILE;type=linkedin:http://www.linkedin.com/in/chat-linkedin
X-SOCIALPROFILE;type=myspace:http://www.myspace.com/chat-myspace
X-SOCIALPROFILE;type=sinaweibo:http://weibo.com/n/chat-sina-weibo
X-SOCIALPROFILE;type=Custom Chat;x-user=chat-custom:x-apple:chat-custom
END:VCARD

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

@WNYmathGuy any reason for closing? :)

@WNYmathGuy any reason for closing? :)

Well @skjnldsv the bot made me do it. =)) Did I get powned by a bot?

ahah, no, let me remove the needs info label! :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ArnY picture ArnY  路  5Comments

Spartachetto picture Spartachetto  路  3Comments

silverhook picture silverhook  路  5Comments

stvogel picture stvogel  路  3Comments

spoorun picture spoorun  路  5Comments