Skip to content

Instantly share code, notes, and snippets.

@solace
Created December 18, 2023 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save solace/84a64ae93996169fe66f5be0e2c1539e to your computer and use it in GitHub Desktop.
Save solace/84a64ae93996169fe66f5be0e2c1539e to your computer and use it in GitHub Desktop.
Obsidian templater user scripts for QOTD
// https://github.com/benhoneywill/stoic-quotes
async function daily_stoic() {
const res = await fetch(`https://stoic-quotes.com/api/quote`);
const body = await res.json();
return `> [!quote] Daily Stoic\n> ${body.text}\n> — ${body.author}`;
}
module.exports = daily_stoic;
// https://github.com/lukePeavey/quotable
async function qotd() {
const res = await fetch(`https://api.quotable.io/quotes/random`);
const body = await res.json();
return `> [!quote] Quotable\n> ${body[0].content}\n> — ${body[0].author}`;
}
module.exports = qotd;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment