aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2016-04-01 08:35:14 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2016-04-01 08:35:14 +0200
commit2c9ea341cf2364ac0a4ea05d0d0f3dca983c14de (patch)
tree3fe9d426395764d5d2aec322e30a167772192cf2
parent4633846550a1efd3a758e51551b6a93446b2297d (diff)
downloadcalcurse-2c9ea341cf2364ac0a4ea05d0d0f3dca983c14de.tar.gz
calcurse-2c9ea341cf2364ac0a4ea05d0d0f3dca983c14de.zip
Document the hooks feature
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
-rw-r--r--contrib/caldav/README17
-rw-r--r--doc/calcurse.1.txt19
-rw-r--r--doc/manual.txt19
3 files changed, 54 insertions, 1 deletions
diff --git a/contrib/caldav/README b/contrib/caldav/README
index aed1320..008b3fe 100644
--- a/contrib/caldav/README
+++ b/contrib/caldav/README
@@ -26,10 +26,25 @@ argument. You can choose between the following initialization modes:
--init=keep-remote Remove all local calcurse items and import remote objects
--init=keep-local Remove all remote objects and push local calcurse items
--init=two-way Copy local objects to the CalDAV server and vice versa
-
+
For subsequent calcurse-caldav invocations, you don't need to specify any
additional parameters.
+Hooks
+-----
+
+You can place scripts in `$HOME/.calcurse/caldav/hooks/` to trigger actions at
+certain events. To enable a hook, add a script with one of the following names
+to this directory. Also make sure the scripts are executable.
+
+*pre-sync*::
+ Executed before the data files are synchronized.
+*post-sync*::
+ Executed after the data files are synchronized.
+
+Some examples can be found in the `contrib/caldav/hooks/` directory of the
+calcurse source tree.
+
How It Works
------------
diff --git a/doc/calcurse.1.txt b/doc/calcurse.1.txt
index 9fc37b6..adc3265 100644
--- a/doc/calcurse.1.txt
+++ b/doc/calcurse.1.txt
@@ -413,6 +413,25 @@ internal representation and were designed to be used for scripting:
* *(hash)*
* *(raw)*
+Hooks
+-----
+
+You can place scripts in `$HOME/.calcurse/hooks/` to trigger actions at certain
+events. To enable a hook, add a script with one of the following names to this
+directory. Also make sure the scripts are executable.
+
+*pre-load*::
+ Executed before the data files are loaded.
+*post-load*::
+ Executed after the data files are saved.
+*pre-save*::
+ Executed before the data files are loaded.
+*post-save*::
+ Executed after the data files are saved.
+
+Some examples can be found in the `contrib/hooks/` directory of the calcurse
+source tree.
+
Notes
-----
diff --git a/doc/manual.txt b/doc/manual.txt
index d140dfa..f79f42e 100644
--- a/doc/manual.txt
+++ b/doc/manual.txt
@@ -632,6 +632,25 @@ The following environment variables affect the way `calcurse` operates:
Specifies the default viewer to be used for reading notes. If this variable
is not set, then `/usr/bin/less` is used.
+Hooks
+~~~~~
+
+You can place scripts in `$HOME/.calcurse/hooks/` to trigger actions at certain
+events. To enable a hook, add a script with one of the following names to this
+directory. Also make sure the scripts are executable.
+
+*pre-load*::
+ Executed before the data files are loaded.
+*post-load*::
+ Executed after the data files are saved.
+*pre-save*::
+ Executed before the data files are loaded.
+*post-save*::
+ Executed after the data files are saved.
+
+Some examples can be found in the `contrib/hooks/` directory of the calcurse
+source tree.
+
User interface
~~~~~~~~~~~~~~