This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KAddressBook: Using Filename As UID—Okay?

Tags: None
(comma "," separated)
Kaimbridge
Registered Member
Posts
1
Karma
0
OS
The other day, on the spur of the moment, I decided to start an e-Rolodex
and settled on KAddressBook, as I already have the KOrganizer Calendar
(Iʼm running Linux Mint 17.2, Mate 1.10.2).
One thing Iʼm not crazy about, is it using the cardʼs UID as the filename.
I think I may have found a legitimate workaround, however.
First, either create a “New Contact” through KAddressBook, or just create
a new vCard by opening a text file and changing the filename suffix from
“.txt” to “.vcf”.
Next, save the file as “NewCard.vcf”, in whatever directory you are using
(KAddressBook defaults to /home/(user)/.local/share/contacts/), with the
file containing only six lines (between the “----”ʼs):
---------------
BEGIN:VCARD
N:---;;;;
UID:---
VERSION:3.0
END:VCARD

---------------
This is going to be the permanent vCard template.
Then,
--copy that file in the same directory;
--open the file copy and change the UID from “---” to what you want
the filename to be (e.g., “Jones”);
--resave the file—donʼt bother changing the name;
--through KAddressBook, import that file copy.
Done! You just created a working vCard named “Jones.vcf”!  P=)
Now either delete the resaved file or open it and rename the UID to
another vCard you want to create.
Or, if you plan on making several files, you may want to make several
templates (e.g., “1NewCard.vcf”, “2NewCard.vcf”,“3NewCard.vcf”, etc.).
Is there any apparent (or not so apparent) problem with this concept?

    ~Kaimbridge~
User avatar
einar
Administrator
Posts
3402
Karma
7
OS
Interesting approach. I don't know anything about the spec to be sure it'll work (or won't work) in corner cases.


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot]