1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
|
.TH CONTACTS 5 LIBCONTACTS
.SH NAME
contacts \- Simple and flexible contact information file format
.SH DESCRIPTION
The directory
.I ~/.config/contacts
is used to store files with contact information, one
person per file, in the format specified by this document.
File names that end with a tilde
.RB ( ~ )
are reserved for temporary storage while saving a file
so that an already existing file (with the same name minus
the tilde) is replaced before the new version is completed,
and also so that other processes do not read incomplete files.
File names that start with a dot
.RB ( . )
are reserved for special purpose entries.
It is recommended that file names do not contain any other
characters than lower case ASCII letters, ASCII digits and
ASCII hyphen
.RB ( - ).
Subdirectories are prohibited.
.PP
The recommended default format for a file name is the
name as the user prefers it to be displayed in the latin
alphabet, in lower case with all non-letters (e.g. hyphens)
removed, and spaces replaced with hyphens.
.PP
The currently defined special puporse entries are:
.TP
.B .me
The user himself.
.TP
.B .nobody
Unused data, such as created groups without any members.
.PP
The files in
.I ~/.config/contacts
are UTF-8 text files, meaning that they must not contain
any NUL bytes and each line is terminated by a <newline>
.RB ( \(aq\en\(aq ).
.PP
Each line in the file is a data entry and should begin
with combination of printable ASCII characters, mostly
upper case letters, called a tag, (non-standard entires
should also begin with
.BR X- ),
followed by either a colon
.RB ( : ),
or a regular blank space (horizontal tab should also be
tolerated) followed by the data for the entry. Some lines
however are only flags and only contain the tag. Lines
using the colon alternative must end with that colon,
and subsequent lines starting a horizontal tab (one or more
regular blank spaces and horizontal tabs should also be
tolerated), until but excluding the subsequent first line
that does not start this way, shall be considered subentries
(this indentation is excluded in the description above, but
is there for subentries, top-level entries are not
indented). There is no prescribed order for entries.
.PP
Standard entires are, unless specified otherwise top-level
entries may be specified multiple times (subentries must
not be specified multiple times):
.TP
.B NAME
The name of the contact as it should be displayed.
May only be specified once.
.TP
.B FNAME
The contact's given name.
May only be specified once.
.TP
.B LNAME
The contact's family name, if any.
May only be specified once.
.TP
.B FLNAME
The full name of the contact. There is no prescribed
format, and there never will be. Application are advised
not to presume any format. May only be specified once.
.TP
.B NICK
The contact's nickname (once upon a time known as surname),
if any. May only be specified once.
.TP
.B PHOTO
Pathname to photo of the contact; should either be an
absolute path or a path relative to the user's home
directory.
Applications may decide which photo to use based on
their size, but user shall put the order of preference.
For each telephone number, applications should only use
photos that are shared exactly between the contacts that
share that telephone number.
.TP
.B GROUP
Contact group that the contact is a member of.
For the special pseudocontact
.BR .nobody ,
it specified that the group shall exist, even if it may
be empty.
.TP
.B NOTES
Personal note about the contact.
.TP
.B BLOCK:
Contact block information for the contact. Standard
subentries are:
.RS
.TP
.B SRV
The service the block is applied to. Names beginning with a dot
.RB ( . )
are reserved, currently defined special service names are:
.RS
.TP
.B .call
Telephone calls.
.TP
.B .sms
SMS, MMS, and similar.
.TP
.B .global
The block applies everywhere. When checking if a contact is
blocked, this entry is least prioritised, meaning that if a
block entry that is specific the service that makes checks
exists, that entry is used, otherwise this entry is used.
.PP
Other values are defined by the services that use them, and
should, if appropriate, be the package name of the application's
reference implementation. In some situation, the protocol may
be standardised, in which case the name of the protocol should
be used. These values shall be identical to those used in the
top-level entry
.BR CHAT 's
subentry
.BR SRV .
.RE
.TP
.B EXPLICIT
Flag without data, that specifies that the contact shall
be let known that he is being blocked.
.TP
.B ASK
POSIX time that if passed, the service shall ask the user
if the contact shall be unblocked; must be an unsigned decimal
integer. 0 or unspecified if never.
.TP
.B REMOVE
POSIX time that if passed, the service shall automatically
unblock the contact; must be an unsigned decimal integer.
0 or unspecified if never.
.TP
.B OFF
Flag without data, that specifies that the service shall,
unless it lets the contact know he is being blocked, pretend
that the phone is turned off.
.TP
.B BUSY
Flag without data, that specifies that the service shall,
unless it lets the contact know he is being blocked, pretend
that the user is busy and cannot answer.
.TP
.B IGNORE
Flag without data, that specifies that the service shall,
unless it lets the contact know he is being blocked, just
ignore the call or message.
.PP
The flags
.BR OFF ,
.BR BUSY ,
and
.BR IGNORE
may not be combined. If neither is specified, the service
shall not actually block user, unless
.B EXPLICIT
is specified and the service can honour that flag, but
instead just not call its owner's attention.
.RE
.TP
.B ORG:
Organisation membership for the contact. Standard
subentries are:
.RS
.TP
.B ORG
The name of the organisation the contact is a member of.
.TP
.B TITLE
The contact's title or role within the orginisation.
.RE
.TP
.B EMAIL:
E-mail address for the contact. Standard subentries are:
.RS
.TP
.B CTX
The context in which the e-mail account is used. For example
.B personal
or
.BR work .
.TP
.B ADDR
The e-mail address.
.RE
.TP
.B KEY:
PGP-key for the contact. Standard subentries are:
.RS
.TP
.B CTX
The context in which the PGP-key is used. For example
.B personal
or
.BR work .
.TP
.B ID
The fingerprint if the PGP-key.
.RE
.TP
.B PHONE:
Telephone numbers for the contact. Standard subentries are:
.RS
.TP
.B CTX
The context in which the telephone number is used. For example
.BR home ,
.BR personal ,
or
.BR work .
.TP
.B NUMBER
The telephone number.
.TP
.B MOBILE
Whether the number is to a device that can receive SMS-message,
e.g. a mobile telephone.
.TP
.B FAX
Whether the number is to a facsimile machine (fax).
.PP
Telephone numbers can be shared, in case of an incoming
call where the phone number is shared, the application
shall list contacts that telephone number.
.RE
.TP
.B ADDR:
Address (physical location) for the contact. Standard
subentries are:
.RS
.TP
.B CTX
What is the address for. For example,
.B home
may be used if it is the contact's home address,
.B cabin
if its his summer cabin, or
.B work
if its his workplace. If the contact for example has two
workplaces, Alphatech and Betatech,
.B work, alphatech
and
.B work, betatech
would be useful values.
.TP
.B COUNTRY
The country.
.TP
.B C/O
Care of address.
.TP
.B ADDR
Steet address, street number, floor number, appartment number, etc.
.TP
.B CODE
The post code.
.TP
.B CITY
The post town.
.TP
.B COORD
The GPS coordinates in decimal format specified as the
latitude followed by a regular blank space and the longitude.
Unless
.B +
or
.B -
is used,
.BR N ,
.BR S ,
.BR W ,
and
.BR E
suffixes may be used.
.RE
.TP
.B SITE:
Internet sites (e.g. Web sites) that the contact own or
has an account on. Standard subentries are:
.RS
.TP
.B CTX
The context in which the site is used. For example
.B blog
or
.BR software .
.TP
.B ADDR
Address to the site, including protocol. For example
.B https://example.org
or
.BR gopher://example.org .
.RE
.TP
.B CHAT:
The contact's contact information for a services, like
an instant messenging service. Standard subentries are:
.RS
.TP
.B CTX
The context in which the chat account is used. For example
.B personal
or
.BR work .
.TP
.B SRV
The service in which the account exists. For example
.BR matrix .
Values are defines by the services that use them, and should,
if appropriate, be the package name of the application's
reference implementation. In some situation, the protocol
may be standardised, in which case the name of the protocol
should be used.
.TP
.B ADDR
The account username, telephone number, ID or other address.
.PP
Entries shall be added by the applications that use the
chat services.
.RE
.TP
.B BIRTH:
When the contact celebrates his birthday. The date shall
be specified in the Gregorian calendar. Conversion and or
from other calendar is up to applications. Standard
subentries are:
.RS
.TP
.B YEAR
The year of the birthdate; must be an unsigned decimal
integer. 0 will be treated as unspecified.
.TP
.B MONTH
The month of the birthdate; must be an unsigned decimal
integer. 0 will be treated as unspecified.
.TP
.B DAY
The day of the month of the birthdate; must be an unsigned
decimal integer. 0 will be treated as unspecified.
.TP
.B EARLY
This flag may used (without any data specified) if the
contact's birthday is on February 29. If specified, he
prefers to celebrate his birthday one day early: on
February 29, on common years. Otherwise, he presumable
prefers to celebrate his birthday on the proper date:
on March 1, on common years.
.PP
May only be specified once.
.RE
.TP
.B ICE
Whether the contact shall be listed as an In Case of Emergency
(ICE) contact that can be view without unlocking the phone.
No data may be added to this entry. May only be specified once.
.TP
.B NPERSON
The contact is not a person, it may be for example be a
company or the voice-mail inbox service. No data may be
added to this entry. May only be specified once and cannot
be combined with
.B MALE
or
.BR FEMALE .
.TP
.B MALE
The contact is a male. No data may be added to this entry.
May only be specified once and cannot be combined with
.B NPERSON
or
.BR FEMALE .
.TP
.B FEMALE
The contact is a female. No data may be added to this entry.
May only be specified once and cannot be combined with
.B NPERSON
or
.BR MALE .
.SH SEE ALSO
.BR libcontacts (7),
.BR libcontacts.h (0)
|