Skip to content

Commit ba39327

Browse files
authored
Test for MOC in script insert-moc (#277)
* Update insert-moc.qml Changed if (action != MOC) from indexpage as in an old version. * Update info.json Changed Version history to 26.1.8. Also added h2 headlines in the description and formatted the html explanation, so that it looks better in QOwnNotes. * Update info.json Changed Version to 0.0.2 from 0.0.1
1 parent d2455b9 commit ba39327

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

insert-moc/info.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"script": "insert-moc.qml",
55
"authors": ["@netlimpopo"],
66
"platforms": ["linux", "macos", "windows"],
7-
"version": "0.0.1",
8-
"minAppVersion": "25.12.7",
9-
"description": "This script generates a list of clickable links which map to every single <code>.md</code> note within the active note folder (= 'Map of contents (M.O.C.)'). It displays the links in a table format along with the <em>relative filepaths of the files</em>. Furthermore it sorts the links in alphabetical order. \n The difference to the 'Table of Contents' script lies in the fact, that the T.O.C script creates links to headings of the same document whereas this M.O.C. script creates references to every single notename in the active note folder.\n <strong>Usage</strong> \n. <ol> <li>Select the highest folder hierachy <strong>(!)</strong>.</li> <li>Create a new note with an arbitrary name in the highest note hierachy (note level).</li><li>Click the M.O.C button in the script menu. Then the script will overwrite all of the current note content and will insert the linkslist.</li> </ol> \n\n <strong>Warning</strong> \n Note that <strong>all of the content</strong> of the selcted note <strong>will be replaced</strong> by the table of contents link list. Therefore it is essential to create a new note and exclusively use this note for the M.O.C list.\n <strong>automatic updates</strong>\n In case you rename a note, the markdown links in the M.O.C will be automatically updated too, as QOwnNotes watches all markdownlinks and checks links for necessary updates. \n However, if <strong>one creates a new note anywhere, the script must be excecuted again</strong>, as it will otherwise not watch for file additions nor will it add a new link to the list.\n Also if you want to move the M.O.C file to a different location, all the links will be updated accordingly thanks to the QOwnNotes logic. \n An M.O.C. can act as a navitational site (especially when all files are exported as static .html pages) and provide an overview of all available notes. The idea is strongly influenced by the Obsidian plugin 'Waypoint' see <a href='https://github.com/IdreesInc/Waypoint'>Waypoint Obsidian</a>. "
7+
"version": "0.0.2",
8+
"minAppVersion": "26.1.8",
9+
"description": "<h2>Info</h2><p>This script generates a <strong>list of clickable links which map to every single <code>.md</code> note within the active note folder (= 'Map of contents (M.O.C.)')</strong>. It displays the links in a table format along with the <em>relative filepaths of the files</em>. Furthermore it sorts the links in alphabetical order. \n The difference to the 'Table of Contents' script lies in the fact, that the T.O.C script creates links to headings of the same document whereas this M.O.C. script creates references to every single notename in the active note folder.</p> <h2>Usage</h2> <ol> <li>Select the highest folder hierachy <strong>(!)</strong>.</li> <li>Create a new note with an arbitrary name in the highest note hierachy (note level).</li><li>Click the M.O.C button in the script menu. Then the script will overwrite all of the current note content and will insert the linkslist.</li> </ol> <h2>Warning</h2> <p> Note that <strong>all of the content</strong> of the selcted note <strong>will be replaced</strong> by the table of contents link list. Therefore it is essential to create a new note and exclusively use this note for the M.O.C list.\n <strong>automatic updates</strong>\n In case you rename a note, the markdown links in the M.O.C will be automatically updated too, as QOwnNotes watches all markdownlinks and checks links for necessary updates. \n However, if <strong>one creates a new note anywhere, the script must be excecuted again</strong>, as it will otherwise not watch for file additions nor will it add a new link to the list.\n Also if you want to move the M.O.C file to a different location, all the links will be updated accordingly thanks to the QOwnNotes logic. \n An M.O.C. can act as a navitational site (especially when all files are exported as static .html pages) and provide an overview of all available notes. The idea is strongly influenced by the Obsidian plugin 'Waypoint' see <a href='https://github.com/IdreesInc/Waypoint'>Waypoint Obsidian</a>.</p> "
1010
}

insert-moc/insert-moc.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Script {
88
}
99

1010
function customActionInvoked(action) {
11-
if (action !== "indexpage") {
11+
if (action !== "MOC") {
1212
return;
1313
}
1414

0 commit comments

Comments
 (0)