joonhocho / vcard-generator Goto Github PK
View Code? Open in Web Editor NEWVCard v4.0 rfc6350 compliant generator from JSON.
License: MIT License
VCard v4.0 rfc6350 compliant generator from JSON.
License: MIT License
while creating multiple URL's, cant specify the label parameter. when we specify it, will not reflect in the response.
const vcardContent = vcard.generate({
name: {
familyName: 'test',
},
emails: [{
type: 'work',
text: '[email protected]',
}],
phones: [{
type: 'SMS',
text: '+1408338',
}],
urls: [{
type:'whatsapp',
label:'Whatsapp'
uri: 'https://api.whatsapp.com/send?phone=+4915',
}]
});
getting without label responce
BEGIN:VCARD
VERSION:4.0
N:test;;;;
EMAIL;TYPE=work:[email protected]
TEL;TYPE=SMS:+1408338
URL;TYPE=whatsapp:https://api.whatsapp.com/send?phone=+4915
END:VCARD
I made a web app that allows users to download a VCard on their phone.
Here's the code to generate the VCard:
const buildVCard = someone =>
vCard.generate({
name: {
familyName: someone.name.split(' ').slice(1).join(' '),
givenName: someone.name.split(' ')[0],
},
works: [{
organisation: 'MyOrg',
}],
phones: [{
type: 'work',
text: someone.phone,
}],
emails: [{
type: 'work',
text: someone.email,
}],
photos: [{
type: 'work',
uri: someone.avatar,
}],
});
Here is example data for someone
:
{
"name": "Jane Doe",
"avatar": "https://example.com/048636_n.jpg",
"phone": "+33606060606",
"email": "[email protected]"
}
The problem is that on Android phones, the contacts app cannot import the resulting vCard : "The format is not supported". It's working fine on iOS.
Are there any specificities to vCards on Android?
Hi
Can you release a dist for used on web
thanks
When I using this npm it shows like
vcard is not a function at Vcardgenerator.generate (/home/jose/VCardApp/vcardgenerator.js:32:30) at /home/jose/VCardApp/app.js:62:20 at Layer.handle [as handle_request] (/home/jose/VCardApp/node_modules/express/lib/router/layer.js:95:5) at next (/home/jose/VCardApp/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/jose/VCardApp/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/jose/VCardApp/node_modules/express/lib/router/layer.js:95:5) at /home/jose/VCardApp/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/jose/VCardApp/node_modules/express/lib/router/index.js:335:12) at next (/home/jose/VCardApp/node_modules/express/lib/router/index.js:275:10) at /home/jose/VCardApp/node_modules/body-parser/lib/read.js:130:5 at invokeCallback (/home/jose/VCardApp/node_modules/raw-body/index.js:262:16) at done (/home/jose/VCardApp/node_modules/raw-body/index.js:251:7) at IncomingMessage.onEnd (/home/jose/VCardApp/node_modules/raw-body/index.js:307:7) at emitNone (events.js:86:13) at IncomingMessage.emit (events.js:185:7)
The npm is successfully installed..but shows like this...
This may already be supported but vcards support groups and that would be very useful for my use-case (automatically creating vcards from a spreadsheet)
It doesn't look too hard for implementation... (famous last words)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.