forked from Disroot/Howto
Cal contact terminal
This commit is contained in:
parent
883b56d3e1
commit
0e8fadb0d1
|
@ -0,0 +1,204 @@
|
|||
---
|
||||
title: GNU/Linux: Terminal integration
|
||||
visible: false
|
||||
page-toc:
|
||||
active: false
|
||||
published: true
|
||||
taxonomy:
|
||||
category:
|
||||
- docs
|
||||
---
|
||||
---
|
||||
|
||||
# Meta information
|
||||
This howto was last updated on 14-07-2019 and it refers to:
|
||||
|
||||
- vdirsyncer: version - 0.16.7-2 For Debian 10
|
||||
- Khard: version - 0.13.0-1 For Debian 10
|
||||
- Khal: version - 1:0.9.10-1.1 For Debian 10
|
||||
|
||||
NOTE: If the howto refers to an older software version than the provided by Disroot, or it is even possible that the one you're using in your device, there could be missing features or small parts of the information that may have changed.
|
||||
|
||||
Disroot's how-to documentation is a community driven process. We try to keep it as updated as we can.
|
||||
|
||||
|
||||
# General information
|
||||
|
||||
The goal of this tutorial is to explain how to synchronize calendar and contacts between the Nextcloud server and your client using the command line.
|
||||
For this operation the software that will be used are:
|
||||
|
||||
- Vdirsyncer: is a command-line tool for synchronizing calendars and addressbooks between a variety of servers and the local filesystem. More info [here](https://vdirsyncer.pimutils.org/en/stable/)
|
||||
|
||||
- Khard: is an address book for the Linux console. It creates, reads, modifies and removes carddav address book entries at your local machine. Khard is also compatible to the email clients like Mutt. More info [here](https://github.com/scheibler/khard)
|
||||
|
||||
- Khal: is a standards based CLI and terminal calendar program, able to synchronize with CalDAV servers through vdirsyncer. More info [here](https://github.com/pimutils/khal)
|
||||
|
||||
|
||||
# Vdirsyncer
|
||||
Install vdirsyncer for your GNU/Linux distribution.
|
||||
If there is no suitable package for your distribution, you’ll need to install [vdirsyncer manually](https://vdirsyncer.pimutils.org/en/stable/installation.html#manual-installation)
|
||||
|
||||
## Configuration
|
||||
Path of the configuration file: *"~/.config/vdirsyncer/config"*
|
||||
Contents of the *config* file:
|
||||
|
||||
```
|
||||
[general]
|
||||
# A folder where vdirsyncer can store some metadata about each pair.
|
||||
status_path = "~/.vdirsyncer/status/"
|
||||
|
||||
# CARDDAV
|
||||
[pair YOUR-USERNAME]
|
||||
# A `[pair <name>]` block defines two storages `a` and `b` that should be
|
||||
# synchronized. The definition of these storages follows in `[storage <name>]`
|
||||
# blocks. This is similar to accounts in OfflineIMAP.
|
||||
a = "Local"
|
||||
b = "Remote"
|
||||
|
||||
# Synchronize all collections available on "side B" (in this case the server).
|
||||
# You need to run `vdirsyncer discover` if new calendars/addressbooks are added
|
||||
# on the server.
|
||||
|
||||
# Omitting this parameter implies that the given path and URL in the
|
||||
# corresponding `[storage <name>]` blocks are already directly pointing to a
|
||||
# collection each.
|
||||
collections = ["from b"]
|
||||
|
||||
# Synchronize the "display name" property into a local file (~/.contacts/displayname).
|
||||
metadata = ["YOUR-USERNAME"]
|
||||
|
||||
# To resolve a conflict the following values are possible:
|
||||
# `null` - abort when collisions occur (default)
|
||||
# `"a wins"` - assume a's items to be more up-to-date
|
||||
# `"b wins"` - assume b's items to be more up-to-date
|
||||
conflict_resolution = "a wins"
|
||||
|
||||
[storage Local]
|
||||
# A storage references actual data on a remote server or on the local disk.
|
||||
# Similar to repositories in OfflineIMAP.
|
||||
type = "filesystem"
|
||||
path = "~/.contacts/"
|
||||
fileext = ".vcf"
|
||||
|
||||
[storage Remote]
|
||||
type = "carddav"
|
||||
url = "https://cloud.disroot.org/remote.php/dav/addressbooks/users/YOUR-USERNAME/contatti/"
|
||||
username = "YOUR-USERNAME"
|
||||
# The password can also be fetched from the system password storage, netrc or a
|
||||
# custom command. See http://vdirsyncer.readthedocs.org/en/stable/keyring.html
|
||||
password = "YOUR-PASSWORD"
|
||||
|
||||
# CALDAV
|
||||
#[pair Calendar]
|
||||
a = "CalendarLocal"
|
||||
b = "CalendarRemote"
|
||||
## collections = ["private", "work"]
|
||||
collections = ["from b"]
|
||||
|
||||
## Calendars also have a color property
|
||||
metadata = ["YOUR-USERNAME"]
|
||||
|
||||
## To resolve a conflict the following values are possible:
|
||||
## `null` - abort when collisions occur (default)
|
||||
## `"a wins"` - assume a's items to be more up-to-date
|
||||
## `"b wins"` - assume b's items to be more up-to-date
|
||||
conflict_resolution = "a wins"
|
||||
|
||||
[storage CalendarLocal]
|
||||
type = "filesystem"
|
||||
path = "~/.calendars/"
|
||||
fileext = ".ics"
|
||||
|
||||
[storage CalendarRemote]
|
||||
type = "caldav"
|
||||
url = "https://cloud.disroot.org/remote.php/dav/"
|
||||
username = "YOUR-USERNAME"
|
||||
password = "YOUR-PASSWORD"
|
||||
```
|
||||
|
||||
After having completed the configuration file, run this commands:
|
||||
|
||||
*vdirsyncer discover*
|
||||
|
||||
*You will be asked if you want to create the missing directories. Answer yes*
|
||||
|
||||
*vdirsyncer sync*
|
||||
|
||||
To synchronize the contacts and calendars just give the following command:
|
||||
|
||||
*vdirsyncer sync*
|
||||
|
||||
This command can be automated using [cron](https://en.wikipedia.org/wiki/Cron)
|
||||
|
||||
|
||||
Now you have synchronized your calendars and your contacts.
|
||||
In your local machine contacts are stored in *"~/.contacts/"* with the *.vcf* format.
|
||||
Calendars are stored in *"~/.calendars/"* with the *.ics* format.
|
||||
|
||||
# Khard
|
||||
|
||||
![](en/khard.png)
|
||||
|
||||
Install khal for your GNU/Linux distribution.
|
||||
If there is no suitable package for your distribution, you’ll need to install [Khard manually](https://github.com/scheibler/khard/)
|
||||
|
||||
## Configuration
|
||||
Path of the configuration file: *"~/.config/khard/khard.conf"*
|
||||
Contents of the *khard.conf* file:
|
||||
|
||||
```
|
||||
[addressbooks]
|
||||
[[YOUR-USERNAMENE]]
|
||||
path = ~/.contacts/contatti/
|
||||
|
||||
[general]
|
||||
editor = vim
|
||||
merge_editor = vimdiff
|
||||
default_action = list
|
||||
show_nicknames = no
|
||||
```
|
||||
|
||||
* Show contacts: *khard list*
|
||||
* Show details: * khard details*
|
||||
* Search contacts: *khard details [-- strict-search] name of contact*
|
||||
* For more information: **khard -h**
|
||||
|
||||
# Khal
|
||||
|
||||
![](en/khal.png)
|
||||
|
||||
Install khal for your GNU/Linux distribution.
|
||||
If there is no suitable package for your distribution, you’ll need to install [Khal manually](https://lostpackets.de/khal/install.html)
|
||||
|
||||
## Configuration
|
||||
Path of the configuration file: *"~/.config/khal/config"*
|
||||
Contents of the *config* file:
|
||||
|
||||
```
|
||||
[calendars]
|
||||
[[CALENDAR1]]
|
||||
path = ~/.calendars/CALENDAR1/
|
||||
color = dark cyan
|
||||
|
||||
[[CALENDAR2]]
|
||||
path = ~/.calendars/CALENDAR2/
|
||||
color = dark magenta
|
||||
|
||||
|
||||
[locale]
|
||||
timeformat = %H:%M
|
||||
dateformat = %Y-%m-%d
|
||||
longdateformat = %Y-%m-%d
|
||||
datetimeformat = %Y-%m-%d %H:%M
|
||||
longdatetimeformat = %Y-%m-%d %H:%M
|
||||
|
||||
local_timezone = Europe/Berlin
|
||||
default_timezone = Europe/Berlin
|
||||
|
||||
firstweekday = 0
|
||||
```
|
||||
*CALENDAR1 AND CALENDAR2 are the name of your calendars in Nextcloud"*.
|
||||
|
||||
* Show calendar: *khal*
|
||||
* Interactive khal (let's browse and edit calendars and events): *ikhal*
|
||||
* For more information: **khal -h**
|
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
|
@ -11,6 +11,6 @@ page-toc:
|
|||
|:--:|
|
||||
|**Nextcloud** integrates exceedingly well with **GNU/Linux**. The how-tos below contains the information to set up the desktop integration.|
|
||||
|
||||
|[GNOME](gnome-desktop-integration)|[KDE](kde-desktop-integration)|
|
||||
|:--:|:--:|
|
||||
|Desktop Integration|Desktop Integration|
|
||||
|[GNOME](gnome-desktop-integration)|[KDE](kde-desktop-integration)|[Terminal](terminal-integration)|
|
||||
|:--:|:--:|:--:|
|
||||
|Desktop Integration|Desktop Integration|Terminal Integration|
|
||||
|
|
Loading…
Reference in New Issue