summaryrefslogtreecommitdiffstats
path: root/imagrc.toml
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2017-10-10 18:48:21 +0200
committerMatthias Beyer <mail@beyermatthias.de>2017-11-09 11:19:17 +0100
commitd0ec7e26dcfd28bf20fd90d79a8c39cc42a18944 (patch)
treee0ba0e877a5a9e4db22fcf4c41381f8029bafafd /imagrc.toml
parent0540ae9392db2f887b3ef1bcdc6bc49b496655cc (diff)
Add implementation for imag-contact
* Implement contact listing with formatting via commandline or config * Implement importer functionality for contact * Implement "show" subcommand * imagrc.toml: Add explanation which fns are supported in templates
Diffstat (limited to 'imagrc.toml')
-rw-r--r--imagrc.toml61
1 files changed, 61 insertions, 0 deletions
diff --git a/imagrc.toml b/imagrc.toml
index 93184460..67006073 100644
--- a/imagrc.toml
+++ b/imagrc.toml
@@ -255,3 +255,64 @@ default_collection = "default"
editor = "vim -R {{entry}}"
web = "chromium {{entry}}"
+[contact]
+
+# Format for listing contacts
+#
+# Available variables:
+# * "i" : Integer, counts the output lines
+# * "id" : The hash which can be used to print the entry itself.
+# * "ADR" : Array
+# * "ANNIVERSARY" : String
+# * "BDAY" : String
+# * "CATEGORIES" : Array<String>
+# * "CLIENTPIDMAP" : String
+# * "EMAIL" : Array<String>
+# * "FN" : Array<String>
+# * "GENDER" : String
+# * "GEO" : Array<String>
+# * "IMPP" : Array<String>
+# * "KEY" : Array<String>
+# * "LANG" : Array<String>
+# * "LOGO" : Array<String>
+# * "MEMBER" : Array<String>
+# * "N" : String
+# * "NICKNAME" : Array<String>
+# * "NOTE" : Array<String>
+# * "ORG" : Array<String>
+# * "PHOTO" : Array<String>
+# * "PRIOD" : String
+# * "RELATED" : Array<String>
+# * "REV" : String
+# * "ROLE" : Array<String>
+# * "SOUND" : Array<String>
+# * "TEL" : Array<String>
+# * "TITLE" : Array<String>
+# * "TZ" : Array<String>
+# * "UID" : String
+# * "URL" : Array<String>
+# * "VERSION" : String
+#
+# Multiple lines shouldn't be used, as this is for listing multiple entries.
+#
+# Note: Abbreviating the hash ("id") is not yet supported in the "show" command,
+# thus we print the id here without abbreviating it. To abbreviate it to 5
+# characters, use:
+#
+# {{abbrev 5 id}}
+#
+list_format = "{{lpad 5 i}} | {{id}} | {{FN}} | {{mail}} | {{adr}}"
+
+# The format when printing a single contact
+#
+# Here, the same rules like for the list format apply.
+# Multiple lines should work fine.
+# The "i" variable defaults to zero (0)
+show_format = """
+{{id}} - {{UID}}
+
+Full name: {{FN}}
+Email : {{EMAIL}}
+Address : {{ADR}}
+"""
+