A Zettelstore must store its zettel somehow and somewhere. In most cases you want to store your zettel as files in a directory. Under certain circumstances you may want to store your zettel elsewhere.
An example are the predefined zettel that come with a Zettelstore. They are stored within the software itself. In another situation you may want to store your zettel volatile, e.g. if you want to provide a sandbox for experimenting.
To cope with these (and more) situations, you configure Zettelstore to use one or more boxes. This is done via the box-uri-X keys of the startup configuration (X is a number). Boxes are specified using special URIs, somehow similar to web addresses.
The following box URIs are supported:
Specifies a directory where zettel files are stored. DIR is the file path. Although it is possible to use relative file paths, such as ./zettel (→ URI is dir://.zettel), it is preferable to use absolute file paths, e.g. /home/user/zettel.
The directory must exist before starting the Zettelstore1.
It is possible to configure a directory box.
- file:FILE.zip or file:///path/to/file.zip
Specifies a ZIP file which contains files that store zettel. You can create such a ZIP file, if you zip a directory full of zettel files.
This box is always read-only.
Stores all its zettel in volatile memory. If you stop the Zettelstore, all changes are lost. To limit usage of volatile memory, you should configure this type of box, although the default values might be valid for your use case.
All boxes that you configure via the box-uri-X keys form a chain of boxes. If a zettel should be retrieved, a search starts in the box specified with the box-uri-2 key, then box-uri-3 and so on. If a zettel is created or changed, it is always stored in the box specified with the box-uri-1 key. This allows to overwrite zettel from other boxes, e.g. the predefined zettel.
If you use the mem: box, where zettel are stored in volatile memory, it makes only sense if you configure it as box-uri-1. Such a box will be empty when Zettelstore starts and only the first box will receive updates. You must make sure that your computer has enough RAM to store all zettel.
- There is one exception: when Zettelstore is started without any parameter, e.g. via double-clicking its icon, an directory called ./zettel will be created. ↩︎