This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
let dueDateStr = await tp.system.prompt("Enter Date", "Tomorrow"); | |
let parseResult; | |
let parseResultLink; | |
if(dueDateStr) { | |
let nlDatesPlugin = this.app.plugins.getPlugin('nldates-obsidian'); | |
parseResult = nlDatesPlugin.parseDate(dueDateStr); | |
if(parseResult){parseResultLink = parseResult.formattedString;} | |
} | |
if(parseResultLink) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
let dueDateStr = await tp.system.prompt("Enter Date", "Tomorrow"); | |
let parseResult; | |
let parseResultLink; | |
let myString = ''; | |
if(dueDateStr) { | |
let findDays = dueDateStr.split(';'); | |
let myDateStr = findDays[0]; | |
if(myDateStr) { | |
let nlDatesPlugin = this.app.plugins.getPlugin('nldates-obsidian'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
//Find leaf next door | |
const thisLeaf = app.workspace.activeLeaf; | |
const thisFile = thisLeaf.view.file; | |
let leafToUse = app.workspace.getAdjacentLeafInDirection(thisLeaf, "right"); | |
if(!leafToUse){leafToUse = app.workspace.getAdjacentLeafInDirection(thisLeaf, "left");} | |
if(!leafToUse){leafToUse = app.workspace.getAdjacentLeafInDirection(thisLeaf, "bottom");} | |
if(!leafToUse){leafToUse = app.workspace.getAdjacentLeafInDirection(thisLeaf, "top");} | |
if(leafToUse) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
const curPane = document.querySelector(`.mod-active.workspace-leaf`); | |
let isMax = false; | |
if(curPane) { | |
if(curPane.style.minWidth) { | |
if(curPane.style.minWidth === `100%`){isMax = true} | |
} | |
} | |
const rootPanesCont = document.querySelector(`.workspace-split.mod-root`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
//v1.0 | |
let cmEditorAct = this.app.workspace.activeLeaf.view.editor; | |
let curLine = cmEditorAct.getCursor().line; | |
cmEditorAct.setSelection({ line: curLine, ch: 0 }, { line: curLine, ch: 9999 }); | |
let dueDateStr = await tp.system.prompt("Due Date"); | |
let parseResult; | |
let parseResultLink; | |
if(dueDateStr) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
const noteName = tp.file.title; | |
const queryKeyword = await tp.system.prompt("Keyword for Tasks search query", noteName); | |
if(queryKeyword) { | |
tR = ` | |
\`\`\`query | |
-file:inbox (file:("${queryKeyword}") line:(" [ ] ")) OR (section:(--"${queryKeyword}" " [ ] ")) OR (section:(--"${queryKeyword}" section:(" [ ] "))) | |
\`\`\` | |
` | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
//OPTIONS: TOP / BOTTOM | |
const whereToWrite = "TOP"; | |
//OPTIONS: COPY / MOVE | |
const copyOrMove = "COPY"; | |
//Find leaf next door | |
const thisLeaf = app.workspace.activeLeaf; | |
const thisFile = thisLeaf.view.file; | |
let leafToUse = app.workspace.getAdjacentLeafInDirection(thisLeaf, "right"); | |
if(!leafToUse){leafToUse = app.workspace.getAdjacentLeafInDirection(thisLeaf, "left");} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
/* Vertical Masonry */ | |
--leaf-height: 480px; | |
--scroll-width: 20px; | |
/* Horizontal Masonry */ | |
/* Split Screen: 930px ... Thirds: 570px or 600px (main ext monitor) */ | |
--leaf-width: 600px; | |
--leaf-height-child: 700px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
const search = app.workspace.getLeavesOfType("search")[0]; | |
let thisFile = app.workspace.getActiveFile(); | |
//SortOrder Options: alphabeticalReverse, alphabetical, byModifiedTime, byModifiedTimeReverse, byCreatedTime, byCreatedTimeReverse | |
search.view.setSortOrder("byCreatedTime"); | |
//Collapse=true, Expand=false | |
search.view.setCollapseAll(false); | |
//Show Extra Context: true or false | |
search.view.setExtraContext(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
const myDnpPath = 'dnp'; | |
let dueDateStr = await tp.system.prompt("Enter Date to Start from", "Today"); | |
const daysBackStr = await tp.system.prompt("How many days back?", "7"); | |
const daysBack = parseInt(daysBackStr); | |
let parseResult; | |
let parseResultLink; | |
const getAllDates = []; |