# Add task metadata to current task - Obsidian Templater Script This script asks the user which type of metadata they want to insert, then prompts them for the appropriate input based on their choice. It handles all the types of metadata mentioned [here](https://publish.obsidian.md/tasks/Reference/Task+Formats/About+Task+Formats) and appends the corresponding tag to the current line of the document. ## Installation - You will need the [Templater Plugin](https://github.com/SilentVoid13/Templater) - Add file to your Templates Folder where Templater is looking for your Templates. - In your documents, preferable in with the cursor in a task, press CMD+e (or whatever you call to call the templater template modal) and select the script. ## Usage - It first asks for what you want to add - Priority lets you choose a priority - everything date related, you have several options - add a YYYY-MM-DD format - leave empty - defaults to today - write: `tomorrow`, `today` or `in [N] days`, where n stands for the amount of days in the future - In your documents, preferable in with the cursor in a task, press CMD+e (or whatever you call to call the templater template modal) and select the script. ## Options It defaults to the [Emoji Format](https://publish.obsidian.md/tasks/Reference/Task+Formats/Tasks+Emoji+Format). You can change the `format` variable in the beginning to something else to use the [DataView Format](https://publish.obsidian.md/tasks/Reference/Task+Formats/Dataview+Format) ... and yes, this should be a boolean. Don't @mention me. 🤷‍♂️ ## Screenshots ![Choose Metadata Type](https://user-images.githubusercontent.com/407485/244006523-fbd5a850-6746-4f2d-8e5c-b58dcf18dcc5.jpg) ![Choose Priority](https://user-images.githubusercontent.com/407485/244006662-7c52e067-72a2-4805-8a8f-45b718033734.jpg) ![Repeat Frequency](https://user-images.githubusercontent.com/407485/244006795-e20984a5-6590-44b9-a901-26b8cd291c79.jpg) ![Date Input](https://user-images.githubusercontent.com/407485/244006862-f96eb07a-aafd-4b1f-b89b-3703c69b8026.jpg) ![Example Output in Task](https://user-images.githubusercontent.com/407485/244006916-c2166d39-760a-4676-817c-acb33951d9cc.jpg) #obsidian #obsidian-md #obsidian-templater #templater #templater-script #tasks #obsidian-task