ref: 5e39bdc9f4f8117890494e8a8ce632e77c6aaf46
dir: /man/vcardfs.1/
.TH VCARDFS 1 .SH NAME vcardfs \- vcard filesystem .SH SYNOPSIS .B vcardfs [ .B -s .I srv ] [ .B -m .I mtpt ] [ .I file ] .SH DESCRIPTION .I Vcardfs manages a vcard file using a filesystem hierarchy. For that, it opens the supplied .I file or the standard file .BR /usr/$user/lib/vcarddb.vcf . .PP By default, the filesystem will be mounted at .IR /mnt/vcard , if not other specified. .PP The filesystem presents the following files: .IP "\fIctl\fR" By writing to this file, the user can create new vcard entries and write the in-memory data to the disk. The .B ctl file wants one command per write. .IP To create a new entry, use the command .IR new , followed by a space and the name (FN) of the new entry. .IP Use the command .I write to save the data to the database vcard file. .IP "\fIexport\fR" .IP This readonly file provides a full vcard representation of all the loaded vcard entries. .IP "\fIimport\fR" .IP To import new data, open the file and write the data to it. After closing the file, the data will be parsed and integrated. .PP In addition to these static files, each loaded entry will present a folder within the filesystem. The name of that folder is either the .I FN property (if exists), or generated from the .I N property of that entry. These entry folders contain a file called .B export which yields a full vcard representation of this single entry. .PP Each entry folder also contains a folder for each property, named using the property name. The folder name will be prefixed with the group name, if the property is associated with a group, and a unique number identifying the entry of that property type. .PP Each property folder the following files: .IP "\fIdata\fR" .IP This RW file contains the value of the property. .IP "\fIgroup\fR" .IP This RW file contains the associated group. If it doesn't exist, it can be manually created. An empty string is equivalent to the absence of the file; both mean that the property has no group association. .IP "\fIparams\fR" .IP This folder contains a RW file for each parameter. .SH EXAMPLE This is a sample filesystem structure: .EX .ta \w' 'u +\w' 'u +\w' 'u +\w' 'u /mnt/vcard/ ctl export import John_Doe/ export 0:fn/ data params/ 0:n/ data params/ 0:tel/ data params/ type .EE .SH FILES .B /usr/$user/lib/vcarddb.vcf .SH SOURCE .B https://shithub.us/sirjofri/vcardfs .br .B https://git.sr.ht/~sirjofri/vcardfs .SH SEE ALSO .IR vcard (2) .SH BUGS Yes.