Breakfast Dinner Lunch Take out the garbage Wash the dishes
Created
December 26, 2022 14:27
-
-
Save MarceloCajueiro/e00c637150da95fd33f8969d0eca5598 to your computer and use it in GitHub Desktop.
Obsidian + Meta bind + Templater: load options from file when use a template.
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
async function get_options(file) { | |
const options_file = app.vault.getAbstractFileByPath(file); | |
const result = await app.vault.read(options_file); | |
return result | |
.split("\n") | |
.map((option) => `option(${option})`) | |
.join(", "); | |
} | |
module.exports = get_options; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment