fix but uid instead of struid
remove timestamps and expose more directories via _get_config
add sorting and limiting the cardinality of the subset queried
Propositions for a better name are welcome.
Xettel (for Xapian Zettel) is an attempt at creating a Zettelkasten using Xapian as the backend for searching and indexing. It is heavily inspired by notmuch. One of the main goals of Xettel is to be agnostic regarding the format you may wish to store your Zettelkasten. My own implementation, once redered, looks like below.
Using graphviz
, xettel
is able to produce a map of the Zettelkasten.
Usage: xettel [OPTIONS] COMMAND [ARGS]...
Options:
-c, --config TEXT config file
-d, --dir TEXT Zettelkasten directory
--help Show this message and exit.
Commands:
count count zettels matching query
edit Edit zettel matching query.
export export the Zettelkasten to html
genmap generate a map of the zettelkasten
health check the health of the zettelkasten
new Create a new zettel
search search in the database
updatedb update the db from the zettelkasten folder
The code is organised in such a fashion that the user may overload the default
settings by defining new classes in the subfolder impl
of the xettel
config
directory. All python files located within this folder are imported at launch.
Classes defining Zettels must inherit from (a subclass of) ZettelAbstract
or
ZettelFile
and they must be registered using the @register_Z(name)
decorator
in order to be acknowledged by xettel
. Likewise, classes defining Zettelkasten
must inherit from (a subclass of) ZettelkastenAbstract
or Zettelkasten
and
be registered using the @register_ZK(name)
decorator. Names must match if they
are to be used together. The classes used may then be specified in the config
file. See the files in the doc
subfolder for examples. The default config path
is ~/.config/xettel
.
xettel.base.ZAbstract
In this module are defined abstractions for Zettels and Zettelkästen to build upon.
The class ZettelkastenAbstract
defines a mutable mapping that is used to store
Zettels and provides additional methods to construct the graph properties as
Zettels get added to the Zettelkasten
The class ZettelAbstract
provides an abstract class for Zettels. All classes
defining Zettels must inherit from this class. It defines the basic behaviour
expected from a Zettel.
xettel.base.Zettelkasten
The class Zettelkasten
provides an abstraction for a Zettelkasten stored in a
folder. It may be used as is as it can store the subclass of ZettelFile
that
may be used for Zettels in the folder.
xettel.base.ZettelFile
The class ZettelFile
provides an abstraction for Zettels that are stored as
files. Concrete Zettel classes should inherit from this class as it provides
expected way to store them with Xapian.
xapian
Means to access the xapian
database are define in the zxapian
module.
Commands are defined in the commands.py
file and the xettel.ui
subpackage.