mirror of
https://github.com/ricolandia/TriliumNext-Toolkit.git
synced 2026-05-17 10:55:40 -04:00
add Knowledge Debt Dashboard plugin
This commit is contained in:
parent
e7a4921321
commit
2d1c7fe347
4 changed files with 68 additions and 1 deletions
BIN
Knowledge-Debt-Dashboard/Knowledge debt.zip
Normal file
BIN
Knowledge-Debt-Dashboard/Knowledge debt.zip
Normal file
Binary file not shown.
65
Knowledge-Debt-Dashboard/README.md
Normal file
65
Knowledge-Debt-Dashboard/README.md
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
# 🩺 Knowledge Debt — TriliumNext Plugin
|
||||||
|
|
||||||
|
A **Render Note** dashboard that audits the health of your knowledge base, surfacing notes that have been forgotten, never developed, or left structurally isolated.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## What it detects
|
||||||
|
|
||||||
|
| Category | Criteria |
|
||||||
|
|---|---|
|
||||||
|
| 🔴 **Orphans** | No other note links to them (no backlinks) |
|
||||||
|
| 🟠 **Stubs** | Text content between 1–250 characters, no children |
|
||||||
|
| 🟣 **Empty** | Null or blank content, no children (containers excluded) |
|
||||||
|
| 🔵 **Old TODOs** | Has a `#todo`-style label, unmodified for > 30 days |
|
||||||
|
| 🟢 **Abandoned** | No children, unmodified for > 90 days |
|
||||||
|
|
||||||
|
Collection notes and any note acting as a container (i.e. notes with children) are automatically excluded from **Stubs** and **Empty** to avoid false positives.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
1. Create a new **JS Frontend** note and paste the contents of `knowledge-debt.js`
|
||||||
|
2. Create a second note (any type) — this will be your dashboard page
|
||||||
|
3. On the dashboard note, add the relation attribute:
|
||||||
|
```
|
||||||
|
~renderNote = <your JS note>
|
||||||
|
```
|
||||||
|
4. Open the dashboard note and click **▶ Escanear**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Compatibility
|
||||||
|
|
||||||
|
Tested on **TriliumNext** (post-Trilium fork). The plugin auto-detects the internal links table name across different versions (`note_links`, `links`, etc.) and falls back gracefully to relation attributes if no links table is found. All available tables are logged after each scan for debugging.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Thresholds
|
||||||
|
|
||||||
|
All thresholds are defined directly in the SQL queries and easy to adjust:
|
||||||
|
|
||||||
|
```js
|
||||||
|
// Stubs: notes shorter than this (in raw HTML characters) are flagged
|
||||||
|
LENGTH(b.content) BETWEEN 1 AND 250
|
||||||
|
|
||||||
|
// Old TODOs: flagged after this many days without modification
|
||||||
|
julianday('now') - julianday(n.dateModified) > 30
|
||||||
|
|
||||||
|
// Abandoned: flagged after this many days without modification
|
||||||
|
julianday('now') - julianday(n.dateModified) > 90
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Credits
|
||||||
|
|
||||||
|
Inspired by the `attribute-gc` plugin pattern. Built as a companion tool for PKM maintenance workflows in TriliumNext.
|
||||||
|
|
||||||
|
Licensed under MIT.
|
||||||
|
|
||||||
|
|
||||||
|
### Screenshot
|
||||||
|
|
||||||
|

|
||||||
BIN
Knowledge-Debt-Dashboard/imagens/pkm-dbt-1-.webp
Normal file
BIN
Knowledge-Debt-Dashboard/imagens/pkm-dbt-1-.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 39 KiB |
|
|
@ -35,7 +35,9 @@ This repository serves as a centralized hub for all these projects.
|
||||||
|
|
||||||
|
|
||||||
### Maintenance Tools
|
### Maintenance Tools
|
||||||
* **[Attribute-Garbage-Collector](./Attribute-Garbage-Collector )** - A TriliumNext garbage collector that finds broken, unused, or duplicate attributes, letting you safely preview and delete them individually or in bulk.
|
* **[Attribute-Garbage-Collector](./Attribute-Garbage-Collector)** - A TriliumNext garbage collector that finds broken, unused, or duplicate attributes, letting you safely preview and delete them individually or in bulk.
|
||||||
|
|
||||||
|
* **[Knowledge-Debt-Dashboard](./Knowledge-Debt-Dashboard)** - A full-page Render Note dashboard that audits your knowledge base for orphan notes, stubs, empty notes, old TODOs, and abandoned notes.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue