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.4: Adding option for including a header for each DNP day to fold | |
//'first' will add to top of file. 'last' will add to bottom of file | |
let firstOrLastLine = 'first'; | |
//Name of the Quick Capture file. Do NOT include extension '.md' | |
let qcFileName = 'Quick Capture'; | |
//Leave this blank if you want to use the default file path location (set to '/' to use root of vault) |
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
/* RAINBOW INDENT COLORS */ | |
:root { | |
/* default */ | |
--font-use-default: var(--default-font); | |
--font-size-use-default: var(--editor-font-size); | |
--indent-use-default: 1.8ch; | |
/* ------- */ | |
/* theme */ | |
--font-use-theme: inherit; |
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 { | |
/* #7159de (similar to Obsidian purple) */ | |
--block-ref-line-color: grey; | |
--block-ref-line-type: solid; | |
--block-ref-line-size: 2px; | |
/* Set to "inherit" for no bg color */ | |
--block-ref-hover-bg-color: #d4d0d026; | |
} | |
/* |
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.1: Changed to using the new "view.editor" instead of deprecated "view.sourceMode.cmEditor" | |
let cmEditorAct = this.app.workspace.activeLeaf.view.editor; | |
let curLine = cmEditorAct.getCursor().line; | |
cmEditorAct.setSelection({ line: curLine, ch: 0 }, { line: curLine, ch: 9999 }); | |
function createBlockHash() { | |
let result = ''; | |
var characters = 'abcdefghijklmnopqrstuvwxyz0123456789'; |
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 notionApiKey = 'YOUR_API_KEY_SEE_COMMENTS_FOR_HOW_TO_GET'; | |
const reqParams = { | |
url: 'https://api.notion.com/v1/databases', | |
method: 'GET', | |
headers: { | |
"Content-Type": "application/json", | |
Authorization: `Bearer ${notionApiKey}`, | |
"Notion-Version": `2021-08-16`, | |
}, |
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.6.2: Fix with update to Templater where wasn't removing the selected text/line "on move" | |
//'first' will add to top of file. 'last' will add to bottom of file | |
let firstOrLastLine = 'last'; | |
//Choose a specific line to move to underneath; overrules firstOrLastLine if true | |
const bChooseLine = false; | |
//After moving the line, open the file it was moved to |
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 editor = app.workspace.activeLeaf.view.editor; | |
const getCurSelection = editor.getSelection(); | |
const getCur = editor.getCursor("from"); | |
const curLineNo = getCur.line; | |
const curLineText = editor.getLine(curLineNo); | |
const matchBullet = curLineText.match(/^[ \t]*[-\*] (.*)/); | |
let foundContent = ""; | |
if(matchBullet) { | |
foundContent = matchBullet[1]; |
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 openInNewPane = false; //If false, will save link to clipboard | |
const folderName = `refactor`; | |
const firstVal = await tp.system.prompt("First thought to add to the new note"); | |
//Client name | |
const files = await app.vault.getMarkdownFiles(); | |
const links = []; | |
const finalLinkArr = []; | |
files.forEach(file => { |
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
<%* | |
// v0.1 | |
/* START OF USER DEFINED SETTINGS */ | |
// template to use | |
const templateFolder = "templates"; | |
const templateName = "template_anthony.md"; | |
// creating the new file | |
const newFileFolder = "test/meetings"; | |
const openNewFile = false; |
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
/* | |
**************************************************************************************** | |
**************************************************************************************** | |
**************************************************************************************** | |
NOW HOSTING CODE VIA MY MAIN GITHUB REPOSITORY FOR ROAM SO THAT USERS CAN LINK DIRECTLY TO THE CODE AND AUTO UPDATE | |
GO HERE FOR INSTALLATION INSTRUCTIONS: https://github.com/GitMurf/roam-javascript#installation | |
**************************************************************************************** |
NewerOlder