main
Mel 3 years ago
parent fd7225123b
commit 957c3f85dd

@ -16,7 +16,10 @@
"properties": [ "properties": [
"Tag", "Tag",
"Alias", "Alias",
"Location" "Location",
"Groceries",
"Health",
"Household"
] ]
}, },
"KanbanHelper": { "KanbanHelper": {

@ -43,9 +43,9 @@ div[data-path="03.02 Travels"] .nav-folder-title-content::before
content: "✈️ "; content: "✈️ ";
} }
div[data-path="03.03 Recipes"] .nav-folder-title-content::before div[data-path="03.03 Food & Wine"] .nav-folder-title-content::before
{ {
content: "🧑‍🍳 "; content: "🧑‍🍳🍷 ";
} }
div[data-path="04.01 lebv.org"] .nav-folder-title-content::before div[data-path="04.01 lebv.org"] .nav-folder-title-content::before

@ -7,8 +7,11 @@
"id": "c1cbd199334b4022", "id": "c1cbd199334b4022",
"type": "leaf", "type": "leaf",
"state": { "state": {
"type": "empty", "type": "markdown",
"state": {} "state": {
"file": "01.01 Life Orga/IT & Computer.md",
"mode": "preview"
}
} }
} }
], ],
@ -65,13 +68,14 @@
"state": { "state": {
"type": "backlink", "type": "backlink",
"state": { "state": {
"file": "01.01 Life Orga/IT & Computer.md",
"collapseAll": false, "collapseAll": false,
"extraContext": false, "extraContext": false,
"sortOrder": "alphabetical", "sortOrder": "alphabetical",
"showSearch": false, "showSearch": false,
"searchQuery": "", "searchQuery": "",
"backlinkCollapsed": false, "backlinkCollapsed": true,
"unlinkedCollapsed": false "unlinkedCollapsed": true
} }
} }
}, },
@ -103,15 +107,15 @@
}, },
"active": "c1cbd199334b4022", "active": "c1cbd199334b4022",
"lastOpenFiles": [ "lastOpenFiles": [
"03.02 Travels/Turkey.md", "01.01 Life Orga/IT & Computer.md",
"05.02 Networks/VPS Console Dialogue.md", "01.01 Life Orga/Untitled.md",
"05.02 Networks/Server VPN.md", "01.01 Life Orga/@Life Organisation.md",
"05.02 Networks/Server Tools.md", "06.01 Finances/hLedger.md",
"05.02 Networks/Server Cloud.md", "01.01 Life Orga/Family.md",
"05.02 Networks/Server Alias.md", "01.01 Life Orga/Personal projects.md",
"05.02 Networks/Selfhosting.md", "01.01 Life Orga/Lifestyle.md",
"05.02 Networks/Configuring UFW.md", "01.01 Life Orga/Finances.md",
"05.02 Networks/Configuring Postfix.md", "00.01 Admin/Button gallery.md",
"05.02 Networks/Configuring Monit.md" "02.01 London/202.md"
] ]
} }

@ -1,5 +1,5 @@
<%* <%*
const {templaterFunc} = this.app.plugins.plugins["CustomJS"].customJS const {templaterFunc} = this.app.plugins.plugins["customjs"].api
templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType) templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
tp.file.content.replace(/[\w\W]+?\n+?/,"") tp.file.content.replace(/[\w\W]+?\n+?/,"")
%> %>

@ -0,0 +1,21 @@
<%*
const listName = await tp.system.suggester(["Groceries", "Health", "Household"], ["Groceries", "Health", "Household"])
let tempResult = "";
let num = 0;
const {update} = this.app.plugins.plugins["metaedit"].api;
const {getPropertyValue} = this.app.plugins.plugins["metaedit"].api;
let itemList = await getPropertyValue(listName, tp.file.find_tfile("@Shopping list"))
for (let i = 0; i < itemList.length; i++) {
let amount = itemList[i].split(" ")[0] + " " + num.toString();
let radicale = itemList[i].replace(itemList[i].split(" ")[0] + " " + itemList[i].split(" ")[1], "");
if (!i) {
tempResult = amount + radicale
} else
tempResult = tempResult + ", " + amount + radicale
}
}
await update(listName, tempResult, tp.file.find_tfile("@Shopping list"));
%>

@ -9,6 +9,10 @@ ChildrenType: ["Note", "Task", "Recipe"]
&emsp; &emsp;
&emsp; &emsp;
```dataviewjs
const {shoppingFunc} = customJS
shoppingFunc.getItems2Change({app: app, dv: dv, luxon: luxon, that:this, theme: "to0"})
```
```button ```button
name Create Note name Create Note
@ -18,6 +22,11 @@ color blue
templater true templater true
``` ```
const {templaterFunc} = this.app.plugins.plugins["customjs"].api
templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
tp.file.content.replace(/[\w\W]+?\n+?/,"")
%>
const {templaterFunc} = this.app.plugins.plugins["CustomJS"].customJS const {templaterFunc} = this.app.plugins.plugins["CustomJS"].customJS
templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType) templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
tp.file.content.replace(/[\w\W]+?\n+?/,"") tp.file.content.replace(/[\w\W]+?\n+?/,"")
@ -89,4 +98,25 @@ tR += templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
const {templaterFunc} = tp.obsidian.plugins.plugins.CustomJS const {templaterFunc} = tp.obsidian.plugins.plugins.CustomJS
tR += templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType) tR += templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
%> %>
CollapseMetaTable: yes
Groceries: ["🍶 6 bottle(s) Coke 0", "🍿 1 whole Snacks", "🧈 packet(s) Beurre", "🫒 0 bottle(s) Olive oil", "🍺 0 bottle(s) Beers", "🥯 0 packet(s) Bagels", "🍯 1 jar(s) Bonne Maman", "🍌 6 whole Bananas", "🧀 0 packet(s) Fromage rape", "🥩 2 packet(s) Cured meat", "🍐 6 whole Fruit", "🍝 2 packet(s) Pasta", "🌶️ 1 bottle(s) Tabasco"]
Health:
- 🚿 1 whole shower gel
- 🧴 1 whole shampoo
- 🪥 whole toothbrush
- 🦷 1 whole toothpaste
- 👂 whole earbuds
- 🪒 1 whole razor blades (mach3)
- 🍦 whole shaving cream
- 🧻 6 whole loo rolls
- 🦨 whole deo
Household:
- 👔 1 whole Washing gel
- 🧻 4 whole Kitchen towel
- 🧽 whole Sponge
- 👕 2 whole Softener
- 🍽️ whole Dishwasher tablets
- 🧂 1 whole Dishwasher salt
- 🚰 0 whole Dishwasher rinsing aid

@ -1,64 +1,91 @@
class shoppingFunc { class shoppingFunc {
getNewItems(args) { processItems(itemArr, itemLabel) {
const {
dv, let tempAr = this.BuildList(this.updateShopIt(itemArr, itemLabel), ",");
catItem
} = args; return "[" + tempAr + "]"
return 0
} }
getItems2Change(args) {
updateShopIt(itemArr, itemLabel) {
let tempAr = itemArr;
let num = 0;
for (let i = 0; i < tempAr.length; i++) {
let amount = tempAr[i].split(" ")[0] + " ";
let radicale = tempAr[i].replace(tempAr[i].split(" ")[0] + " " + tempAr[i].split(" ")[1], "");
switch(itemLabel) {
case !Boolean(itemLabel):
amount = amount + num.toString()
break;
default:
if (radicale.contains(itemLabel)) {
amount = amount + (parseFloat(tempAr[i].split(" ")[1]) + 1).toString()
}
break;
}
tempAr[i] = "\"" + amount + radicale + "\""
}
return tempAr
}
BuildList(arg1, construct) {
let TempS = ""
for (let i = 0; i < arg1.length; i++) {
if (Boolean(arg1[i])) {
if (TempS == "") {
TempS = arg1[i]
} else {
TempS = TempS + construct + arg1[i]
}
}
}
return TempS
}
resetList(args) {
const { const {
that, that,
app, app,
dv, dv,
luxon,
theme, theme,
listOfIt,
} = args; } = args;
const { metaedit, buttons } = app.plugins.plugins const { update } = app.plugins.plugins["metaedit"].api
const { update } = metaedit.api const { createButton } = app.plugins.plugins["buttons"]
const { createButton } = buttons
const btnStr = this.getBtnName(theme) const updateSct = listOfIt //this.getSctName(theme) //await dv.suggester(["groceries", "health", "household"], ["groceries", "health", "household"]); //"Groceries" //
const updateSct = "Groceries"// await app.obsidian.system.suggester(["groceries", "health", "household"], ["groceries", "health", "household"]); //"Groceries" const btnStr = this.getBtnName(theme, updateSct)
const updateStr = this.getPoint(dv, updateSct) const itemAr = this.getPoint(dv.page("01.02 Home/@Shopping list.md"), updateSct);
const updateStr = this.processItems(itemAr, false);
return dv.el('p', return dv.el('p',
createButton({ createButton({
app, app,
el: that.container, el: that.container,
args: { name: btnStr, color: 'blue' }, args: { name: btnStr, color: 'blue' },
clickOverride: { click: update, params: [updateSct, updateStr, dv.current().file.path]} clickOverride: { click: update, params: [updateSct, updateStr, dv.page("01.02 Home/@Shopping list.md").file.path]}
}), }),
) )
} }
getBtnStrings(dv, oprType) {
let categItems = ["groceries", "health", "household"];
let tempRes1 = "Test" //await app.system.suggester(catItems, catItems);
let tempRes2 = "Test"
switch(oprType) {
case 'to0':
tempRes2 = "Test"
break;
case 'add':
// const listItems = this.getNewItems(dv, catItem: updateSct);
tempRes2 = "Test" ////await dv.system.suggester(listItems, listItems);
break;
}
return tempRes2
}
getBtnName(arg1) {
getBtnName(arg1, arg2) {
let tempresult = "Test"; let tempresult = "Test";
switch(arg1) { switch(arg1) {
case 'to0': case 'to0':
tempresult = "Reset shopping list" tempresult = "Reset " + arg2 + " list"
break; break;
case 'add': case 'add':
tempresult = "Add an item" tempresult = "Add a " + arg2 + " item"
break; break;
} }
return tempresult return tempresult

@ -4,7 +4,7 @@ let ing = [];
let j = 0; let j = 0;
if (!Boolean(items)) { if (!Boolean(items)) {
return "⚠️ <b>Warning</b>\nYou have not specified ahoppong items!\n<b>The shopping list cannot be printed.</b>" return "⚠️ <b>Warning</b>\nYou have not specified shopping items!\n<b>The shopping list cannot be printed.</b>"
} }
for (let i = 0; i < items.length; i++) { for (let i = 0; i < items.length; i++) {

@ -9,4 +9,6 @@ const dArray = ["invtype", "dateadded", "style", "stage", "ccy", "theme", "tradi
const tablet = Boolean(tabletype) ? tabletype : 0; const tablet = Boolean(tabletype) ? tabletype : 0;
return globalFunc.getTable(dv, DataType, dArray, iArray, tablet) return globalFunc.getTable(dv, DataType, dArray, iArray, tablet)

@ -22,7 +22,7 @@ Parent:: [[@Life Organisation|Life Organisation]]
name Edit Task parameters name Edit Task parameters
type command type command
action MetaEdit: Run MetaEdit action MetaEdit: Run MetaEdit
id Edit Metadata id EditMetaData
``` ```
^button-FinancesEdit ^button-FinancesEdit
@ -30,6 +30,7 @@ id Edit Metadata
name Save name Save
type command type command
action Save current file action Save current file
id Save
``` ```
^button-FinancesSave ^button-FinancesSave
@ -176,6 +177,8 @@ hide task count
### Dependencies ### Dependencies
%%🔐α GVwoQnHMhoUoG79zYoNrHATnyNt4bJAM3MoU+GZDPV4sv+ymhDKmr+g4lhplMB355WC0u+HJopXDmDyzCTMiLkjmzp0kaMuXNdXV/0leisQ+1BIKkbUu02e4VZvmCPmbajUvffUJvWSrDBYtWF2naicaaZzpUTRfdwkEZcn03ZqhO9Pv/BzrqnYf7VI/PQwmcZkToRe2kEIW34xYzY+gd9lY8ApfehMLWpyBAJCEXTZW6o7T53iPv2iAbj8PA7kzabaYta/MCGtzzSm5rGNYB0w5cE8/353/tQDgPpfakHziHPLingQLsqSZY+4= 🔐%%
&emsp; &emsp;
&emsp; &emsp;

@ -24,7 +24,7 @@ Parent:: [[@Life Organisation|Life organisation]]
name Edit Task parameters name Edit Task parameters
type command type command
action MetaEdit: Run MetaEdit action MetaEdit: Run MetaEdit
id Edit Metadata id EditMetaData
``` ```
^button-ITEdit ^button-ITEdit
@ -32,6 +32,7 @@ id Edit Metadata
name Save name Save
type command type command
action Save current file action Save current file
id Save
``` ```
^button-ITSave ^button-ITSave

@ -22,7 +22,7 @@ Parent:: [[@Life Organisation|Life Organisation]]
name Edit Task parameters name Edit Task parameters
type command type command
action MetaEdit: Run MetaEdit action MetaEdit: Run MetaEdit
id EditMetadata id EditMetaData
``` ```
^button-LifestyleEdit ^button-LifestyleEdit
@ -30,6 +30,7 @@ id EditMetadata
name Save name Save
type command type command
action Save current file action Save current file
id Save
``` ```
^button-LifestyleSave ^button-LifestyleSave

@ -22,7 +22,7 @@ Parent:: [[@Life Organisation| Life Organisation]]
name Edit Task parameters name Edit Task parameters
type command type command
action MetaEdit: Run MetaEdit action MetaEdit: Run MetaEdit
id EditMetadata id EditMetaData
``` ```
^button-PPEdit ^button-PPEdit
@ -30,6 +30,7 @@ id EditMetadata
name Save name Save
type command type command
action Save current file action Save current file
id Save
``` ```
^button-PPSave ^button-PPSave

@ -0,0 +1,88 @@
---
Alias: ["Shoppimg Admin"]
Tag: ["Admin"]
Date: 2021-10-25
DocType: "Admin"
Hierarchy: "NonRoot"
TimeStamp:
location:
CollapseMetaTable: Yes
---
Parent:: [[@Shopping list|Shopping list]]
---
&emsp;
```button
name Save
type command
action Save current file
id Save
```
^button-ShoppingAdminNSave
&emsp;
# Shopping Admin
&emsp;
```ad-abstract
title: Summary
collapse: open
Admin to dissociate the reset button from the actual shopping list.
```
&emsp;
```toc
style: number
```
&emsp;
---
&emsp;
### Reset buttons
&emsp;
```dataview
const {shoppingFunc} = customJS
shoppingFunc.resetList({app: app, dv: dv, that:this, theme: "to0", listOfIt: "Groceries"})
```
&emsp;
```dataview
const {shoppingFunc} = customJS
shoppingFunc.resetList({app: app, dv: dv, that:this, theme: "to0", listOfIt: "Health"})
```
&emsp;
```dataview
const {shoppingFunc} = customJS
shoppingFunc.resetList({app: app, dv: dv, that:this, theme: "to0", listOfIt: "Household" })
```
&emsp;
---
&emsp;
### Header 2
&emsp;
Loret ipsum
&emsp;
&emsp;

@ -1,69 +1,38 @@
--- ---
Alias: ["Shopping list"] CollapseMetaTable: yes
Tag: ["Groceries"] Groceries: ["🍶 bottle(s) Coke 0","🍿 whole Snacks","🧈 1 packet(s) Beurre","🫒 bottle(s) Olive oil","🍺 1 bottle(s) Beers","🥯 packet(s) Bagels","🍯 jar(s) Bonne Maman","🍌 whole Bananas","🧀 packet(s) Fromage rape","🥩 packet(s) Cured meat","🍐 whole Fruit","🍝 packet(s) Pasta","🌶️ 1 bottle(s) Tabasco"]
Date: 2021-10-25 Health: ["🚿 1 whole shower gel","🧴 whole shampoo","🪥 1 whole toothbrush","🦷 whole toothpaste","👂 1 whole earbuds","🪒 whole razor blades (mach3)","🍦 whole shaving cream","🧻 whole loo rolls","🦨 whole deo"]
DocType: "Groceries" Household: ["👔 1 whole Washing gel","🧻 whole Kitchen towel","🧽 whole Sponge","👕 bottle(s) Softener","🍽️ 1 packet(s) Dishwasher tablets","🧂 1 bag(s) Dishwasher salt","🚰 bottle(s) Dishwasher rinsing aid"]
Hierarchy: "NonRoot"
TimeStamp:
location:
CollapseMetaTable: Yes
Groceries:
- 🍶 6 bottle(s) Coke 0
- 🍿 1 whole Snacks
- 🧈 0 packet(s) Beurre
- 🫒 0 bottle(s) Olive oil
- 🍺 0 bottle(s) Beers
- 🥯 0 packet(s) Bagels
- 🍯 1 jar(s) Bonne Maman
- 🍌 6 whole Bananas
- 🧀 0 packet(s) Fromage rape
- 🥩 0 packet(s) Cured meat
- 🍐 6 whole Fruit
- 🍝 2 packet(s) Pasta
- 🌶️ 1 bottle(s) Tabasco
Health:
- 🚿 1 whole shower gel
- 🧴 1 whole shampoo
- 🪥 1 whole toothbrush
- 🦷 1 whole toothpaste
- 👂 1 whole earbuds
- 🪒 1 whole razor blades (mach3)
- 🍦 1 whole shaving cream
- 🧻 1 whole loo rolls
- 🦨 1 whole deo
Household:
- 👔 1 whole Washing gel
- 🧻 1 whole Kitchen towel
- 🧽 1 whole Sponge
- 👕 1 whole Softener
- 🍽️ 1 whole Dishwasher tablets
- 🧂 1 whole Dishwasher salt
- 🚰 1 whole Dishwasher rinsing aid
--- ---
Parent:: parent:: [[@Life Organisation|Life Orga]]
--- ---
&emsp; &emsp;
```button
name Reset Shopping list
type append template
action ShoppingListto0
color blue
templater true
```
&emsp;
```button ```button
name Save name Save
type command type command
action Save current file action Save current file
id Save id Save
``` ```
^button-ShoppinglistNSave ^button-ShoppingListSave
&emsp; &emsp;
```dataviewjs
const {shoppingFunc} = customJS
shoppingFunc.getItems2Change({app: app, dv: dv, luxon: luxon, that:this, theme: "to0"})
```
# Shopping list # Shopping list
&emsp; &emsp;
@ -91,7 +60,7 @@ style: number
&emsp; &emsp;
```dataviewjs ```dataviewjs
dv.view("00.01 Admin/dv-views/print_shoppingitems", {items: dv.current().Groceries}) dv.view("00.01 Admin/dv-views/print_shoppingitems", { items: dv.current().Groceries })
``` ```
&emsp; &emsp;
@ -105,7 +74,7 @@ dv.view("00.01 Admin/dv-views/print_shoppingitems", {items: dv.current().Groceri
&emsp; &emsp;
```dataviewjs ```dataviewjs
dv.view("00.01 Admin/dv-views/print_shoppingitems", {items: dv.current().Health}) dv.view("00.01 Admin/dv-views/print_shoppingitems", { items: dv.current().Health})
``` ```
&emsp; &emsp;
@ -119,7 +88,7 @@ dv.view("00.01 Admin/dv-views/print_shoppingitems", {items: dv.current().Health}
&emsp; &emsp;
```dataviewjs ```dataviewjs
dv.view("00.01 Admin/dv-views/print_shoppingitems", {items: dv.current().Household}) dv.view("00.01 Admin/dv-views/print_shoppingitems", { items: dv.current().Household })
``` ```
&emsp; &emsp;

@ -0,0 +1,115 @@
---
Alias: ["Wine"]
Tag: ["Epicure"]
Date: 2021-10-26
DocType: "Personal"
ChildrenType: ["Product", "Wine"]
Hierarchy: "Root"
location:
CollapseMetaTable: Yes
---
Parent:: [[Lifestyle]]
---
&emsp;
```button
name Create Note
type append template
action NewFile
id CreateNote
```
^button-undefinedNewNote
```button
name Save
type command
action Save current file
id Save
```
^button-undefinedSave
&emsp;
# Folder map
&emsp;
```ad-abstract
title: Summary
collapse: open
This note enables to navigate in the 01.01 Life Orga section and find any Note in this Vault by Note or Tag
```
&emsp;
```toc
style: number
```
&emsp;
---
&emsp;
### Master Navigation
&emsp;
```dataview
Table Date as "Creation Date" from "Admin"
Sort Date ascending
```
&emsp;
---
&emsp;
### Tag Navigation
&emsp;
```dataview
Table without id tags as "Tags" From "Admin"
Flatten file.tags as tags
Group by tags
```
&emsp;
---
&emsp;
### TimeStamp check
&emsp;
```dataview
Table TimeStamp as "Time Stamp" from "Admin"
Where TimeStamp > date(today) - dur(100 years)
Sort TimeStamp ascending
```
&emsp;
---
&emsp;
### High Level tasks
&emsp;
```tasks
not done
path includes Life Admin
sort by due
hide backlink
hide task count
```
&emsp;
&emsp;

@ -138,7 +138,7 @@ Home | $10 | Free + dedicated server space; 5 users; server whitelabelling
&emsp; &emsp;
- [ ] [[Element]]: Implement 'Home' with bridges to retire iMessages, Whatsapp & Signal - [x] [[Element]]: Implement 'Home' with bridges to retire iMessages, Whatsapp & Signal ✅ 2021-10-26
- [x] [[Selfhosting|Self-host]] an instance of Element ✅ 2021-09-14 - [x] [[Selfhosting|Self-host]] an instance of Element ✅ 2021-09-14
&emsp; &emsp;

Loading…
Cancel
Save