From d07fa97a090f9f48c94cb02d0e35310d64decebb Mon Sep 17 00:00:00 2001 From: luginf Date: Sat, 2 May 2026 23:05:35 +0200 Subject: [PATCH 1/6] updating info.json for zettelkasten and snippets, to add more explanations --- snippets/info.json | 2 +- zettelkasten/info.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/snippets/info.json b/snippets/info.json index 334aed6..0ad97ab 100644 --- a/snippets/info.json +++ b/snippets/info.json @@ -6,7 +6,7 @@ "authors": ["@luginf"], "platforms": ["linux", "macos", "windows"], "minAppVersion": "26.4.11", - "description": "Insert and manage reusable text snippets with placeholders ($CURRENT_YEAR, $CURRENT_DATE, $UUID…) into notes.", + "description": "Insert and manage reusable text snippets.\n\nUsage\nYou can create templates of reusable text snippets with 'Manage Snippets'. Then add them to your notes with 'insert snippets'. \nYou can also use placeholders ($CURRENT_YEAR, $CURRENT_DATE, $UUID...) which will be replaced at insertion time.", "resources": [ "InsertSnippetDialog.qml", "ManageSnippetsDialog.qml", diff --git a/zettelkasten/info.json b/zettelkasten/info.json index 23078b3..0cddab9 100644 --- a/zettelkasten/info.json +++ b/zettelkasten/info.json @@ -6,6 +6,6 @@ "authors": ["@luginf"], "platforms": ["linux", "macos", "windows"], "minAppVersion": "26.4.11", - "description": "Zettelkasten support: generates configurable note IDs and inserts [[filename|ID]] wiki-links to notes detected by a configurable ECMAScript ID pattern.", + "description": "Generates configurable note IDs and inserts links supporting those IDs using the Zettelkasten method. \n\nUsage\nSelect 'Insert Zettelkasten ID' from the menu will create a unique ID into your file. You can configure the ID pattern to your liking in the script options, using an ECMAScript regeg. \nThen you can insert from an other document a link to the first one, using the 'insert Zettelkasten link' from the menu. You can select the correct link using a filter from filename or the ID, and it will create a [[filename|ID]] wiki-links to notes. The detection pattern has also to be configured into the plugin options, to match the ID generation (the default option will match the preconfigured ID pattern anyway).", "resources": ["ZkLinkDialog.qml"] } From 5c2e7f92f5f4da1c3b01e28dd343006fd86368d6 Mon Sep 17 00:00:00 2001 From: luginf Date: Sun, 3 May 2026 18:58:24 +0200 Subject: [PATCH 2/6] more precisions --- snippets/README.md | 12 ++++++++++++ snippets/info.json | 2 +- zettelkasten/README.md | 10 +++++++++- zettelkasten/info.json | 2 +- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/snippets/README.md b/snippets/README.md index 2512408..ed1b206 100644 --- a/snippets/README.md +++ b/snippets/README.md @@ -7,6 +7,18 @@ Insert reusable text snippets into your notes via a selection dialog. - **Scripting › Insert snippet** — choose a snippet from the list and insert it at the cursor - **Scripting › Manage snippets** — add, edit, or delete snippets +You can also link those actions to a custom shortcut. + + +## Actions + +One toolbar button is registered: + +| Button | Action | +| ----------- | ---------------------------------------------------------------------------- | +| **Snippet** | choose a snippet from the list and insert it at the cursor + + ## Placeholders Placeholders are replaced at insertion time. diff --git a/snippets/info.json b/snippets/info.json index 0ad97ab..12d69d9 100644 --- a/snippets/info.json +++ b/snippets/info.json @@ -6,7 +6,7 @@ "authors": ["@luginf"], "platforms": ["linux", "macos", "windows"], "minAppVersion": "26.4.11", - "description": "Insert and manage reusable text snippets.\n\nUsage\nYou can create templates of reusable text snippets with 'Manage Snippets'. Then add them to your notes with 'insert snippets'. \nYou can also use placeholders ($CURRENT_YEAR, $CURRENT_DATE, $UUID...) which will be replaced at insertion time.", + "description": "Insert and manage reusable text snippets.\n\nUsage\nYou can create templates of reusable text snippets from the custom actions menu 'Manage Snippets'. Then add them to your notes with 'insert snippets' from the same menu. \nYou can also use placeholders ($CURRENT_YEAR, $CURRENT_DATE, $UUID...) which will be replaced at insertion time.", "resources": [ "InsertSnippetDialog.qml", "ManageSnippetsDialog.qml", diff --git a/zettelkasten/README.md b/zettelkasten/README.md index e4b6260..06d9723 100644 --- a/zettelkasten/README.md +++ b/zettelkasten/README.md @@ -8,6 +8,14 @@ In the Zettelkasten method, each note carries a **permanent unique ID** embedded This script implements that principle inside QOwnNotes using the native `[[filename|id]]` wiki-link format. +## Usage + +- **Scripting › Insert Zettelkasten ID** — Insert a new unique ZK ID at the cursor position +- **Scripting › insert Zettelkasten link** — Open a searchable dialog to pick a note and insert a `[[filename\|id]]` link +- **Scripting › Repair Zettelkasten links** — can all notes and repair every link whose filename is out of date + +You can also link those actions to a custom shortcut. + ## Link format ``` @@ -19,7 +27,7 @@ This script implements that principle inside QOwnNotes using the native `[[filen ## Actions -Three toolbar buttons are registered: +Three toolbar buttons are registered, following the custom actions listed above: | Button | Action | | ----------- | ---------------------------------------------------------------------------- | diff --git a/zettelkasten/info.json b/zettelkasten/info.json index 0cddab9..0def01d 100644 --- a/zettelkasten/info.json +++ b/zettelkasten/info.json @@ -6,6 +6,6 @@ "authors": ["@luginf"], "platforms": ["linux", "macos", "windows"], "minAppVersion": "26.4.11", - "description": "Generates configurable note IDs and inserts links supporting those IDs using the Zettelkasten method. \n\nUsage\nSelect 'Insert Zettelkasten ID' from the menu will create a unique ID into your file. You can configure the ID pattern to your liking in the script options, using an ECMAScript regeg. \nThen you can insert from an other document a link to the first one, using the 'insert Zettelkasten link' from the menu. You can select the correct link using a filter from filename or the ID, and it will create a [[filename|ID]] wiki-links to notes. The detection pattern has also to be configured into the plugin options, to match the ID generation (the default option will match the preconfigured ID pattern anyway).", + "description": "Generates configurable note IDs and inserts links supporting those IDs using the Zettelkasten method. \n\nUsage\nSelect 'Insert Zettelkasten ID' from the custom actions menu will create a unique ID into your file. You can configure the ID pattern to your liking in the script options, using an ECMAScript regeg. \nThen you can insert from an other document a link to the first one, using the 'insert Zettelkasten link' from the custom actions menu. You can select the correct link using a filter from filename or the ID, and it will create a [[filename|ID]] wiki-links to notes. The detection pattern has also to be configured into the plugin options, to match the ID generation (the default option will match the preconfigured ID pattern anyway).\nIf you later rename your note, using from the custom actions menu 'Repair Zettelkasten links' will automatically search and rename every link whose filename is out of date, based on the correct ID.", "resources": ["ZkLinkDialog.qml"] } From 8f04fb138f92bc59c8ae93e5ce0be6a51eb389ed Mon Sep 17 00:00:00 2001 From: luginf Date: Sun, 3 May 2026 19:23:09 +0200 Subject: [PATCH 3/6] precision about wiki links. Fix subfolders link generation --- zettelkasten/README.md | 4 ++-- zettelkasten/zettelkasten.qml | 11 +++-------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/zettelkasten/README.md b/zettelkasten/README.md index 06d9723..f64feb6 100644 --- a/zettelkasten/README.md +++ b/zettelkasten/README.md @@ -6,7 +6,7 @@ A QOwnNotes script that adds [Zettelkasten](https://en.wikipedia.org/wiki/Zettel In the Zettelkasten method, each note carries a **permanent unique ID** embedded in its content or filename. Links between notes are based on this ID, not on the filename. This means a note can be renamed freely without breaking any link pointing to it. -This script implements that principle inside QOwnNotes using the native `[[filename|id]]` wiki-link format. +This script implements that principle inside QOwnNotes using the native `[[filename|id]]` wiki-link format. You will need to activate Settings>Interface>Editor>'Enable wiki-style link support [[note name]]'. ## Usage @@ -22,7 +22,7 @@ You can also link those actions to a custom shortcut. [[MyNote|20260430143012]] ``` -- The left part (`MyNote`) is what QOwnNotes uses to resolve the link (Ctrl+click to open). +- The left part (`MyNote`) is what QOwnNotes uses to resolve the link (Ctrl+click to open). Only the note name is used — subfolder paths are never included, because QOwnNotes resolves wiki-links by filename regardless of the folder the note is in. - The right part (`20260430143012`) is the permanent ZK ID, used by this script to repair links when the filename changes. ## Actions diff --git a/zettelkasten/zettelkasten.qml b/zettelkasten/zettelkasten.qml index 557671d..445776d 100644 --- a/zettelkasten/zettelkasten.qml +++ b/zettelkasten/zettelkasten.qml @@ -92,17 +92,12 @@ Script { } // Returns the link target string for [[target|id]] given a note object. + // QOwnNotes resolves wiki-links by filename only, regardless of subfolder, + // so we never include the relative directory path. function noteLinkTarget(note) { var name = note && note.name ? note.name : ""; - if (name) { - var relativeDir = note.relativeNoteFileDirPath || ""; - if (relativeDir) { - relativeDir = relativeDir.replace(/[\/\\]+$/, ""); - return relativeDir ? relativeDir + "/" + name : name; - } + if (name) return name; - } - return /\.txt$/i.test(note.fileName) ? note.fileName.slice(0, note.fileName.length - 4) : note.fileName; } From 7e33e6f6ba685b7c8637dd73144c30df2b309edd Mon Sep 17 00:00:00 2001 From: luginf Date: Sun, 3 May 2026 19:26:49 +0200 Subject: [PATCH 4/6] uniformise templates using zettelkasten id --- snippets/snippets.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/snippets/snippets.json b/snippets/snippets.json index 4a73afd..06036ac 100755 --- a/snippets/snippets.json +++ b/snippets/snippets.json @@ -1,10 +1,10 @@ [ { - "content": "## Reference\n\nid$CURRENT_YEAR$CURRENT_MONTH$CURRENT_DATEx$CURRENT_HOUR$CURRENT_MINUTE$CURRENT_SECOND\n\n\nSee also:\n- \n- \n\n#tag", - "name": "Reference" + "content": "## References \n\n$CURRENT_YEAR$CURRENT_MONTH$CURRENT_DATE$CURRENT_HOUR$CURRENT_MINUTE$CURRENT_SECOND\n\n\nSee also:\n- \n- \n\n#tag", + "name": "References" }, { - "content": "id$CURRENT_YEAR$CURRENT_MONTH$CURRENT_DATEx$CURRENT_HOUR$CURRENT_MINUTE$CURRENT_SECOND", + "content": "$ZK_ID\n\n", "name": "Zettelkasten_id" } ] From d58da1a15cee0306b2db1615fc87da27fedd01b5 Mon Sep 17 00:00:00 2001 From: luginf Date: Tue, 5 May 2026 08:11:04 +0200 Subject: [PATCH 5/6] increase version number --- snippets/info.json | 2 +- zettelkasten/info.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/snippets/info.json b/snippets/info.json index 12d69d9..3200522 100644 --- a/snippets/info.json +++ b/snippets/info.json @@ -1,7 +1,7 @@ { "name": "Text Snippets", "identifier": "snippets", - "version": "0.1.0", + "version": "0.1.1", "script": "snippets.qml", "authors": ["@luginf"], "platforms": ["linux", "macos", "windows"], diff --git a/zettelkasten/info.json b/zettelkasten/info.json index 0def01d..d0d2036 100644 --- a/zettelkasten/info.json +++ b/zettelkasten/info.json @@ -1,7 +1,7 @@ { "name": "Zettelkasten", "identifier": "zettelkasten", - "version": "0.2.0", + "version": "0.2.1", "script": "zettelkasten.qml", "authors": ["@luginf"], "platforms": ["linux", "macos", "windows"], From bd1e110e2bc35f026a996ae2e429b79fe43af124 Mon Sep 17 00:00:00 2001 From: luginf Date: Tue, 5 May 2026 08:17:41 +0200 Subject: [PATCH 6/6] ran prettier --- snippets/README.md | 8 +++----- zettelkasten/README.md | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/snippets/README.md b/snippets/README.md index ed1b206..900a972 100644 --- a/snippets/README.md +++ b/snippets/README.md @@ -9,15 +9,13 @@ Insert reusable text snippets into your notes via a selection dialog. You can also link those actions to a custom shortcut. - ## Actions One toolbar button is registered: -| Button | Action | -| ----------- | ---------------------------------------------------------------------------- | -| **Snippet** | choose a snippet from the list and insert it at the cursor - +| Button | Action | +| ----------- | ---------------------------------------------------------- | +| **Snippet** | choose a snippet from the list and insert it at the cursor | ## Placeholders diff --git a/zettelkasten/README.md b/zettelkasten/README.md index f64feb6..f81e647 100644 --- a/zettelkasten/README.md +++ b/zettelkasten/README.md @@ -10,7 +10,7 @@ This script implements that principle inside QOwnNotes using the native `[[filen ## Usage -- **Scripting › Insert Zettelkasten ID** — Insert a new unique ZK ID at the cursor position +- **Scripting › Insert Zettelkasten ID** — Insert a new unique ZK ID at the cursor position - **Scripting › insert Zettelkasten link** — Open a searchable dialog to pick a note and insert a `[[filename\|id]]` link - **Scripting › Repair Zettelkasten links** — can all notes and repair every link whose filename is out of date