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.BaseDeclarativeNoteAliases:
trilium_alchemy.BaseWorkspaceNote
trilium_alchemy.lib.BaseWorkspaceNoteDefines a workspace root.
Adds
#workspacelabelAdds
BaseSystemNotechild note, if attributesystemis 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.BaseDeclarativeNoteAliases:
trilium_alchemy.BaseSystemNote
trilium_alchemy.lib.BaseSystemNoteBase class for a “system” note, a collection of various types of infrastructure notes.
Attributes such as
BaseSystemNote.templatesfrom any base classes are appended.Added by decorators:
#archived#iconClass=bx bx-bracket
- templates: list[type[BaseTemplateNote]] | None¶
 NoneList of
Templatesubclasses.
- workspace_templates: list[type[BaseWorkspaceTemplateNote]] | None¶
 NoneList of
BaseWorkspaceTemplateNotesubclasses.
- stylesheets: list[type[BaseAppCssNote]] | None¶
 NoneList of
AppCsssubclasses.
- widgets: list[type[BaseWidgetNote]] | None¶
 NoneList of
Widgetsubclasses.
- scripts: list[type[BaseFrontendScriptNote | BaseBackendScriptNote]] | None¶
 NoneList of
FrontendScriptorBackendScriptsubclasses.
- class trilium_alchemy.lib.system_types.BaseRootSystemNote¶
 Bases:
trilium_alchemy.lib.system_types.BaseSystemNoteAliases:
trilium_alchemy.BaseRootSystemNote
trilium_alchemy.lib.BaseRootSystemNoteBase class for a root “system” note, additionally containing themes.
Added by decorators:
#archived#iconClass=bx bx-bracket
- themes: list[type[BaseThemeNote]] | None¶
 NoneList of
Themesubclasses
- templates: list[type[BaseTemplateNote]] | None¶
 NoneInherited from:
trilium_alchemy.lib.system_types.BaseSystemNoteList of
Templatesubclasses.
- workspace_templates: list[type[BaseWorkspaceTemplateNote]] | None¶
 NoneInherited from:
trilium_alchemy.lib.system_types.BaseSystemNoteList of
BaseWorkspaceTemplateNotesubclasses.
- stylesheets: list[type[BaseAppCssNote]] | None¶
 NoneInherited from:
trilium_alchemy.lib.system_types.BaseSystemNoteList of
AppCsssubclasses.
- widgets: list[type[BaseWidgetNote]] | None¶
 NoneInherited from:
trilium_alchemy.lib.system_types.BaseSystemNoteList of
Widgetsubclasses.
- scripts: list[type[BaseFrontendScriptNote | BaseBackendScriptNote]] | None¶
 NoneInherited from:
trilium_alchemy.lib.system_types.BaseSystemNoteList of
FrontendScriptorBackendScriptsubclasses.
- class trilium_alchemy.lib.system_types.BaseRootNote¶
 Bases:
trilium_alchemy.core.declarative.base.BaseDeclarativeNoteAliases:
trilium_alchemy.BaseRootNote
trilium_alchemy.lib.BaseRootNoteBase class for a hierarchy root note.
- title_¶
 "root"
- system: type[BaseRootSystemNote] | None¶