--- ## Overview & Motivation I recently began searching for a way to log and note interesting terms related to my ever growing list of notes in Obsidian. Initially, I tried compiling all thematically linked keywords into a single note. However, this list quickly became unwieldy, making upkeep, searching, and restructuring practically impossible. **Sample of one page list of keywords** ![[IMG-Obsidian Workflow - Automate Your Glossary with Templater and Dataview-20250624232752915.png|500]] </br> ## Solution Taking a different path, I opted to create separate notes for each word. This strategy offered the advantage of enhancing keywords with supplementary information such as illustrations, external references, and links to related notes within my Obsidian setup. Additionally, this method enables note previews within other notes. While it's a small manual task to add double brackets to words that exist within your Obsidian dictionary folder, this can significantly improve the readability of dense reading material by providing easy access to notes that can clarify terminology without having to navigate away from the current note. **Preview example of dictionary file** ![[IMG-Obsidian Workflow - Automate Your Glossary with Templater and Dataview-20250624232753055.gif|500]] </br> ## Setup ### **Obsidian Plug-ins** - Templater - Dataview (Optional) - QuickAdd (Optional) </br> ### **Folder Structure** Folder structure of my Obsidian Vault. Please adjust to your own vault setup. >[!important]- ASCII Tree of my Obsidian vault setup >```md >Vault >├── 00 - Maps of Content >├── 01 - Daily >├── 02 - General >├── 03 - Literature >├── 04 - People >├── 09 - Dictionary │> └── new dictionary word.md >└── 99 - Meta > └── templates > └── Template - Dictionary.md >``` </br> ### **Templater Setup** **Templater Settings** There isn’t much to setup, just direct Templater plug-in to your folder setup. Here’s an example of mine. ![[IMG-Obsidian Workflow - Automate Your Glossary with Templater and Dataview-20250624232753186.png|500]] </br> **Template Sample** Copy/Paste the [[Obsidian Workflow - Automate Your Glossary with Templater and Dataview#Appendix#Template Sample|Template Sample]] into your own template and template folder. Adjust folders as needed. </br> ### **QuickAdd Setup** Notice that the lightning bolt is selected. This helps to add the new QuickAdd template as a selection item with activating search or press `Ctrl+M` (or `Cmd+M` on macOS). ![[IMG-Obsidian Workflow - Automate Your Glossary with Templater and Dataview-20250624232753248.png|500]] </br> **QuickAdd template settings** The only things that really need to updated are the following: - Template Path - Choose folder when creating new note ![[IMG-Obsidian Workflow - Automate Your Glossary with Templater and Dataview-20250624232753397.png|500]] </br> ### **Dataview Setup** Here’s a Dataview query I created to display dictionary items ordered by name. This can be customized to show different types of tags if needed. >[!important]- Dataview query >```yaml >TABLE WITHOUT ID > file.name as "Term", > full_word as "Full Term", > summary as "Short Definition" >FROM "09 - Dictionary" >WHERE file.name != this.file.name >SORT file.name ASC >``` </br> **Query results** ![[IMG-Obsidian Workflow - Automate Your Glossary with Templater and Dataview-20250624232753483.png|500]] </br> ## Appendix ### **Template Sample** >[!tip]- Templater Dictionary Template >Copy/Paste this section into your dictionary template. >```js ><%* >/** > * Takes a word or acronym and formats it properly. > * It trims whitespace, replaces multiple spaces with a single space, > * Capitalizes the first letter of the first word, and ensures each word is capitalized. > * @description Formats a word or acronym for dictionary entry > * @param {string} word - The word or acronym to format > * @returns {string} - Edited word with proper formatting > */ >const editWord = (word) => { > return word > .trim() > .replace(/\s+/g, " ") > .replace(/^\w/, (c) => c.toUpperCase()) > .split(" ") > .map((w) => w.charAt(0).toUpperCase() + w.slice(1)) > .join(" "); >}; > >// Prompt for word or acronym >let word = await tp.system.prompt("Enter word or acronym "); >if (!word) { > await tp.system.exit("No word provided, exiting."); > return; >} >word = editWord(word); > >// Prompt for full word or skip >let full_word = await tp.system.prompt( > "Enter full word or press Enter to skip" >); >if (!full_word) { > full_word = word; >} else { > full_word = editWord(full_word); >} > >// Prompt for summary or skip >const summary = await tp.system.prompt( > "Enter a short definition or press Enter to skip" >); >if (!summary) { > summary = ""; >} > >// Prompt for tags >const tags = [ > "general", > "business", > "tech/homelab", > "tech/data_eng", > "tech/swe", > "tech/ai", > "tech/it_cloud", > "media", > "media/anime", > "media/manga", > "media/books", > "media/games", > "media/movies", > "media/tv", >]; >let input_tag = await tp.system.suggester(tags, tags, true, "Tags"); > >// Get current date >const date = tp.date.now("YYYY-MM-DD, hh:mm a"); > >// Create metadata >const metadata = `--- Date: ${date} word: ${word} full_word: ${full_word} summary: ${summary} tags: >- dictionary >- definition >- ${input_tag} > >--- > >${summary} > > >## Definition > > >## Etymology > > >## Part of Speech (POS) > > >## Pronunciation (IPA) > > >## Usage > > >### Synonyms > > >### Antonyms > > >### Related Terms > > >### Usage Notes > > >### Related Links > > >--- >**Linked Mentions** >\`\`\`dataview >LIST >FROM [[]] >WHERE file.name != this.file.name >SORT file.name DESC >\`\`\` > `; > >tR = metadata; >await tp.file.rename(word); > >%> >```