View Source Naiveical.Creator.Vcard (Naiveical v0.1.8)
Module for creating Vcard(vcf) text files.
Link to this section Summary
Functions
Creates address property. Address property has 7 list-components, where first two are ommited. Please refer to RFC 6350 Section 6.3.1
Creates catagories, also know as tags. Categories are comma separated like CSV. Can be used to group vcards. Reference RFC 6350 Section 6.7.1
Creates display name, which is FN property defined by RFC 6350 Section 6.2.1
Creates an email to put in VCARD file. Pass a keyword list of params(options) to add params to email address you are creating. Please refer the RFC 6350 Section 6.4.2 for more details about the supported params.
Creates a full name for VCARD. N property consist of 5 list-components. N:PREFIX;FIRSTNAME;MIDDLENAME;LASTNAME;SUFFIX ReferenceRFC Idenitification Properties N SECTION 6.2.2
Creates a KIND for vcard. Please refer to RFC Section 6.1.4
Creates NICKNAME, can be random text.
Simple note to add more information about the VCARD. Reference RFC 6350 Section 6.7.2
Creates organization.
Creates ROLE, it is most often associated with organization.
Creates special dates such as birthdays or anniversary.
Creates telephone property for VCARD. Reference RFC Section 6.4.1
Creates TITLE, it is most often associated with organization.
Create a simple VCard file. VERSION and FN property must be included in vcard object. NOTE: in our case, which we are using SabreDav as a Cardav server, version and product ID will be overwritten by server itself.
Creates URL property. Reference RFC 6350 Section 6.7.8
Link to this section Functions
Creates address property. Address property has 7 list-components, where first two are ommited. Please refer to RFC 6350 Section 6.3.1
Creates catagories, also know as tags. Categories are comma separated like CSV. Can be used to group vcards. Reference RFC 6350 Section 6.7.1
create_display_name(display_name \\ "", first_name \\ "", last_name \\ "")
View SourceCreates display name, which is FN property defined by RFC 6350 Section 6.2.1
example
Example
iex> Naiveical.Creator.Vcard.create_display_name("Display Name")
"Display Name"
Creates an email to put in VCARD file. Pass a keyword list of params(options) to add params to email address you are creating. Please refer the RFC 6350 Section 6.4.2 for more details about the supported params.
example
Example
iex> Naiveical.Creator.Vcard.create_email("email@domain.tld", type: "work", pref: 1, label: "good")
EMAIL;TYPE=work;PREF=1;LABEL=good:email@domain.tld
create_full_name(prefix, first_name, middle_name, last_name, suffix, opts \\ [])
View Source@spec create_full_name( prefix :: String.t(), first_name :: String.t(), middle_name :: String.t(), last_name :: String.t(), suffix :: String.t(), opts :: List.t() ) :: String.t()
Creates a full name for VCARD. N property consist of 5 list-components. N:PREFIX;FIRSTNAME;MIDDLENAME;LASTNAME;SUFFIX ReferenceRFC Idenitification Properties N SECTION 6.2.2
example
Example
iex> Naiveical.Creator.Vcard.create_full_name("", "User", "Middle", "Surname", "", value: "text")
N;VALUE=text:;User;Middle;Surname;;
Creates a KIND for vcard. Please refer to RFC Section 6.1.4
Creates NICKNAME, can be random text.
Simple note to add more information about the VCARD. Reference RFC 6350 Section 6.7.2
Creates organization.
Creates ROLE, it is most often associated with organization.
Creates special dates such as birthdays or anniversary.
Creates telephone property for VCARD. Reference RFC Section 6.4.1
example
Example
iex> Naiveical.Creator.Vcard.create_telephone("1234567890", type: "work", pref: 1)
TEL;TYPE=work;PREF=1:1234567890
Creates TITLE, it is most often associated with organization.
Create a simple VCard file. VERSION and FN property must be included in vcard object. NOTE: in our case, which we are using SabreDav as a Cardav server, version and product ID will be overwritten by server itself.
Creates URL property. Reference RFC 6350 Section 6.7.8
example
Example
iex> Naiveical.Creator.Vcard.create_website("https://example.org", type: "work")
URL;TYPE=work:https://example.org