> [!kanban]+ [[Obsidian TTRPG Tutorials]] / [[Plugin Tutorials]] / [[TTRPG-Convert-CLI]] / [[TTRPG-Convert-CLI Templates]] > - [[Getting Started]] > - ![[Pasted image 20230527003751.jpg|hsmall+wsmall+center]] > - [[Plugin Tutorials]] > - ![[Pasted image 20230527184201.jpg|hsmall+wsmall+center]] > - [[Community Supported Games]] > - ![[Pasted image 20230527001506.jpg|hsmall+wsmall+center]] > - [[Obsidian TTRPG Tutorials/Templates/Templates\|Templates]] > - ![[Pasted image 20230530220438.jpg|hsmall+wsmall+center]] > - [[Community and Support]] > - ![[Pasted image 20230527005303.jpg|hsmall+wsmall+center]] > [!infobox] > # ttrpg-convert-cli > ![[TTRPG-Convert-CLI 5e-20240203092033415.webp|cover hsmall]] > > Links | > ---| > ⚙️[Github Site](https://github.com/ebullient/ttrpg-convert-cli) | > 📄[Official Documentation](https://github.com/ebullient/ttrpg-convert-cli/blob/main/README.md)) | > 🗺️[Source Map](https://github.com/ebullient/ttrpg-convert-cli/blob/main/docs/sourceMap.md#source-name-mapping-for-5etools)) | > 🆘[Support](https://discord.com/channels/925322340995313686/1118630475313975367) 🐛[Raise Issue](https://github.com/ebullient/ttrpg-convert-cli/issues) | > 🍵[Support Ebulient with Coffee](https://www.buymeacoffee.com/ebullient) | > > Tutorials | > ---| > Step1: [[TTRPG-Convert-CLI 5e\|Setup]] | > Step2: [[TTRPG-Convert-CLI Config File\|Config File Creation]] | > **Step3: [[TTRPG-Convert-CLI Templates\|Templates]]** | > Step5: [[TTRPG-Convert-CLI Homebrew Content\|Homebrew Content]] | > Step 6: [[TTRPG-Convert-CLI Custom Content\|Custom Content]] | > Alternative: [TTRPG Convert CLI for MacOS](https://youtu.be/O66n448NG4M) | This page walks through how to use the CLI Templates. This will allow you to modify the output of the CLI tool. I personally find this handy for adding additional Properties to notes so that I can use the notes in other ways. ![](https://youtu.be/kisqHk2TQGQ) The template files are used to tell the CLI tool what the outputted notes should look like. The CLI tool uses the [Qute Templating Engine](https://quarkus.io/guides/qute) The official documentation for Templates can be found [HERE](https://github.com/ebullient/ttrpg-convert-cli#using-a-configuration-file). Please take the time to familiarise yourself with this documentation. The CLI tool gets updated all the time and as such that is a much better place to learn about the latest changes. ## Obtain the Templates Download the latest templates from the official [ttrpg-convert-cli Github Site](https://github.com/ebullient/ttrpg-convert-cli). Click the big green CODE button and select the download option. ![[TTRPG-Convert-CLI Templates-20231126120230405.webp]] Inside this zip folder is the 'ttrpg-convert-cli-main' folder. This folder needs to be copied inside of your CLI Bin folder. ![[TTRPG-Convert-CLI Templates-20231126120504313.webp]] ## Configure Your Configuration Folder Templates need to be called through a [[TTRPG-Convert-CLI Config File]]. Basically the config file needs to contain some additional lines of text that tell the CLI tool, I want you to use a Template and this is where you can find them. Here is an example of the text that needs to be added to your configuration file. ```` "template": { "background": "examples/templates/tools5e/images-background2md.txt", "monster": "examples/templates/tools5e/monster2md-scores.txt" } ```` Here is a basic example of a configuration file that has the template section added. ``` { "from": [ "DMG", "PHB", "LMoP", "MM" ], "paths": { "compendium": "2-Mechanics/CLI/", "rules": "2-Mechanics/CLI/rules" }, "template": { "background": "examples/templates/tools5e/images-background2md.txt", "monster": "examples/templates/tools5e/monster2md-scores.txt" }, "book": [ "PHB", "DMG", "MM" ] } } ```` Take careful note of the template file paths. The example above wont actually work in my vault. The file path needs to start from the `bin/` folder. In my setup the templates are in the following spot: `C:\CLI\5eTools\bin\ttrpg-convert-cli-main\examples\templates` As such the template section needs to look like this. ```` "template": { "background": "ttrpg-convert-cli-main/examples/templates/tools5e/images-background2md.txt", "monster": "ttrpg-convert-cli-main/examples/templates/tools5e/monster2md-scores.txt" } ```` You can change the name of the Template in the appropriate line. Below you can see some examples of the options that are available. ## Available Templates There are a few variations available with the included templates. You should practice running the CLI process with these different templates to gain a strong understanding of the process and the changes they make. | Template Name | Template Category | Notes | | ---- | ---- | ---- | | images-monster2md.txt | Bestiary | | | monster2md-scores.txt | Bestiary | | | monster2md-yamlStatblock-body.txt | Bestiary | My Preference | | monster2md-yamlStatblock-header.txt | Bestiary | | | images-object2md.txt | Bestiary | | | object2md-yamlStatblock-body.txt | Bestiary | | | object2md-yamlStatblock-header.txt | Bestiary | | | images-spell2md.txt | Spells | | | images-vehicle2md.txt | Vehicles | | | images-background2md.txt | Backgrounds | | | images-item2md.txt | Items | | | images-race2md.txt | Races | | # Create Your Own Templates You can create your own templates by creating a copy of an existing template and making changes. Make sure it has a unique name so that your changes are not overwritten when you update the CLI Tool in the future. ### My Monster Template In this example I have added some additional Properties to my monster notes. Things like statAC and statHP; NoteIcon, BestiaryType, SourceType and BookSource. ```` --- obsidianUIMode: preview cssclass: json5e-monster statblock: inline {#if resource.tags } tags: {#for tag in resource.tags} - {tag} {/for} {/if} aliases: ["{resource.name}"] NoteIcon: monster BestiaryType: ["{resource.fullType}"] SourceType: Bestiary BookSource: ["{resource.source}"] statAC: {resource.ac} statHP: {resource.hp} --- # [{resource.name}]({resource.vaultPath}) *Source: {resource.source}* {#if resource.description } {resource.description} {/if} ```statblock {resource.5eStatblockYaml} ``` ^statblock {#if resource.environment } ## Environment {resource.environment} {/if} ````