parent
b6f33bcddf
commit
fd7225123b
@ -1,22 +0,0 @@
|
||||
{
|
||||
"ribbonIcon": true,
|
||||
"showRootFolder": true,
|
||||
"showFilesFromSubFolders": true,
|
||||
"searchFunction": true,
|
||||
"showFilesFromSubFoldersButton": true,
|
||||
"excludedExtensions": "",
|
||||
"excludedFolders": "",
|
||||
"folderIcon": "default",
|
||||
"folderCount": true,
|
||||
"folderCountOption": "notes",
|
||||
"evernoteView": true,
|
||||
"filePreviewOnHover": false,
|
||||
"sortFilesBy": "name",
|
||||
"fixedHeaderInFileList": false,
|
||||
"openFolders": [
|
||||
"/"
|
||||
],
|
||||
"pinnedFiles": [],
|
||||
"customHeight": 0,
|
||||
"activeFolderPath": "02.01 London"
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -1,10 +0,0 @@
|
||||
{
|
||||
"id": "file-tree-alternative",
|
||||
"name": "File Tree Alternative Plugin",
|
||||
"version": "1.5.7",
|
||||
"minAppVersion": "0.9.12",
|
||||
"description": "This plugin allows you to have an alternative file tree view.",
|
||||
"author": "Ozan Tellioglu",
|
||||
"authorUrl": "https://www.ozan.pl",
|
||||
"isDesktopOnly": false
|
||||
}
|
@ -1,235 +0,0 @@
|
||||
.oz-file-tree-header {
|
||||
height: 22px;
|
||||
color: var(--text-normal);
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.oz-nav-action-button {
|
||||
color: var(--text-normal);
|
||||
display: inline-block;
|
||||
padding: 3px 0px 0 3px !important;
|
||||
}
|
||||
|
||||
.oz-input-container {
|
||||
margin-bottom: 3px !important;
|
||||
margin-top: 3px !important;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.oz-nav-buttons-right-block {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.oz-nav-file-title {
|
||||
padding-left: 2px !important;
|
||||
padding-right: 2px !important;
|
||||
}
|
||||
|
||||
div.workspace-leaf-content[data-type='file-tree-view'] > div.view-content {
|
||||
padding: 10px 5px 5px 5px;
|
||||
}
|
||||
|
||||
.oz-flex-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.is-mobile .oz-flex-container {
|
||||
height: 31px;
|
||||
}
|
||||
|
||||
.oz-explorer-container {
|
||||
padding-left: 3px !important;
|
||||
padding-right: 3px !important;
|
||||
}
|
||||
|
||||
.oz-file-tree-files {
|
||||
padding-top: 3px !important;
|
||||
}
|
||||
|
||||
.drag-entered,
|
||||
.oz-folder-element:hover,
|
||||
.oz-nav-file:hover {
|
||||
background-color: var(--text-selection);
|
||||
}
|
||||
|
||||
.oz-folder-contents {
|
||||
will-change: transform, opacity, height;
|
||||
margin-left: 6;
|
||||
padding: 4px 0px 0px 14px;
|
||||
border-left: 1px dashed;
|
||||
border-left-color: var(--text-muted);
|
||||
font-size: 12.8px;
|
||||
}
|
||||
|
||||
.oz-folder-toggle {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.treeview {
|
||||
position: relative;
|
||||
padding: 4px 0px 0px 0px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.oz-folder-type {
|
||||
text-transform: uppercase;
|
||||
font-family: monospace;
|
||||
font-size: 0.6em;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.oz-folder-name {
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
color: var(--text-normal);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
div.oz-folder-name.is-root-folder {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.is-mobile .oz-folder-name.is-root-folder {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.is-mobile .oz-folder-name {
|
||||
font-size: 15.5px;
|
||||
}
|
||||
|
||||
.is-mobile div.oz-nav-file-title .nav-file-title-content {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.oz-icon-div {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.oz-folder-block {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.oz-folder-count.no-root {
|
||||
float: right;
|
||||
padding-right: 25px;
|
||||
}
|
||||
|
||||
.oz-folder-count.with-root {
|
||||
float: right;
|
||||
padding-right: 32px;
|
||||
}
|
||||
|
||||
.oz-folders-tree-wrapper {
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 5px;
|
||||
padding-left: 8px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.oz-folder-element {
|
||||
line-height: 1.35em;
|
||||
padding: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.oz-input-container > input {
|
||||
padding-left: 8px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
.oz-nav-action-button:hover {
|
||||
color: var(--interactive-accent);
|
||||
}
|
||||
|
||||
.oz-nav-action-button .fa-lg {
|
||||
font-size: 1.15em;
|
||||
}
|
||||
|
||||
.file-tree-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.file-tree-plugin-view {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.oz-folder-pane {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
height: 50%;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
.oz-file-list-pane {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.oz-coffee-div {
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#file-tree-divider {
|
||||
height: 2.5px;
|
||||
background-color: var(--text-muted);
|
||||
cursor: row-resize;
|
||||
}
|
||||
|
||||
.is-folder-active {
|
||||
color: var(--text-accent);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.file-tree-header-fixed {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
background-color: var(--background-secondary);
|
||||
}
|
||||
|
||||
.file-tree-files-fixed {
|
||||
padding-top: 50px !important;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.is-mobile .file-tree-files-fixed {
|
||||
padding-top: 55px !important;
|
||||
}
|
||||
|
||||
.file-tree-files-fixed-with-search {
|
||||
padding-top: 80px !important;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.is-mobile .file-tree-files-fixed-with-search {
|
||||
padding-top: 85px !important;
|
||||
}
|
||||
|
||||
svg.oz-folder-toggle path {
|
||||
fill: var(--interactive-accent);
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -1 +1,38 @@
|
||||
Not Found
|
||||
.meld-e-row{
|
||||
display: flex;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.meld-e-icon{
|
||||
flex: 1;
|
||||
display: inline-block;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.meld-e-row input{
|
||||
flex: 20;
|
||||
}
|
||||
|
||||
.meld-e-platform-desktop .meld-e-button-confirm {
|
||||
margin-left: 2.8em;
|
||||
padding: 1em 2em;
|
||||
}
|
||||
.meld-e-platform-desktop .meld-e-button-confirm:focus{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.meld-e-message{
|
||||
margin-left: 2.8em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.meld-e-button-next{
|
||||
margin-left: 1em;
|
||||
flex: 3;
|
||||
}
|
||||
|
||||
.meld-e-platform-mobile .meld-e-button-next{
|
||||
display: inline-block;
|
||||
margin: 0 0 0 1em;
|
||||
width: auto;
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -1,12 +1,8 @@
|
||||
class templaterFunc {
|
||||
createNewFile(tp) {
|
||||
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())
|
||||
createNewFile(tp, templatelist) {
|
||||
const fileName = await tp.system.prompt("File name")
|
||||
const templateName = await tp.system.suggester(templatelist, templatelist)
|
||||
return tp.file.create_new(tp.file.find_tfile("Template ") + templateName, fileName, tp.file.folder())
|
||||
}
|
||||
|
||||
getUserInput(tp, promptScript) {
|
||||
const tempresult = await tp.system.prompt(promptScript)
|
||||
return tempresult
|
||||
}
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
<%*
|
||||
const {templaterFunc} = tp.obsidian.plugins.plugins.CustomJS
|
||||
templaterFunc.createNewFile(tp)
|
||||
const {templaterFunc} = this.app.plugins.plugins["CustomJS"].customJS
|
||||
templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
|
||||
tp.file.content.replace(/[\w\W]+?\n+?/,"")
|
||||
%>
|
@ -1,5 +1,5 @@
|
||||
```ad-code
|
||||
~~~
|
||||
~~~bash
|
||||
<% tp.file.selection() %>
|
||||
~~~
|
||||
```
|
@ -1,5 +1,3 @@
|
||||
```ad-path
|
||||
~~~
|
||||
<% tp.file.selection() %>
|
||||
~~~
|
||||
```
|
@ -0,0 +1,105 @@
|
||||
class shoppingFunc {
|
||||
|
||||
getNewItems(args) {
|
||||
const {
|
||||
dv,
|
||||
catItem
|
||||
} = args;
|
||||
return 0
|
||||
}
|
||||
getItems2Change(args) {
|
||||
const {
|
||||
that,
|
||||
app,
|
||||
dv,
|
||||
luxon,
|
||||
theme,
|
||||
} = args;
|
||||
const { metaedit, buttons } = app.plugins.plugins
|
||||
const { update } = metaedit.api
|
||||
const { createButton } = buttons
|
||||
const btnStr = this.getBtnName(theme)
|
||||
const updateSct = "Groceries"// await app.obsidian.system.suggester(["groceries", "health", "household"], ["groceries", "health", "household"]); //"Groceries"
|
||||
const updateStr = this.getPoint(dv, updateSct)
|
||||
|
||||
return dv.el('p',
|
||||
createButton({
|
||||
app,
|
||||
el: that.container,
|
||||
args: { name: btnStr, color: 'blue' },
|
||||
clickOverride: { click: update, params: [updateSct, updateStr, dv.current().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) {
|
||||
let tempresult = "Test";
|
||||
switch(arg1) {
|
||||
case 'to0':
|
||||
tempresult = "Reset shopping list"
|
||||
break;
|
||||
case 'add':
|
||||
tempresult = "Add an item"
|
||||
break;
|
||||
}
|
||||
return tempresult
|
||||
}
|
||||
|
||||
getPoint(p, datapoint) {
|
||||
|
||||
let result = null
|
||||
|
||||
switch(datapoint) {
|
||||
case 'Groceries':
|
||||
result = p.Groceries
|
||||
break;
|
||||
case 'Health':
|
||||
result = p.Health
|
||||
break;
|
||||
case 'Household':
|
||||
result = p.Household
|
||||
break;
|
||||
case 'type':
|
||||
result = p.DocType
|
||||
break;
|
||||
case 'createddate':
|
||||
result = p.Date
|
||||
break;
|
||||
case 'tag':
|
||||
result = p.Tag
|
||||
break;
|
||||
case 'hierarchy':
|
||||
result = p.Hierarchy
|
||||
break;
|
||||
case 'alias':
|
||||
result = p.Alias
|
||||
break;
|
||||
case 'location':
|
||||
result = p.location
|
||||
break;
|
||||
}
|
||||
|
||||
return result
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
const {globalFunc} = customJS;
|
||||
let {items} = input;
|
||||
let ing = [];
|
||||
let j = 0;
|
||||
|
||||
if (!Boolean(items)) {
|
||||
return "⚠️ <b>Warning</b>\nYou have not specified ahoppong items!\n<b>The shopping list cannot be printed.</b>"
|
||||
}
|
||||
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
let name = items[i].replace(items[i].split(" ")[0] + " " + items[i].split(" ")[1]+ " " + items[i].split(" ")[2], "");
|
||||
let unit = items[i].split(" ")[2];
|
||||
if (unit.contains('whole')) {unit = ""}
|
||||
let amount = items[i].split(" ")[1];
|
||||
let emoji = items[i].split(" ")[0];
|
||||
|
||||
if (amount > 0) {
|
||||
ing[j] = emoji + " " + amount + " " + unit + " <b>" + name + "</b>"
|
||||
j++
|
||||
}
|
||||
}
|
||||
|
||||
dv.el('p', globalFunc.BuildList(ing, "\n"))
|
@ -0,0 +1,126 @@
|
||||
---
|
||||
|
||||
Alias: ["Shopping list"]
|
||||
Tag: ["Groceries"]
|
||||
Date: 2021-10-25
|
||||
DocType: "Groceries"
|
||||
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::
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
```button
|
||||
name Save
|
||||
type command
|
||||
action Save current file
|
||||
id Save
|
||||
```
|
||||
^button-ShoppinglistNSave
|
||||
|
||||
 
|
||||
|
||||
```dataviewjs
|
||||
const {shoppingFunc} = customJS
|
||||
shoppingFunc.getItems2Change({app: app, dv: dv, luxon: luxon, that:this, theme: "to0"})
|
||||
```
|
||||
|
||||
# Shopping list
|
||||
|
||||
 
|
||||
|
||||
```ad-abstract
|
||||
title: Summary
|
||||
collapse: open
|
||||
Shopping list management.
|
||||
```
|
||||
|
||||
 
|
||||
|
||||
```toc
|
||||
style: number
|
||||
```
|
||||
|
||||
 
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
### Groceries
|
||||
|
||||
 
|
||||
|
||||
```dataviewjs
|
||||
dv.view("00.01 Admin/dv-views/print_shoppingitems", {items: dv.current().Groceries})
|
||||
```
|
||||
|
||||
 
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
### Health
|
||||
|
||||
 
|
||||
|
||||
```dataviewjs
|
||||
dv.view("00.01 Admin/dv-views/print_shoppingitems", {items: dv.current().Health})
|
||||
```
|
||||
|
||||
 
|
||||
|
||||
---
|
||||
|
||||
 
|
||||
|
||||
### Household
|
||||
|
||||
 
|
||||
|
||||
```dataviewjs
|
||||
dv.view("00.01 Admin/dv-views/print_shoppingitems", {items: dv.current().Household})
|
||||
```
|
||||
|
||||
 
|
||||
 
|
Loading…
Reference in new issue