Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

url info not importing via QR vCard #119

Open
Torvicio opened this issue Feb 21, 2023 · 2 comments
Open

url info not importing via QR vCard #119

Torvicio opened this issue Feb 21, 2023 · 2 comments

Comments

@Torvicio
Copy link

Here is the code I used. The contact1.png works, and when I use "Android Lens", it asks to save the info, but it does not import the website url info: I have not tested it on iPhone.

import segno
from segno import helpers

vcard = segno.helpers.make_vcard(
name='Pie;Rasberry',
displayname='Rasberry Pie',
# email can be multiple values, seperated by commas or make ['xx@gsomeemail.com','xg@someother.com']
email=('rpie.@some.com'),
url =[
'https://www.amazon.com',
'https://www.google.com',
],
phone='+1111111111',
# extra items that can be used per testing - originated by chatgpt

title = 'Boss',
org = 'MyBiz-NotYours',

)

img = vcard.to_pil(scale=6, dark="#FF7D92").rotate(45, expand=True)
img.save('contact1.png')

@heuer
Copy link
Owner

heuer commented Feb 23, 2023

Thanks for your report.

Android may only support one URL.

vCard 4 defines that multiple URLs can be named: https://www.rfc-editor.org/rfc/rfc6350#section-6.7.8

As far as I know, vCard 3 makes no statement about cardinality.

Please try the code with just one URL and report back if it works.

@Torvicio
Copy link
Author

I tried it with only one url .. shortened it to :
url = 'https://www.amazon.com',
then tried : url = [https://www.amazon.com']

Code does its thing, but when saved, the URL is not saved at all.
I am using Android 13 as a reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants