Implementations Register

xettel.implRegister.register_Z(name: str) Callable[[Type[ZettelFile]], Type[ZettelFile]]

Decorator for classes that registers Zettel implementations.

This decorator only adds the decorated class into the dictionary Z_REGISTRY at the name provided and does nothing else.

Classes decorated with this decorator are expected to be subclasses of xettel.base.ZettelFile.ZettelFile but no runtime typechecking is done.

See also

One instance of use of this decorator is the class xettel.impl.markdown.ZettelMD.ZettelMD which may serve as an example for building your own implementation.

Example

Another example is the class defined in doc/config/impl/myMD.py. It is the class I personally use and provides additional preprocessing to that of pandoc which allows for the use of tikz-cd for instance.

Parameters

name (str) – the name under which register the class.

Returns

A function registering the class and returning the said class.

xettel.implRegister.register_ZK(name: str) Callable[[Type[Zettelkasten]], Type[Zettelkasten]]

Decorator for classes that registers Zettelkasten implementations.

This decorator only adds the decorated class into the dictionary ZK_REGISTRY at the name provided and does nothing else.

Classes decorated with this decorator are expected to be subclasses of xettel.base.Zettelkasten.Zettelkasten but no runtime typechecking is done.

Parameters

name (str) – the name under which register the class.

Returns

A function registering the class and returning the said class.