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_REGISTRYat the name provided and does nothing else.Classes decorated with this decorator are expected to be subclasses of
xettel.base.ZettelFile.ZettelFilebut no runtime typechecking is done.See also
One instance of use of this decorator is the class
xettel.impl.markdown.ZettelMD.ZettelMDwhich 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 ofpandocwhich allows for the use oftikz-cdfor 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_REGISTRYat the name provided and does nothing else.Classes decorated with this decorator are expected to be subclasses of
xettel.base.Zettelkasten.Zettelkastenbut 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.