From 586c0bcb78bf01888135afb5af0b6e487c188697 Mon Sep 17 00:00:00 2001 From: Mel Date: Wed, 27 Oct 2021 15:12:02 +0100 Subject: [PATCH] wine 0.0.3 --- .obsidian/snippets/folder_4_icon.css | 5 ++ .obsidian/workspace | 26 ++++---- 00.01 Admin/dv-views/GlobalFunc.js | 94 +++++++++++++++++++++++++++- 00.01 Admin/dv-views/query_wine.js | 6 ++ 01.02 Home/MRCK.md | 1 + 03.03 Food & Wine/!!Wine.md | 39 +++++++----- 03.03 Food & Wine/@@Recipes.md | 2 +- 7 files changed, 146 insertions(+), 27 deletions(-) create mode 100644 00.01 Admin/dv-views/query_wine.js diff --git a/.obsidian/snippets/folder_4_icon.css b/.obsidian/snippets/folder_4_icon.css index ec9dc30c..c1bf8d9a 100644 --- a/.obsidian/snippets/folder_4_icon.css +++ b/.obsidian/snippets/folder_4_icon.css @@ -63,6 +63,11 @@ div[data-path="05.02 Networks"] .nav-folder-title-content::before content: "🌐 "; } +div[data-path="05.03 freemind.codes"] .nav-folder-title-content::before +{ + content: "👾 "; +} + div[data-path="06.01 Finances"] .nav-folder-title-content::before { content: "💷 "; diff --git a/.obsidian/workspace b/.obsidian/workspace index a91f9e08..b0a4e5a6 100644 --- a/.obsidian/workspace +++ b/.obsidian/workspace @@ -7,8 +7,11 @@ "id": "c1cbd199334b4022", "type": "leaf", "state": { - "type": "empty", - "state": {} + "type": "markdown", + "state": { + "file": "03.03 Food & Wine/!!Wine.md", + "mode": "preview" + } } } ], @@ -65,6 +68,7 @@ "state": { "type": "backlink", "state": { + "file": "03.03 Food & Wine/!!Wine.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -103,15 +107,15 @@ }, "active": "c1cbd199334b4022", "lastOpenFiles": [ - "Olivier Chanzy Chassagne-Montrachet 1er Cru 'Morgeot'.md", - "00.01 Admin/Templates/Template Wine.md", - "00.01 Admin/Templates/Template Travel.md", - "03.03 Food & Wine/Template Wine.md", + "03.03 Food & Wine/!!Wine.md", + "03.03 Food & Wine/Aromatic Beef Pilaf.md", + "03.03 Food & Wine/@Desserts.md", + "03.03 Food & Wine/@@Recipes.md", + "01.02 Home/MRCK.md", "03.03 Food & Wine/Maison Olivier Chanzy Chassagne-Montrachet 1er Cru Morgeot Tête de Clos.md", - "03.03 Food & Wine/Untitled.md", - "00.01 Admin/Templates/Template Note.md", - "03.03 Food & Wine/2015 Maison Olivier Chanzy Chassagne-Montrachet 1er Cru Morgeot Tête de Clos.md", - "03.03 Food & Wine/%%Wine.md", - "03.03 Food & Wine/$$Wine.md" + "03.03 Food & Wine/@Main dishes.md", + "Untitled.md", + "05.01 Computer setup/Untitled.md", + "05.01 Computer setup/Storage and Syncing.md" ] } \ No newline at end of file diff --git a/00.01 Admin/dv-views/GlobalFunc.js b/00.01 Admin/dv-views/GlobalFunc.js index 5210dc47..5e60c7c4 100644 --- a/00.01 Admin/dv-views/GlobalFunc.js +++ b/00.01 Admin/dv-views/GlobalFunc.js @@ -279,7 +279,7 @@ class globalFunc { case 'Recipe': switch(TableT) { - case 0: + default: TempData = ["Name", "Category", "Cuisine", "Cooking time", "Rating (1-5)"] break; case 'extended': @@ -289,6 +289,19 @@ class globalFunc { break; + case 'Wine': + + switch(TableT) { + default: + TempData = ["Name", "Type", "Vintage", "Country", "Terroir", "Appellation"] + break; + case 'extended': + TempData = ["Name", "Type", "Vintage", "Country", "Region", "Terroir", "Appellation", "Vineyard", "Variety", "Producer"] + break; + } + + break; + } return TempData @@ -373,6 +386,19 @@ class globalFunc { } break; + + case 'Wine': + + switch(TableT) { + default: + TempData = [p.file.link, this.GetPoint(p, DataT, "type"), this.GetPoint(p, DataT, "vintage"), this.toEmoji(this.GetPoint(p, DataT, "country")), this.GetPoint(p, DataT, "subregion"), this.GetPoint(p, DataT, "appellation")] + break; + case 'extended': + TempData = [p.file.link, this.GetPoint(p, DataT, "type"), this.GetPoint(p, DataT, "vintage"), this.toEmoji(this.GetPoint(p, DataT, "country")), this.GetPoint(p, DataT, "region"), this.GetPoint(p, DataT, "subregion"), this.GetPoint(p, DataT, "appellation"), this.GetPoint(p, DataT, "vineyard"), this.GetPoint(p, DataT, "variety"), this.GetPoint(p, DataT, "producer")] + break; + } + + break; } @@ -399,9 +425,11 @@ class globalFunc { switch(label) { case 'French': + case 'France': tempresult = "🇫🇷" break; case 'Italian': + case 'Italy': tempresult = "🇮🇹" break; case 'British': @@ -428,6 +456,7 @@ class globalFunc { tempresult = "🇵🇪" break; case 'Spanish': + case 'Spain': tempresult = "🇪🇸" break; case 'Greek': @@ -455,6 +484,7 @@ class globalFunc { tempresult = "🇪🇺" break; case 'North African': + case 'Morroccan': case 'North African Fusion': tempresult = "🇲🇦" break; @@ -496,6 +526,7 @@ class globalFunc { case 'placetype': case 'prodtype': case 'disktype': + case 'winetype': result = this.GetPoint(pobj, DocType, "type") break; case 'style': @@ -588,6 +619,30 @@ class globalFunc { case 'cookingtime': result = this.GetPoint(pobj, DocType, "cooking") break; + case 'vintage': + result = this.GetPoint(pobj, DocType, "vintage") + break; + case 'vineyard': + result = this.GetPoint(pobj, DocType, "vineyard") + break; + case 'terroir': + result = this.GetPoint(pobj, DocType, "subregion") + break; + case 'region': + result = this.GetPoint(pobj, DocType, "region") + break; + case 'producer': + result = this.GetPoint(pobj, DocType, "producer") + break; + case 'appellation': + result = this.GetPoint(pobj, DocType, "appellation") + break; + case 'variety': + result = this.GetPoint(pobj, DocType, "varietal") + break; + case 'designation': + result = this.GetPoint(pobj, DocType, "designation") + break; } return result } @@ -858,6 +913,43 @@ class globalFunc { } break; + + case 'Wine': + + switch(dPoint) { + case 'vintage': + result = pobj.Wine.Vintage + break; + case 'type': + result = pobj.Wine.Type + break; + case 'producer': + result = pobj.Wine.Producer + break; + case 'varietal': + result = pobj.Wine.Varietal + break; + case 'designation': + result = pobj.Wine.Designation + break; + case 'vineyard': + result = pobj.Wine.Vineyard + break; + case 'country': + result = pobj.Wine.Country + break; + case 'region': + result = pobj.Wine.Region + break; + case 'subregion': + result = pobj.Wine.SubRegion + break; + case 'appellation': + result = pobj.Wine.Appellation + break; + } + + break; } return result diff --git a/00.01 Admin/dv-views/query_wine.js b/00.01 Admin/dv-views/query_wine.js new file mode 100644 index 00000000..30f01c55 --- /dev/null +++ b/00.01 Admin/dv-views/query_wine.js @@ -0,0 +1,6 @@ +let {tableview, dateadded, winetype, vintage, producer, variety, designation, theme, country, vineyard, region, terroir, appellation} = input; +const {globalFunc} = customJS +const DataType = 'Wine' +//let templacetype = globalFunc.Get1stArg(placetype) + +return globalFunc.getTable(dv, DataType, ["dateadded", "winetype", "vintage", "producer", "variety", "designation", "theme", "country", "vineyard", "region", "terroir", "appellation"], [dateadded, winetype, vintage, producer, variety, designation, theme, country, vineyard, region, terroir, appellation], tableview) diff --git a/01.02 Home/MRCK.md b/01.02 Home/MRCK.md index a389d11e..4919c7ee 100644 --- a/01.02 Home/MRCK.md +++ b/01.02 Home/MRCK.md @@ -101,6 +101,7 @@ Paris, Zürich, London   60's is their best decade +Florists: Fjura, Still Life   diff --git a/03.03 Food & Wine/!!Wine.md b/03.03 Food & Wine/!!Wine.md index b5f9cf1c..89521d79 100644 --- a/03.03 Food & Wine/!!Wine.md +++ b/03.03 Food & Wine/!!Wine.md @@ -1,5 +1,6 @@ --- +cssclass: recipeTable Alias: ["Wine"] Tag: ["Epicure"] Date: 2021-10-26 @@ -56,26 +57,34 @@ style: number   -### Master Navigation +### Navigation +   -```dataview - Table Date as "Creation Date" from "Admin" - Sort Date ascending +#### By type +[[#^Top|TOP]] +##### White + +  + +```dataviewjs +dv.view("00.01 Admin/dv-views/query_wine", {type: "White"}) ``` +   ---   -### Tag Navigation +#### By Geography + +##### France +   -```dataview - Table without id tags as "Tags" From "Admin" - Flatten file.tags as tags - Group by tags +```dataviewjs +dv.view("00.01 Admin/dv-views/query_wine", {country: "France"}) ```   @@ -84,13 +93,15 @@ style: number   -### TimeStamp check +### Tag Navigation +   ```dataview - Table TimeStamp as "Time Stamp" from "Admin" - Where TimeStamp > date(today) - dur(100 years) - Sort TimeStamp ascending + Table without id tags as "Tags" From "03.03 Food & Wine" + Where DocType = "Wine" + Flatten file.tags as tags + Group by tags ```   @@ -105,7 +116,7 @@ style: number ```tasks not done -path includes Life Admin +path includes 03.03 sort by due hide backlink hide task count diff --git a/03.03 Food & Wine/@@Recipes.md b/03.03 Food & Wine/@@Recipes.md index ee1200c7..92749d1a 100644 --- a/03.03 Food & Wine/@@Recipes.md +++ b/03.03 Food & Wine/@@Recipes.md @@ -121,7 +121,7 @@ dv.view("00.01 Admin/dv-views/query_recipe", {course: dv.current().QueryCourse,   ```dataview - Table without id tags as "Tags" From "03.03 Recipes" + Table without id tags as "Tags" From "03.03 Food & Wine" Flatten file.tags as tags Group by tags ```