manual: describe hook directives.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
This commit is contained in:
brian m. carlson 2014-12-14 23:41:30 +00:00
parent 16c9da38e0
commit 08ded8196b
No known key found for this signature in database
GPG key ID: BF535D811F52F68B

View file

@ -109,6 +109,26 @@ Column directives indicate how many columns to use to display fields. A column
directive consists of a record with the values `col` and an integer number of
columns.
==== Hook Directives (`txn`)
Hook directives indicate a series of hooks to be run on each load or save
operation. Several different hooks are available. The default set of hooks is
`hash`. This provides an SHA-2 hash of the data in the `dtb.checksum` file, and
cannot be disabled, only replaced with a specific algorithm.
By default, the hash is `sha256` on 32-bit systems and `sha512` on 64-bit
systems; `sha384` is also available. If a specific algorithm is specified, it
overrides the `hash` default. Older versions of newfol only supported the
`sha256` algorithm.
The other available hook is `git`. This hook performs a commit every time the
file is saved, and a git checkout of the `dtb` file before every load. This
allows a user to keep a history of the data and to easily back it up to another
location.
A hook directive consists of a record starting with the value `txn`, and
followed by a list of hook names.
=== Configuration File
Configuration files are identical to schema files except that instead of the