Matthias Beyer
e211aba341
The complexity of the create() routine justifies the move to another file. This commit implements the create() functionality which creates a TOML tempfile which the user should edit and then reads the contents to build the Vcard object which then gets written to either stdout or the destination file. Besides that: * Move helper function to util module * Rewrite and fix tests
90 lines
1.8 KiB
TOML
90 lines
1.8 KiB
TOML
# Contact template for imag-contact version 0.5.0
|
|
#
|
|
# This file is explicitely _not_ distributed under the terms of the original imag license, but
|
|
# public domain.
|
|
#
|
|
# Use this TOML formatted template to create a new contact.
|
|
|
|
[name]
|
|
|
|
# every entry may contain a string or a list of strings
|
|
# E.G.:
|
|
# first = "Foo"
|
|
# last = [ "bar", "bar", "a" ]
|
|
prefix = "test"
|
|
first = "test"
|
|
additional = "test"
|
|
last = "test"
|
|
suffix = "test"
|
|
|
|
[person]
|
|
|
|
# Birthday
|
|
# Format: YYYY-MM-DD
|
|
birthday = "2017-01-01"
|
|
|
|
# Nickname
|
|
# "type" is optional
|
|
[[nickname]]
|
|
type = "work"
|
|
name = "boss"
|
|
|
|
[organisation]
|
|
|
|
# Organisation name
|
|
# May contain a string or a list of strings
|
|
name = "test"
|
|
|
|
# Organisation title and role
|
|
# May contain a string or a list of strings
|
|
title = "test"
|
|
|
|
# Role at organisation
|
|
# May contain a string or a list of strings
|
|
role = "test"
|
|
|
|
# allowed types:
|
|
# vcard 3.0: At least one of bbs, car, cell, fax, home, isdn, msg, modem,
|
|
# pager, pcs, pref, video, voice, work
|
|
# vcard 4.0: At least one of home, work, pref, text, voice, fax, cell, video,
|
|
# pager, textphone
|
|
phone = [
|
|
{ "type" = "home", "number" = "0123 123456789" },
|
|
]
|
|
|
|
#
|
|
# Email addresses
|
|
#
|
|
email = [
|
|
{ "type" = "home", "addr" = "examle@examplemail.org" },
|
|
]
|
|
|
|
# post addresses
|
|
#
|
|
# allowed types:
|
|
# vcard 3.0: At least one of dom, intl, home, parcel, postal, pref, work
|
|
# vcard 4.0: At least one of home, pref, work
|
|
[[addresses]]
|
|
type = "home"
|
|
box = "test"
|
|
extended = "test"
|
|
street = "test"
|
|
code = "test"
|
|
city = "test"
|
|
region = "test"
|
|
country = "test"
|
|
|
|
[other]
|
|
|
|
# categories or tags
|
|
# May contain a string or a list of strings
|
|
categories = "test"
|
|
|
|
# Web pages
|
|
# May contain a string or a list of strings
|
|
webpage = "test"
|
|
|
|
# Notes
|
|
# May contain a string or a list of strings
|
|
note = "test"
|
|
|