nextcloud / contacts

📇 Contacts app for Nextcloud
https://apps.nextcloud.com/apps/contacts
GNU Affero General Public License v3.0
569 stars 172 forks source link

Social Network parsing for imports #523

Open WNYmathGuy opened 6 years ago

WNYmathGuy commented 6 years ago

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!](https://www.bountysource.com/issues/56371185-social-network-parsing-for-imports?utm_campaign=plugin&utm_content=tracker%2F46751899&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F46751899&utm_medium=issues&utm_source=github).
skjnldsv commented 6 years ago

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

WNYmathGuy commented 6 years ago

@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.

skjnldsv commented 6 years ago

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?

WNYmathGuy commented 6 years ago

@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:jmzapodafi@gmail.com
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.

skjnldsv commented 6 years ago

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

WNYmathGuy commented 6 years ago

@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:JoDo@aol.com
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

j-ed commented 5 years ago

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
ghost commented 5 years ago

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.

skjnldsv commented 5 years ago

@WNYmathGuy any reason for closing? :)

WNYmathGuy commented 5 years ago

@WNYmathGuy any reason for closing? :)

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

skjnldsv commented 5 years ago

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