> [!kanban]+ [[Obsidian TTRPG Tutorials]] / [[Plugin Tutorials]] / [[TTRPG-Convert-CLI]] / [[TTRPG-Convert-CLI PF2e]] > - [[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]] This process can be used to quickly create notes for the Pathfinder 2e Community Enabled Content. ## Official Documentation The official Read-Me and associated content for this process can be found [HERE](https://github.com/ebullient/ttrpg-convert-cli). ### Support For support with the CLI system these are the best places to look. [Obsidian TTRPG Discord (Join this first)](https://discord.gg/8AF29UBUCa) > [Generic CLI Discussion](https://discord.com/channels/925322340995313686/1118630475313975367) ### Process Tracker This is a pretty lengthy process so I have added this checklist you can use to mark off the process as you go. - [ ] Download TTRG-Convert-CLI - [ ] Create Folder for CLI - [ ] Extract TTRG-Convert-CLI to Folder - [ ] Download GIT - [ ] Install GIT - [ ] Download Content - [ ] Run the CLI - [ ] Copy content into Vault - [ ] Restart Vault - [ ] Wait for Index to Complete - [ ] Install Admonitions - [ ] Install Admonitions JSON - [ ] Install Force Note View - [ ] Configure Force Note View - [ ] Install Fantasy Statblocks - [ ] Install Initiative Tracker - [ ] If you would like to move the content DO IT FROM INSIDE OBSIDIAN! ### Download the Latest Release of TTRPG-Convert-CLI I use Windows and therefore this tutorial is focussed on how to do the process using Windows. I dont have access to Linux or Apple. You can find the latest release here: https://github.com/ebullient/ttrpg-convert-cli/releases Find the latest release and scroll down to the section titled Assets. This is a list of files included in this release. As I am using Windows, I download the one with Windows in the file name. ![[Pasted image 20230820093235.png]] ### Create A Home for TTRPG-Convert-CLI Create a folder where the CLI is going to live. I have put mine in `C:\CLI\5eTools\` Inside this folder you need to extract the contents of the \*.zip we downloaded in the step above. The result should look like this. ![[Pasted image 20230820093446.png]] ### Install Git Git is an application that allows you to control Github using Command Prompts. Download Git from this site and complete the install. https://git-scm.com/downloads ### Download The Content You Intend To Use #### D&D 5e Open the folder you made above and navigate to the `bin` folder. **Note:** You can see I have additional folders in my `bin` folder. Do not worry. I have completed the process and therefore you should not expect to see them yet. Click in the `Address Bar` and type `cmd` and press `Enter`. This will open the Command Prompt from this location. This is an important step as the next process must be run from the folder where you want to download the site. Paste this into the Command Prompt. You can do this by Right-Clicking on the Command Prompt Window. ```` git clone https://github.com/Pf2eToolsOrg/Pf2eTools.git ```` Press Enter to commence the process. ![[NVIDIA_Share_wdRr9AfodD.gif]] From here it takes quite a bit of time. Basically the process is downloading a copy of the PF2eTools site onto your machine. Once the process is complete you should see a folder titled `Pf2eTools` inside of your `bin` folder. ![[Pasted image 20230820221132.png]] ### Run The CLI Open the folder you made above and navigate to the `bin` folder. Click in the `Address Bar` and type `cmd` and press `Enter`. This will open the Command Prompt from this location. Type `ttrpg-convert.exe -g pf2e --index -o dm Pf2eTools/data` and hit `Enter`. Wait for the process to complete. Note that this will only download the 5e SRD. > [!warning]+ What's Happening? > The CLI process is now running. It is converting the site you downloaded above into Markdown format and putting the notes in a new folder called `dm`. You can tell the process is complete when the command link prompt displays the folder path again. It should provide a summary of the notes that have been created. ![[NVIDIA_Share_lIXUovteD2.gif]] ### Move The Files Once the process is complete you can find the files inside the `dm` folder. You can now Copy and Paste these into your Obsidian vault. **IMPORTANT:** The folder and files MUST be pasted into your Parent Vault Folder. Do not put them into a sub-folder. Do not rename them. Do not move them... yet. ![[NVIDIA_Share_AS8GWPmVBU.gif]] You can now restart your Obsidian Vault. Obsidian will likely need some time to `Index` the new files. ![[Pasted image 20230820101035.png]] ### Setup Your Vault The notes are designed to use some additional elements such as plugins and \*.css files. Work through the steps below to ensure your vault is setup to use the new notes. #### Admonitions Install the [Admonitions Plugin](obsidian://show-plugin?id=obsidian-admonition). This plugin will enable some of the notes to display as indended. Now download the Admonition json files that you would like to use. - [admonitions-pf2e.json](https://raw.githubusercontent.com/ebullient/ttrpg-convert-cli/main/examples/admonitions-pf2e.json) for pf2e tools - [other-admonitions.json](https://raw.githubusercontent.com/ebullient/ttrpg-convert-cli/main/examples/other-admonitions.json) some additional css files that may be of interest. Save these files to your computer and then install them into the Admonitions plugin. `Obsidian > Settings > Community Plugins > Admonition > Options > Import Admonition(s) > Select Downloaded JSON file` #### Force Note View This is used to make Obsidian treat the generated notes as `read only`. Install the [Force Note View](obsidian://show-plugin?id=obsidian-view-mode-by-frontmatter) plugin and then configure it. `Obsidian > Settings > Community Plugins > Force Note View > Options > ` `- Ignore force view = Enable` `- Ignore open file = Enable` #### Fantasy Statblocks Some of the CLI templates use the [Fantasy Statblocks](obsidian://show-plugin?id=obsidian-5e-statblocks) plugin so install that. #### Initiative Tracker Some of the CLI templates use the [Initiative Tracker](obsidian://show-plugin?id=initiative-tracker) plugin so install that. #### Install CSS Snippets These snippets are optional but can improve the way the notes look. Download the [code as a zip file]( https://github.com/ebullient/ttrpg-convert-cli/archive/refs/heads/main.zip). This zip file contains some useful templates and css snippets. I have extracted this into the `C:\CLI\5eTools\bin` folder so that I can find them easily in the future. Check inside this folder: `C:\CLI\5eTools\bin\ttrpg-convert-cli-main\examples\css-snippets\` And you should find a number of \*.css files. Copy the ones you would like to use into your vault and then enable them ([[How To - Install Custom CSS]]) from `Obsidian > Settings > Appearance > CSS Snippets > Enable` `Vault\.obsidian\snippets\<copy here>` ### Advanced Configuration Ok so now that we have successfully used the CLI process... lets break it down to try and understand it a bit. We invoked the CLI with this command. This downloads the SRD content. `ttrpg-convert.exe -g pf2e --index -o dm Pf2eTools/data` #### Set the Game System `-g pf2e` The tool was originally designed for DnD5e. This settings tells the tool to use the pf2e Game System settings instead of DnD5e. #### Create Index Files `--index` This generates 2x \*.json files as part of the output. Basically files that list all of the ids for the notes that have been created. This can be useful when tweaking exclude and include rules. I have not documented this process however you should check the [Official Read-Me](https://github.com/ebullient/ttrpg-convert-cli) for further details. #### Change The Output Folder `-o dm` This is the output directory. You can change the folder name `dm` to something different if you like. #### Add Additional Sources `-s CRB,APG,B1,B2,B3` Adding this to the command line will add the PHB, DMG and SCAG notes to the process. Only use sources that you own and support content developers. You can find a list of sources [HERE](https://github.com/ebullient/ttrpg-convert-cli/blob/main/docs/sourceMap.md) > [!tip]- Source List > ## Source name mapping for Pf2eTools > Support content creators and **only include sources that you own**. > > | Abbreviation | Long name | > |--------------|-----------| > | AAWS | Azarketi Ancestry Web Supplement | > | AFoF | A Fistful of Flowers | > | APG | Advanced Player's Guide | > | AV0 | Abomination Vaults Player's Guide | > | AV1 | Abomination Vaults #1: Ruins of Gauntlight | > | AV2 | Abomination Vaults #2: Hands of the Devil | > | AV3 | Abomination Vaults #3: Eyes of Empty Death | > | AVH | Abomination Vaults Hardcover | > | AoA0 | Age of Ashes Player's Guide | > | AoA1 | Age of Ashes #1: Hellknight Hill | > | AoA2 | Age of Ashes #2: Cult of Cinders | > | AoA3 | Age of Ashes #3: Tomorrow Must Burn | > | AoA4 | Age of Ashes #4: Fires of the Haunted City | > | AoA5 | Age of Ashes #5: Against the Scarlet Triad | > | AoA6 | Age of Ashes #6: Broken Promises | > | AoE0 | Agents of Edgewatch Player's Guide | > | AoE1 | Agents of Edgewatch #1: Devil at the Dreaming Palace | > | AoE2 | Agents of Edgewatch #2: Sixty Feet Under | > | AoE3 | Agents of Edgewatch #3: All or Nothing | > | AoE4 | Agents of Edgewatch #4: Assault on Hunting Lodge Seven | > | AoE5 | Agents of Edgewatch #5: Belly of the Black Whale | > | AoE6 | Agents of Edgewatch #6: Ruins of the Radiant Siege | > | B1 | Bestiary | > | B2 | Bestiary 2 | > | B3 | Bestiary 3 | > | BB | Beginner Box | > | BL0 | Blood Lords Player's Guide | > | BL1 | Blood Lords #1: Zombie Feast | > | BL2 | Blood Lords #2: Graveclaw | > | BL3 | Blood Lords #3: Field of Maidens | > | BL4 | Blood Lords #4: The Ghouls Hunger | > | BL5 | Blood Lords #5: A Taste of Ashes | > | BL6 | Blood Lords #6: Ghost King's Rage | > | BotD | Book of the Dead | > | CFD | Critical Fumble Deck | > | CHD | Critical Hit Deck | > | CRB | Core Rulebook | > | DA | Dark Archive | > | EC0 | Extinction Curse Player's Guide | > | EC1 | Extinction Curse #1: The Show Must Go On | > | EC2 | Extinction Curse #2: Legacy of the Lost God | > | EC3 | Extinction Curse #3: Life's Long Shadows | > | EC4 | Extinction Curse #4: Siege of the Dinosaurs | > | EC5 | Extinction Curse #5: Lord of the Black Sands | > | EC6 | Extinction Curse #6: The Apocalypse Prophet | > | FRP0 | Fists of the Ruby Phoenix Player's Guide | > | FRP1 | Fists of the Ruby Phoenix #1: Despair on Danger Island | > | FRP2 | Fists of the Ruby Phoenix #2: Ready? Fight! | > | FRP3 | Fists of the Ruby Phoenix #3: King of the Mountain | > | FoP | The Fall of Plaguestone | > | G&G | Guns & Gears | > | GMG | Gamemastery Guide | > | GW0 | Gatewalkers Player's Guide | > | GW1 | Gatewalkers #1: The Seventh Arch | > | GW2 | Gatewalkers #2: They Watched the Stars | > | GW3 | Gatewalkers #3: Dreamers of the Nameless Spires | > | HPD | Hero Point Deck | > | LOACLO | Lost Omens: Absalom, City of Lost Omens | > | LOAG | Lost Omens: Ancestry Guide | > | LOCG | Lost Omens: Character Guide | > | LOGM | Lost Omens: Gods & Magic | > | LOGMWS | Lost Omens: Gods & Magic Web Supplement | > | LOIL | Lost Omens: Impossible Lands | > | LOKL | Lost Omens: Knights of Lastwall | > | LOL | Lost Omens: Legends | > | LOME | Lost Omens: The Mwangi Expanse | > | LOMM | Lost Omens: Monsters of Myth | > | LOPSG | Lost Omens: Pathfinder Society Guide | > | LOTG | Lost Omens: Travel Guide | > | LOTGB | Lost Omens: The Grand Bazaar | > | LOWG | Lost Omens: World Guide | > | LTiBA | Little Trouble in Big Absalom | > | Mal | Malevolence | > | NGD | Night of the Gray Death | > | OoA0 | Outlaws of Alkenstar Player's Guide | > | OoA1 | Outlaws of Alkenstar #1: Punks in a Powder Keg | > | OoA2 | Outlaws of Alkenstar #2: Cradle of Quartz | > | OoA3 | Outlaws of Alkenstar #3: The Smoking Gun | > | PFUM | PATHFINDER: FUMBUS! | > | QFF0 | Quest for the Frozen Flame Player's Guide | > | QFF1 | Quest for the Frozen Flame #1: Broken Tusk Moon | > | QFF2 | Quest for the Frozen Flame #2: Lost Mammoth Valley | > | QFF3 | Quest for the Frozen Flame #3: Burning Tundra | > | RoE | Rage of Elements | > | SaS | Shadows at Sundown | > | Sli | The Slithering | > | SoM | Secrets of Magic | > | SoT0 | Strength of Thousands Player's Guide | > | SoT1 | Strength of Thousands #1: Kindled Magic | > | SoT2 | Strength of Thousands #2: Spoken on the Song Wind | > | SoT3 | Strength of Thousands #3: Hurricane's Howl | > | SoT4 | Strength of Thousands #4: Secrets of the Temple-City | > | SoT5 | Strength of Thousands #5: Doorway to the Red Star | > | SoT6 | Strength of Thousands #6: Shadows of the Ancients | > | TV | Treasure Vault | > | TiO | Troubles in Otari | > | ToK | Threshold of Knowledge | #### Create A Config File Instead of writing the command each time, you can create a simple \*.json file that contains your configuration. Within the `bin` folder; right click and select `New > Text Document`. Rename and save the file as `dm-sources.json`. Inside the file copy the following: ```` { "from" : [ "CRB", "APG", "B1", "B2", "B3" ], "paths" : { "compendium" : "/compendium/", "rules" : "/compendium/rules/" } } ```` You can modify this to include the sources that you own. You can find a list of sources [HERE](https://github.com/ebullient/ttrpg-convert-cli/blob/main/docs/sourceMap.md). Under the `from` section add a new line for each book that you own and enter the [Source Code](https://github.com/ebullient/ttrpg-convert-cli/blob/main/docs/sourceMap.md) to the line. Replicating the format of the sources listed above. The `paths` section defines the sub-folders that the content will be created in. If you would like to change the name of the folders then you should do it here. See example below. ```` "paths" : { "compendium" : "/mechanics/", "rules" : "/mechanics/rules/" } ```` Save any changes to the \*.json file. You can now run the CLI process again with the following changes: Open the folder you made and navigate to the `bin` folder. Click in the `Address Bar` and type `cmd` and press `Enter`. This will open the Command Prompt from this location. Type `ttrpg-convert.exe -g pf2e --index -o dm -c dm-sources.json Pf2eTools/data` and hit `Enter`. The `-c dm-sources.json` tells the CLI process to use the `dm-sources.json` file for configuration. There is more you can do with the config file such as excluding types of content or including specific content. You should check the [Official Read-Me](https://github.com/ebullient/ttrpg-convert-cli) for further details.