From b6f33bcddf95512ea25d27cb75244f5181f174fb Mon Sep 17 00:00:00 2001 From: Mel Date: Sun, 24 Oct 2021 21:00:18 +0100 Subject: [PATCH] note creation v0.0.2 --- .obsidian/workspace | 22 +++++++++---------- .../Templater scripts/templaterFunc.js | 9 ++++---- 00.01 Admin/Templates/@Master Note.md | 1 + 00.01 Admin/Templates/@Task Master.md | 1 + 00.01 Admin/Templates/NewFile.md | 2 +- 00.01 Admin/Templates/NewFile1.md | 4 ++++ 00.01 Admin/Test sheet.md | 22 +++++++++++-------- 01.01 Life Orga/@Life Organisation.md | 3 +++ 01.02 Home/MRCK.md | 10 +++++++++ 01.03 Family/@Family organisation.md | 3 +++ 02.01 London/@@London.md | 5 +++++ 02.02 Paris/@@Paris.md | 5 +++++ 03.01 Reading list/@Reading master.md | 4 ++++ 03.02 Travels/@Travels.md | 6 +++++ 03.03 Recipes/@@Recipes.md | 3 +++ 04.01 lebv.org/@lebv.org Tasks.md | 2 ++ 04.01 lebv.org/@lebv.org.md | 3 +++ 05.01 Computer setup/@Computer Set Up.md | 5 +++++ 05.02 Networks/@Networks.md | 6 +++++ 06.02 Investments/@Investment Task master.md | 2 ++ 06.02 Investments/@Investment master.md | 3 +++ 21 files changed, 96 insertions(+), 25 deletions(-) create mode 100644 00.01 Admin/Templates/NewFile1.md diff --git a/.obsidian/workspace b/.obsidian/workspace index 02193df5..ad09bed0 100644 --- a/.obsidian/workspace +++ b/.obsidian/workspace @@ -9,8 +9,8 @@ "state": { "type": "markdown", "state": { - "file": "06.02 Investments/@Investment Task master.md", - "mode": "preview" + "file": "00.01 Admin/Templates/NewFile1.md", + "mode": "source" } } } @@ -76,7 +76,7 @@ "state": { "type": "backlink", "state": { - "file": "06.02 Investments/@Investment Task master.md", + "file": "00.01 Admin/Templates/NewFile1.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -115,15 +115,15 @@ }, "active": "c1cbd199334b4022", "lastOpenFiles": [ + "00.01 Admin/Templates/NewFile1.md", + "01.01 Life Orga/@Life Organisation.md", + "01.02 Home/MRCK.md", + "02.01 London/@@London.md", + "02.02 Paris/@@Paris.md", + "03.02 Travels/@Travels.md", + "03.01 Reading list/@Reading master.md", "06.02 Investments/@Investment Task master.md", "06.02 Investments/@Investment master.md", - "05.02 Networks/@Networks.md", - "05.01 Computer setup/Apple processes.md", - "05.01 Computer setup/@Computer Set Up.md", - "04.01 lebv.org/@lebv.org.md", - "04.01 lebv.org/@lebv.org Tasks.md", - "03.03 Recipes/@@Recipes.md", - "03.03 Recipes/Simple Pasta.md", - "03.02 Travels/@Travels.md" + "05.02 Networks/@Networks.md" ] } \ No newline at end of file diff --git a/00.01 Admin/Templater scripts/templaterFunc.js b/00.01 Admin/Templater scripts/templaterFunc.js index e30e8fcc..7542a60a 100644 --- a/00.01 Admin/Templater scripts/templaterFunc.js +++ b/00.01 Admin/Templater scripts/templaterFunc.js @@ -1,11 +1,12 @@ class templaterFunc { createNewFile(tp) { - const fileName = await tp.system.prompt("File name") - const templateName = await tp.system.prompt("Template name") tp.file.create_new(tp.file.find_tfile("Template " + templateName), fileName, true, tp.file.folder()) + const fileName = this.getUserInput(tp, "File name") + const templateName = this.getUserInput(tp, "File name") + return tp.file.create_new(tp.file.find_tfile("Template ") + templateName, filename, true, tp.file.folder()) } - getFileName(tp, prompt) { - const tempresult = await tp.system.prompt(prompt) + getUserInput(tp, promptScript) { + const tempresult = await tp.system.prompt(promptScript) return tempresult } } \ No newline at end of file diff --git a/00.01 Admin/Templates/@Master Note.md b/00.01 Admin/Templates/@Master Note.md index 4af9f192..a1bfa3f0 100644 --- a/00.01 Admin/Templates/@Master Note.md +++ b/00.01 Admin/Templates/@Master Note.md @@ -4,6 +4,7 @@ Alias: [""] Tag: [""] Date: <% tp.date.now("YYYY-MM-DD") %> DocType: +ChildrenType: Hierarchy: "Root" location: CollapseMetaTable: Yes diff --git a/00.01 Admin/Templates/@Task Master.md b/00.01 Admin/Templates/@Task Master.md index d1682c47..e4033cf4 100644 --- a/00.01 Admin/Templates/@Task Master.md +++ b/00.01 Admin/Templates/@Task Master.md @@ -4,6 +4,7 @@ Alias: [""] Tag: [""] Date: <% tp.date.now("YYYY-MM-DD") %> DocType: +ChildrenType: "Task" Hierarchy: "Root" TimeStamp: location: diff --git a/00.01 Admin/Templates/NewFile.md b/00.01 Admin/Templates/NewFile.md index 754845d5..d6da84b7 100644 --- a/00.01 Admin/Templates/NewFile.md +++ b/00.01 Admin/Templates/NewFile.md @@ -1,5 +1,5 @@ <%* const fileName = await tp.system.prompt("File name") -const templateName = await tp.system.prompt("Template name") +const templateName = await tp.system.suggester(tp.frontmatter.ChildrenType, tp.frontmatter.ChildrenType) tp.file.create_new(tp.file.find_tfile("Template " + templateName), fileName, tp.file.folder()) %> \ No newline at end of file diff --git a/00.01 Admin/Templates/NewFile1.md b/00.01 Admin/Templates/NewFile1.md new file mode 100644 index 00000000..2df3295d --- /dev/null +++ b/00.01 Admin/Templates/NewFile1.md @@ -0,0 +1,4 @@ +<%* +const {templaterFunc} = tp.obsidian.plugins.plugins.CustomJS +templaterFunc.createNewFile(tp) +%> \ No newline at end of file diff --git a/00.01 Admin/Test sheet.md b/00.01 Admin/Test sheet.md index 9f3f4b07..38e512c8 100644 --- a/00.01 Admin/Test sheet.md +++ b/00.01 Admin/Test sheet.md @@ -1,25 +1,25 @@ +--- + +ChildrenType: ["Note", "Task", "Recipe"] + +--- + [Forum](https://forum.obsidian.md)     -```button -name Create Note -type append template -action NewFile -color blue -templater true -``` ```button name Create Note type append template -action NewFile1 +action NewFile2 color blue templater true ``` -const {templaterFunc} = customJS + +const {templaterFunc} = tp.obsidian.plugins.plugins.CustomJS templaterFunc.createNewFile(tp) %> @@ -27,6 +27,10 @@ const {templaterFunc} = customJS templaterFunc.createNewFile(tp) %> +const {templaterFunc} = app.plugins.plugins.CustomJS +templaterFunc.createNewFile(tp) +%> + const {templaterFunc} = customJS templaterFunc.createNewFile(tp) %> diff --git a/01.01 Life Orga/@Life Organisation.md b/01.01 Life Orga/@Life Organisation.md index 5c6f5813..87941ba8 100644 --- a/01.01 Life Orga/@Life Organisation.md +++ b/01.01 Life Orga/@Life Organisation.md @@ -4,6 +4,9 @@ Alias: ["Life Orga", "Life Hacks"] Tag: ["Admin", "Life","Goals"] Date: 2021-08-12 DocType: "Personal" +ChildrenType: + - Task + - Note Hierarchy: "Root" TimeStamp: 2021-08-12 location: [51.514678599999996, -0.18378583926867909] diff --git a/01.02 Home/MRCK.md b/01.02 Home/MRCK.md index 90f08c83..7dd7c2d2 100644 --- a/01.02 Home/MRCK.md +++ b/01.02 Home/MRCK.md @@ -96,6 +96,16 @@ Paris, Zürich, London   +#### Misc + +  + +  + +--- + +  + ### Cadeaux   diff --git a/01.03 Family/@Family organisation.md b/01.03 Family/@Family organisation.md index cd2f5892..083d70cb 100644 --- a/01.03 Family/@Family organisation.md +++ b/01.03 Family/@Family organisation.md @@ -4,6 +4,9 @@ Alias: ["Family organisation"] Tag: ["Personal", "Family"] Date: 2021-10-01 DocType: "Family" +ChildrenType: + - Note + - Task Hierarchy: "Root" CollapseMetaTable: Yes diff --git a/02.01 London/@@London.md b/02.01 London/@@London.md index 75c23010..1675e202 100644 --- a/02.01 London/@@London.md +++ b/02.01 London/@@London.md @@ -12,6 +12,11 @@ Alias: ["London"] Tag: ["Personal", "Life"] Date: 2021-10-04 DocType: "Personal" +ChildrenType: + - Place + - Note + - Task + - Product Hierarchy: "Root" CollapseMetaTable: Yes diff --git a/02.02 Paris/@@Paris.md b/02.02 Paris/@@Paris.md index 3dd2166a..20c5dda2 100644 --- a/02.02 Paris/@@Paris.md +++ b/02.02 Paris/@@Paris.md @@ -12,6 +12,11 @@ Alias: ["Paris"] Tag: ["Personal", "Life"] Date: 2021-10-04 DocType: "Personal" +ChildrenType: + - Place + - Note + - Task + - Product Hierarchy: "Root" CollapseMetaTable: Yes diff --git a/03.01 Reading list/@Reading master.md b/03.01 Reading list/@Reading master.md index 65232253..eba64e5a 100644 --- a/03.01 Reading list/@Reading master.md +++ b/03.01 Reading list/@Reading master.md @@ -11,6 +11,10 @@ Alias: ["Reading", "Reading list"] Tag: ["Lifestyle", "LifeHacks", "Book"] Date: 2021-09-25 DocType: "Personal" +ChildrenType: + - Source + - Note + - Task Hierarchy: "Root" location: [51.514678599999996, -0.18378583926867909] CollapseMetaTable: Yes diff --git a/03.02 Travels/@Travels.md b/03.02 Travels/@Travels.md index d7794ebf..20fde3d3 100644 --- a/03.02 Travels/@Travels.md +++ b/03.02 Travels/@Travels.md @@ -5,6 +5,12 @@ Alias: ["Travels"] Tag: ["Lifehacks", "Travel"] Date: 2021-09-21 DocType: "Personal" +ChildrenType: + - Task + - Travel + - Note + - Place + - Product Hierarchy: "Root" location: [51.514678599999996, -0.18378583926867909] CollapseMetaTable: Yes diff --git a/03.03 Recipes/@@Recipes.md b/03.03 Recipes/@@Recipes.md index 08f9111c..ee1200c7 100644 --- a/03.03 Recipes/@@Recipes.md +++ b/03.03 Recipes/@@Recipes.md @@ -13,6 +13,9 @@ Alias: ["Recipes"] Tag: ["Lifestyle", "Food", "Cooking"] Date: 2021-10-20 DocType: "Personal" +ChildrenType: + - Task + - Recipe Hierarchy: "Root" location: [51.514678599999996, -0.18378583926867909] CollapseMetaTable: Yes diff --git a/04.01 lebv.org/@lebv.org Tasks.md b/04.01 lebv.org/@lebv.org Tasks.md index b0091e75..e350830d 100644 --- a/04.01 lebv.org/@lebv.org Tasks.md +++ b/04.01 lebv.org/@lebv.org Tasks.md @@ -4,6 +4,8 @@ Alias: ["lebv.org Tasks"] Tag: ["Family", "Web", "lebv", "Archive", "Email", "Website"] Date: 2021-08-12 DocType: "Project" +ChildrenType: + - Task Hierarchy: "Root" TimeStamp: location: [51.514678599999996, -0.18378583926867909] diff --git a/04.01 lebv.org/@lebv.org.md b/04.01 lebv.org/@lebv.org.md index 4f58aa62..fb6bfd00 100644 --- a/04.01 lebv.org/@lebv.org.md +++ b/04.01 lebv.org/@lebv.org.md @@ -4,6 +4,9 @@ cssclass: recipeTable Tag: ["Web", "Family", "lebv", "Email", "Archive", "Website"] Date: 2021-08-12 DocType: "Project" +ChildrenType: + - Note + - Source Hierarchy: "Root" location: [51.514678599999996, -0.18378583926867909] CollapseMetaTable: Yes diff --git a/05.01 Computer setup/@Computer Set Up.md b/05.01 Computer setup/@Computer Set Up.md index 641bee08..2a4e3c24 100644 --- a/05.01 Computer setup/@Computer Set Up.md +++ b/05.01 Computer setup/@Computer Set Up.md @@ -5,6 +5,11 @@ Alias: ["ComputerSetup", "Computer Setup"] Tag: ["Admin", "Computer", "App", "Cloud"] Date: 2021-08-10 DocType: "Personal" +ChildrenType: + - Note + - Source + - Product + - Task Hierarchy: "Root" CollapseMetaTable: Yes diff --git a/05.02 Networks/@Networks.md b/05.02 Networks/@Networks.md index 4348e225..448d8fb7 100644 --- a/05.02 Networks/@Networks.md +++ b/05.02 Networks/@Networks.md @@ -4,6 +4,12 @@ cssclass: recipeTable Tag: ["Computer", "Networks", "Web", "App"] Date: 2021-08-28 DocType: "Personal" +ChildrenType: + - Server + - Task + - Note + - Source + - Product Hierarchy: "Root" location: [48.8570517, 2.3677354] CollapseMetaTable: Yes diff --git a/06.02 Investments/@Investment Task master.md b/06.02 Investments/@Investment Task master.md index af573877..3055e36a 100644 --- a/06.02 Investments/@Investment Task master.md +++ b/06.02 Investments/@Investment Task master.md @@ -4,6 +4,8 @@ Alias: ["Investment Task", "Investment Task master"] Tag: ["Wealth", "Investment", "Equity", "Crypto", "Equity", "VC"] Date: 2021-08-17 DocType: "Confidential" +ChildrenType: + - Task Hierarchy: "Root" TimeStamp: location: [51.514678599999996,-0.18378583926867909] diff --git a/06.02 Investments/@Investment master.md b/06.02 Investments/@Investment master.md index fb1c25c4..ac3ad8c5 100644 --- a/06.02 Investments/@Investment master.md +++ b/06.02 Investments/@Investment master.md @@ -14,6 +14,9 @@ Alias: ["Investment Master"] Tag: ["Wealth", "Investment", "Equity", "VC", "Crypto"] Date: 2021-08-17 DocType: "Confidential" +ChildrenType: + - Investment + - Note Hierarchy: "Root" location: [51.514678599999996,-0.18378583926867909] CollapseMetaTable: Yes