jhermsmeier / node-vcf

A not so forgiving vCard / vcf parser
MIT License
107 stars 35 forks source link

I am not able to parse below file , its giving error like expected version but found BDAY #45

Closed akshay-champavat closed 2 years ago

akshay-champavat commented 2 years ago

I am trying to parse below vcf file , its giving error of expected version but found BDAY.

This file is having birthday property on the second line of the file which is making issue I think . The tool is expecting version to be at second line compulsory .

However this file import easily in the mobile so this file should be parse by this tool also .

I am attaching the file , please check and let me know .

File is as below

BEGIN:VCARD BDAY;VALUE=DATE:1963-09-21 VERSION:3.0 N:Stenerson;Derik FN:Derik Stenerson ORG:Microsoft Corporation ADR;TYPE=WORK,POSTAL,PARCEL:;;One Microsoft Way;Redmond;WA;98052-6399;USA TEL;TYPE=WORK,MSG:+1-425-936-5522 TEL;TYPE=WORK,FAX:+1-425-936-7329 EMAIL;TYPE=INTERNET:xxx@xxx.com END:VCARD BEGIN:VCARD VERSION:3.0 N:Ganguly;Anik FN:Anik Ganguly ORG: Open Text Inc. ADR;TYPE=WORK,POSTAL,PARCEL:;Suite 101;38777 West Six Mile Road;Livonia;MI;48152;USA TEL;TYPE=WORK,MSG:+1-734-542-5955 EMAIL;TYPE=INTERNET:ganguly@xxx.org END:VCARD BEGIN:VCARD VERSION:3.0 N:Moskowitz;Robert FN:Robert Moskowitz EMAIL;TYPE=INTERNET:rxx@xx-xx.com END:VCARD

Thanks[](url)

Satvik-web commented 2 years ago

Hey @akshay-champavat! if you are using C#.. There is an awesome nuget package called VCard which helps you to create VCards easily.. You can just give the image url and it will give you the proper VCard with the image in it.. Here is the link for the package..

Link : https://www.nuget.org/packages/VCard/

Github : https://github.com/Satvik-web/VCard

Implementation blog : https://satvikr.blogspot.com

Or you can search for Card in VS manage nuget packages tab and install the package in the 3rd result..

Satvik-web commented 2 years ago

Hey @akshay-champavat! if you are using C#.. There is an awesome nuget package called VCard which helps you to create VCards easily.. You can just give the image url and it will give you the proper VCard with the image in it.. Here is the link for the package..

Link : https://www.nuget.org/packages/VCard/

Github : https://github.com/Satvik-web/VCard

Implementation blog : https://satvikr.blogspot.com

Or you can search for Card in VS manage nuget packages tab and install the package in the 3rd result..

Pls note that this one is not a spam.. It's a package created by me.. U can use it if u wanted to!

jhermsmeier commented 2 years ago

This should be fixed in vcf@2.1.1 now – as https://github.com/jhermsmeier/node-vcf/issues/43 shows, I had forgotten to release the last pull request. I've tested your example with it, and it appears to parse fine now. Let me know if you run into any other troubles with this.