Questions tagged [vobject]

vObject is intended to be a full featured Python package for parsing and generating vCard and vCalendar files.

29 questions
8
votes
2 answers

Creating a multiple phone vCard using vObject

im using vObject to create a vCard. Everything works well except I can't add multiple phone numbers. Right now i'm doing this: v.add('tel') v.tel.type_param = 'WORK' v.tel.value = employee.office_phone v.add('tel') v.tel.type_param =…
Emmet Brown
  • 456
  • 6
  • 21
3
votes
1 answer

Compare two vcards

I have two vcards : vcard1 = "BEGIN:VCARD VERSION:3.0 N;CHARSET=UTF-8:Name;;;; TEL:0005555000 END:VCARD" vcard2 = "BEGIN:VCARD VERSION:3.0 N;CHARSET=UTF-8:Name;;;; TEL:0005555000 …
faith
  • 69
  • 1
  • 5
3
votes
1 answer

Parsing multiple vCards with Python

I've got a vcf file from Google's contacts export feature. It was encoded with UTF-8, but my WinMobile telephone expects win1251 characters to import into contactbook. I recoded it into win1251 and did try to parse the file using vObject…
Alex
  • 39
  • 3
3
votes
3 answers

python, vobject, encoding, vcards

I am using vobject in python. I am attempting to parse the vcard located here: http://www.mayerbrown.com/people/vCard.aspx?Attorney=1150 to do this, I do the following: import urllib import vobject vcard =…
Neil Aggarwal
  • 511
  • 1
  • 10
  • 29
2
votes
0 answers

Accessing Name, Firstname... from a VObject in Python

I might be very stupid here, and my knowledge about Python is nearly at 0. I get a vcard from my Mac Contacts - I can access it and transform most of the data. Simple outputs are easy. I lack when I want to access data which is divided - I would…
Nils
  • 21
  • 1
2
votes
1 answer

Creating a multiple URL vCard using vObject

How can I get multiple URL in one VCard. I am using VObject library (https://pypi.org/project/vobject/) I want to create a VCard with details like: Fname Lname Company name Phone number address website url facebook url insta gram url Tik tok…
2
votes
3 answers

python code for vcard duplicate removal in vcf file works with vobject but only for "exact duplicates"

#!/usr/bin/env python2.7 import vobject abinfile='/foo/bar/dir/infile.vcf' #ab stands for address book aboutfile='/foo/bar/dir/outfile.vcf' def eliminate_vcard_duplicates (abinfile, aboutfile): #we first convert the Adrees Book IN FILE…
2
votes
1 answer

Error in parsing VCARD file using python VObject package

I am new to python.I am trying to parse VCARD 2.1 file using vobject 0.9.2 python package. I am trying to parse this VCARD file: BEGIN:VCARD VERSION:2.1 N;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:I;AM;DUMMY;; TEL;CELL:123456789 END:VCARD …
phoenix
  • 87
  • 1
  • 8
2
votes
1 answer

Parsing Vobject vcard telephones by type

I am trying to parse vCard Objects and i am having issues getting the different types of telephones or addresses i.e home or work. I can only get the first instance but not the second instance of…
Edwinner
  • 2,458
  • 1
  • 22
  • 33
2
votes
3 answers

Python / Django - Vcard Photo

I'm trying to generate a vcard using the vobject library but I am running into a couple of issues. First off, I've tried adding a photo using both a url and base64 data, but I cannot get the photo to display on the OS X contacts app (Mavericks), or…
Muhammed Abad
  • 81
  • 1
  • 4
2
votes
1 answer

Django ical with Vobject issue with pytz

I am using vobject to create a ical event in Django. I am having trouble with the lower level code. It looks like ical is trying to grab a timezone with obj.add(TimezoneComponent(tzinfo=getTzid(tzid))). But then I get raise NonExistentTimeError(dt)…
dman
  • 10,406
  • 18
  • 102
  • 201
1
vote
0 answers

Getting a list of occurrences for a given vCalendar

I'm trying to use vobject, without success, to get a list of datetime objects for all event occurrences (see the RRULE paramether that sets the event to be repeated daily until a date) for a given vCalendar, which seems to be well-formatted…
nabucosound
  • 1,283
  • 1
  • 12
  • 23
1
vote
1 answer

Parsing iCal feed with multiple events with Python and vobject

I'm trying to parse a feed with multiple events and its only returning me one item ics = urllib.urlopen("https://www.google.com/calendar/ical/pcolalug%40gmail.com/public/basic.ics").read() events = [] components = vobject.readComponents(ics) for…
sontek
  • 12,111
  • 12
  • 49
  • 61
1
vote
0 answers

How to generate a vobject from a string

I have a Vcard string and I want to transform it to a Vobject : I did the following and I got the mentioned error , my question is what is this error and how can I transform a string to a vcard object? my_str = "BEGIN:VCARD …
NEW_user 2020
  • 45
  • 1
  • 7
1
vote
0 answers

How to properly traverse vCards (.vcf) with Python and the vobject module

I have been trying to read a series of vCards and their attributes using the vobject python module. The vCards are not made by me and when I download some, I find some errors in iterating through some conflicting lines. Some of the sections of the…
matlac
  • 23
  • 3
1
2