You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
*/constview=app.workspace.activeLeaf.view;consteditor=view.editor;constcurLineNum=editor.getCursor().line;constcurLineText=editor.getLine(curLineNum);consttitle=tp.file.title;consttoday=title.match(/\d{4}\-\d{2}\-\d{2} .+/)//are we on the DNP?
Rollover Daily Todos for Obsidian, but with the Templater Plugin
Rollver daily todos is a really nice extension
for Obsidian.md that takes TODOs from yesterdays daily notes and rolls them over to today's notes.
It has support for Obsidians built-in templates, but does - to my understanding - not really work well with
the Templater Plugin. At least, I was unable to get it to work :-).
Also, I wished it had some way to tell me that TODOs have been rolled over a few times already.
Doing it this way is my way of working around these limitations.
I took some of the code of that "rollover daily todos" plugin and made it into a templater user script.
<%*
var fileDate = moment(tp.file.title);
// moment dates are mutable
let prevDay = moment(fileDate).subtract(1, 'd').format('YYYY-MM-DD');
let nextDay = moment(fileDate).add(1, 'd').format('YYYY-MM-DD');
let prevDayWeek = moment(fileDate).subtract(1, 'd').format('gggg-[W]ww');
let nextDayWeek = moment(fileDate).add(1, 'd').format('gggg-[W]ww');
let yearLink = fileDate.format('YYYY');
let quarterLink = fileDate.format('YYYY [Q]Q');
let monthLink = fileDate.format('YYYY-MM');
My current Daily Note Template in Obsidian utilizing Templater and DataView Plugins
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
modification date: <%+ tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %> // This doesn't currently work in front matter, hoping that gets fixed.
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
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
/*
================================================================================
Pivot example with variable number of columns in the output.
================================================================================
example data is straight forward, imagine a table with a customer identifier, an invoice date and an amount.
*/
DROP TABLE IF EXISTS invoice;
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