Created
March 25, 2024 07:20
-
-
Save CaptSolo/5201b51d726b8eae388e105889b6d270 to your computer and use it in GitHub Desktop.
Obsidian Templater code for a list of Gmail e-mails from a particular week
This file contains hidden or 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
<%* | |
// assuming the current file is titled in the format YYYY-Wxx (where xx is the week number) | |
date1 = tp.date.weekday("YYYY/MM/DD", 0, tp.file.title, "YYYY-[W]W"); | |
date2 = tp.date.weekday("YYYY/MM/DD", 6, tp.file.title, "YYYY-[W]W"); | |
url = "https://mail.google.com/mail/u/0/#search/" + encodeURIComponent(`after:${date1}+before:${date2}`); | |
tR += `[E-mails from this week](${url})\n`; | |
%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment