Trilium-alchemy

Latest version: v0.4.2

Safety actively analyzes 688126 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.0

- SDK is tentatively feature-complete
- CLI features being refined and planned
- Extension management
- Sync notes with templates (leverage `Note.sync_template()`)
- Export/import zip
- Create backup
- Health check (verify connection, version compatibility, etc)
- Stress testing
- Generate a given number of test notes with a given hierarchy depth, e.g. create 100k notes to test what Trilium is specified to handle

0.4.2

Declarative notes
New features
- Support passing a tuple of `(note_cls, prefix)` in `children` to additionally set branch prefix
- Preserve existing value of `Branch.expanded` by default so it can be maintained solely in UI

Fixes
- Fix leaf notes and add test coverage

0.4.0

New features
- `Note.sync_template()`: Synchronize this note with a template note, recursively adding and re-ordering child notes matched by title
- Useful for updating template instances when you modify a template
- Replicates any cloned notes within the template
- `Note.copy()`: Create a shallow or deep copy of this note
- Label/relation accessors: `Note.labels`, `Note.relations`
- Can each be filtered by owned vs inherited: `Note.labels.owned`, `Note.labels.inherited`, `Note.relations.owned`, `Note.relations.inherited`
- Uses list semantics with additional getters/setters like `Note.labels.get()`, `Note.labels.get_value()`, `Note.labels.get_values()` (see the documentation for all interfaces)
- Indexing into a note (e.g. `note["myLabel"]`) now supports single-valued labels only (not relations) to improve type strictness
- Support subclassing `Note` to add custom accessors, subclass `BaseDeclarativeNote` for notes as code

Breaking changes
- `Note.attributes` no longer settable; set owned attribute list by setting `Note.attributes.owned`
- This is more consistent with the semantics of `Note.attributes` as a list of all owned and inherited attributes
- `Note.attributes` no longer indexable by attribute name; use new getters/setters like `Note.labels.get_value()`, `Note.labels.set_value()`
- Restructured subpackages

Project direction
- Offline bidirectional Markdown conversion and sync mechanism is deprioritized for the foreseeable future
- There are a number of design/implementation and practical challenges:
- Violates "single source of truth" principle
- Inherently lossy conversion from Trilium HTML format to Markdown, and challenges achieving feature parity in Markdown (e.g. links to other notes)
- Instead, possible custom export/import interface and command-line hook
- E.g.: `trilium-alchemy export --exporter my_pkg.my_exporter path/to/destination`

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.