Or: “Everybody likes being given a glass of water.”
By Merlin Mann.
It's only advice for you because it had to be advice for me.
| ea = ExcalidrawAutomate; | |
| async function run() { | |
| const files = app.vault.getMarkdownFiles().filter(f=>ea.isExcalidrawFile(f) && f.name.match(/^(?:icon|stickfigure|logo) - /i)); | |
| let workingLeaf = app.workspace.getLeaf(true); | |
| //let i = 0; //uncomment this and if statment later for limited debugging. | |
| for (excalidrawFile of files) { | |
| //if(i++>5) continue; | |
| await workingLeaf.openFile(excalidrawFile); | |
| await sleep(200); |