Skip to content

Commit 235f6ad

Browse files
committed
policy description in readme
1 parent 61ba30c commit 235f6ad

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ A webhook ensures that manual edits of the bibliography file and authentication-
5656
To allow manual changes to the bibliography file or the authentication tokens without having to restart the server, it is necessary to configure a webhook.
5757
The webhook has to send a notification to `<your bib server>/v1/webhook` on push events. There is no secret token required.
5858

59+
### Policy
60+
The tool allows defining a policy for bibliography entries.
61+
If enabled, a new entry can only be added if it passes the checks of the policy.
62+
The policy is written as a callback function in Python.
63+
It has accecss to the entry that should be added, as well as the entire database containing all entries.
64+
A simple policy is provided in `policy.py`: it rejects entries where the citation key has a length of 0, and accepts all other entries.
65+
5966
### Run Server
6067
* Build the Docker container: `docker build --tag bibtool .`
6168
* Start the Docker container: `docker run -p 5000:5000 -v <path to bibliography folder>:/data bibtool`

0 commit comments

Comments
 (0)