CLI Interface

Configuration handling

This module provides functions for retreiving the configuration from the config file and loading the end-user’s implementations of a Zettelkasten and a Zettel.

xettel.config.config

a dictionnary corresponding to the user’s configuration.

Type

MutableMapping[str, Any]

xettel.config.config_path

path to the config file

Type

str

xettel.config.config_dir

path to the config directory

Type

str

xettel.config.ZK_PATH

path to the Zettelkasten directory

Type

str

xettel.config.ZK_CLASS

a subclass of xettel.base.Zettelkasten.Zettelkasten chosen by the user as the class to use for managing the Zettelkasten.

Type

Type[Zettelkasten]

xettel.config.Z_CLASS

a subclass of xettel.base.ZettelFile.ZettelFile chosen by the user to use for managing individual Zettels.

Type

Type[Zettel]

xettel.config.load_implementations() None

Loads user defined classes. Must be put in the directory “impl” of the config directory.

xettel.config.pursue_read_command_check() None

Errors if the database cannot be queried and prints a nice message, nop otherwise.

xettel.config.set_config(configpath: str, zk_dir: Optional[str] = None, xettel_dir: Optional[str] = None) None

Sets the config and the config_path variable of this module

Parameters

configpath (str) – the path to the config file.

Keyword Arguments

zk_dir (Optional[str]) – the Zettelkasten directory

xettel.config.set_implementation() None

Sets the Z_CLASS and ZK_CLASS variables of this module

xettel.config.zk_dir_to_zk_data_dir(zk_dir: str) str

Translates a path to the ZK files to the path where the xapian db and all other files are stored.

Commands