trilium_alchemy.lib.system_types
¶
A common note structure is to create “system” notes which hold templates,
scripts, etc. This module facilitates maintenance of such a system, with a
BaseSystemNote
class to hold such notes.
The root system BaseRootSystemNote
additionally holds themes and a
built-in stylesheet which hides the “Create child note” button in the UI
for subclass-managed notes
(BaseDeclarativeNote.leaf
is False
).
If a note hierarchy is defined under a BaseRootNote
subclass,
a BaseRootSystemNote
is automatically added.
For a complete example of a note hierarchy using these classes, see
trilium-alchemy/examples/event-tracker
and its documentation at
Example: Event tracker.
Class index¶
Canonical
Defines a workspace root. |
|
Base class for a “system” note, a collection of various types of infrastructure notes. |
|
Base class for a root “system” note, additionally containing themes. |
|
Base class for a hierarchy root note. |
Symbols¶
- class trilium_alchemy.lib.system_types.BaseWorkspaceNote¶
Bases:
trilium_alchemy.core.declarative.base.BaseDeclarativeNote
Aliases:
trilium_alchemy.BaseWorkspaceNote
trilium_alchemy.lib.BaseWorkspaceNote
Defines a workspace root.
Adds
#workspace
labelAdds
BaseSystemNote
child note, if attributesystem
is set
Added by decorators:
#workspace
- singleton¶
True
- system: type[BaseSystemNote] | None¶
None
- class trilium_alchemy.lib.system_types.BaseSystemNote¶
Bases:
trilium_alchemy.core.declarative.base.BaseDeclarativeNote
Aliases:
trilium_alchemy.BaseSystemNote
trilium_alchemy.lib.BaseSystemNote
Base class for a “system” note, a collection of various types of infrastructure notes.
Attributes such as
BaseSystemNote.templates
from any base classes are appended.Added by decorators:
#archived
#iconClass=bx bx-bracket
- templates: list[type[BaseTemplateNote]] | None¶
None
List of
Template
subclasses.
- workspace_templates: list[type[BaseWorkspaceTemplateNote]] | None¶
None
List of
BaseWorkspaceTemplateNote
subclasses.
- stylesheets: list[type[BaseAppCssNote]] | None¶
None
List of
AppCss
subclasses.
- widgets: list[type[BaseWidgetNote]] | None¶
None
List of
Widget
subclasses.
- scripts: list[type[BaseFrontendScriptNote | BaseBackendScriptNote]] | None¶
None
List of
FrontendScript
orBackendScript
subclasses.
- class trilium_alchemy.lib.system_types.BaseRootSystemNote¶
Bases:
trilium_alchemy.lib.system_types.BaseSystemNote
Aliases:
trilium_alchemy.BaseRootSystemNote
trilium_alchemy.lib.BaseRootSystemNote
Base class for a root “system” note, additionally containing themes.
Added by decorators:
#archived
#iconClass=bx bx-bracket
- themes: list[type[BaseThemeNote]] | None¶
None
List of
Theme
subclasses
- templates: list[type[BaseTemplateNote]] | None¶
None
Inherited from:
trilium_alchemy.lib.system_types.BaseSystemNote
List of
Template
subclasses.
- workspace_templates: list[type[BaseWorkspaceTemplateNote]] | None¶
None
Inherited from:
trilium_alchemy.lib.system_types.BaseSystemNote
List of
BaseWorkspaceTemplateNote
subclasses.
- stylesheets: list[type[BaseAppCssNote]] | None¶
None
Inherited from:
trilium_alchemy.lib.system_types.BaseSystemNote
List of
AppCss
subclasses.
- widgets: list[type[BaseWidgetNote]] | None¶
None
Inherited from:
trilium_alchemy.lib.system_types.BaseSystemNote
List of
Widget
subclasses.
- scripts: list[type[BaseFrontendScriptNote | BaseBackendScriptNote]] | None¶
None
Inherited from:
trilium_alchemy.lib.system_types.BaseSystemNote
List of
FrontendScript
orBackendScript
subclasses.
- class trilium_alchemy.lib.system_types.BaseRootNote¶
Bases:
trilium_alchemy.core.declarative.base.BaseDeclarativeNote
Aliases:
trilium_alchemy.BaseRootNote
trilium_alchemy.lib.BaseRootNote
Base class for a hierarchy root note.
- title_¶
"root"
- system: type[BaseRootSystemNote] | None¶