ttrpg-convert-cli

Utility to convert JSON data (for content you own) from 5etools or pf2etools into Obsidian-friendly Markdown.

APACHE-2.0 License

Stars
181
Committers
17

Bot releases are visible (Hide)

ttrpg-convert-cli - Release 2.1.0

Published by github-actions[bot] about 1 year ago

✨ New template documentation is available in docs. Content is generated from javadoc in the various *.qute packages (for template-accessible fields and methods). It may not be complete.. PRs to improve it are welcome.

πŸ”₯ 2.1.0: File name and path changes, template docs and attribute changes

  1. πŸ”₯ Variant rules include the source in the file name: this avoids duplicates (and there were some).
  2. πŸ”₯ 5eTools changed the classification for some creatures, which moves them in the bestiary. Specifically: the Four-armed troll is a giant (and not an npc), a river serpent is a monstrosity rather than a beast, and ogre skeletons and red dracoliches are both undead.
  3. πŸ”₯ Better support for table rendering has superceded dedicated/hand-tended random name tables. All of the tables are still present, just in different units more directly related to source material.
  4. πŸ”₯ Change to monster template attributes: Legendary group attributes have been simplified to name and desc, just like other traits. See the default monster template for an example.

If you use the Templater plugin, you can use a templater script to rename files in your vault before merging with freshly generated content. View the contents of the template before running it, and adjust parameters at the top to match your Vault.

Summary of changes

  • d13d8e6 🎨 πŸ“ Minimize formatting changes; doc fixes
  • 789e17c ⬆️ Pf2e sources
  • 3bd5965 🩹 Minor Fixes to (S)CSS
  • 0736c39 πŸ› Use pf2-note in ability template. Fixes #184
  • 12744aa πŸ›Fix yaml traits. Resolves #185
  • 5a497df πŸ› πŸ“ 🎨 Pf2e fixes and template attribute docs
  • 4fd563b 🎨 πŸ“ template attribute docs for 5eTools
  • 1ae90b6 🎨 Consolidate conversion to anchor tags
  • 1253f8d πŸ“ attribute docs for base/reusable template data
  • d1d2646 ⬆️ new 5eTools sources
  • 322bd78 πŸ› Fix references to parseState and DICE_ROLLER
  • d1433e9 πŸ› fix regex for testing markdown links
  • 7355adc πŸ› consistency w/ source attribute
  • 34e7d4b ✨ Doclet for attribute javadoc as markdown
  • 1d0bce4 πŸ› Missing style for deity images
  • dbad1a7 ♻️ Qute constructor args; File suffix construction
  • e9ec8a0 πŸ”Š cli output tweaks
  • 8451066 ♻️ Move SourceAndPage; update source tracking
  • d9d22db 🎨 Whitespace on tools5e notes
  • a56871c πŸ› Fix bonds, flaws, and traits tables
  • cc9bb92 🚚 Update migration template
  • 3c9de31 🎨 Make YAML output less noisy
  • 5bc40d6 πŸ› Fix chance rendering
  • 8de813f 🩹 Remove sourcemap comment (stripped by build)
  • 710dcde πŸ› Fix copied monster traits
  • babf9e6 πŸ› replace text in variant name
  • cde9c84 πŸ› Consistent insertion of statblock anchor
  • 1950173 Pf2e: Activate instead of Activation
  • 2079fad Pf2e: components are always a list in input data
  • dee38a9 Pf2e: Fix ability admonition
  • 4f4b0d1 Pf2e: Add Item Variants + Crafting Requirements to main item
  • bd3c8a3 🎨 Refactored icon styling to account for recent changes.
  • a4ecd86 🩹 Added missing Trait Styling
  • 93e6595 πŸ› fix traits; fix monster spellcasting name
  • 5e4fe80 🩹 Added missing Trait Styling
  • 35f4e08 πŸ› native does not like string matches
  • a700392 ✨vaultPath for templates
  • ae3cefd πŸ› register hazard/reward for reflection
  • e9719ac 🧹 Clean up
  • cc0c19d πŸ› Pf2e: Fix trait indexing & gmg book source
  • 26105d2 ✨ ♻️ πŸ› 5e traps, hazards, rewards, tables; fixes
  • 7741a7c βœ¨β™»οΈπŸŽ¨πŸ“ PF2 Statblock/Admonition; instructions
  • ed092cb Fix of traits, diseases and skills styles
  • fbb6f3b 🎨 ✨Add title to pf2e trait links. Resolves #167
  • 0d4211f πŸ”Š capture parse error
  • 8f368ea 🎨 ♻️ 5e tools: rename, simplify notes/tables
  • 76de597 πŸ—ƒοΈ Update 5e tools data
  • 67f126b 🎨 All 5e types in the index; source in page state
  • d90a615 βœ… Updated 5e & pf2e tests
  • 4a3d84c πŸ› Missing 5e SRD background
  • d150b46 πŸ› Lawful Good is better than Lawful Goo
  • 4db5e98 πŸ› Fix trait links and references; Fixes #165
  • 3649e5d ⬆️ Add missing pf2e source

Contributors

We'd like to thank the following people for their contributions:
Caedis, Sigrunixia, АлСксСй Вуровский

ttrpg-convert-cli - Release 2.0.5

Published by github-actions[bot] over 1 year ago

πŸ”₯ As of 2.0.0, D&D 5e subclasses now use the source of the subclass in the file name. If you are updating from 1.x and use the Templater plugin, you can use a templater script to rename files in your vault before merging with freshly generated content. View the contents of the template before running it, and adjust parameters at the top to match your Vault.

Summary of changes

  • af03686 πŸ› Fix spell class list (ignore excluded classes)
  • ceb0551 πŸ§Ήβœ¨πŸ› Support homebrew sources
  • f4bba7e πŸ› Separate 5e and pf2e example config. Fixes #160
  • 2550e87 πŸ› Format compound entries. Resolves #159
  • 4133b65 πŸ› Fix class feature progression. Resolves #159
  • f88d1e0 πŸ“ Update README.md, create README-WINDOWS.md
ttrpg-convert-cli - Release 2.0.4

Published by github-actions[bot] over 1 year ago

πŸ”₯ As of 2.0.0, D&D 5e subclasses now use the source of the subclass in the file name. If you are updating from 1.x and use the Templater plugin, you can use a templater script to rename files in your vault before merging with freshly generated content. View the contents of the template before running it, and adjust parameters at the top to match your Vault.

Summary of changes

  • 38f6136 Update README.md
  • d7dac07 πŸ› Handle {@style..} tags
ttrpg-convert-cli - Release 2.0.3

Published by github-actions[bot] over 1 year ago

πŸ”₯ As of 2.0.0, D&D 5e subclasses now use the source of the subclass in the file name. If you are updating from 1.x and use the Templater plugin, you can use a templater script to rename files in your vault before merging with freshly generated content. View the contents of the template before running it, and adjust parameters at the top to match your Vault.

Summary of changes

  • ff076ea πŸ› Fix trait links. Fixes #149
  • 91078f5 πŸ› Use token image vault path in yaml body. Fixes #153
ttrpg-convert-cli - Release 2.0.2

Published by github-actions[bot] over 1 year ago

πŸ”₯ As of 2.0.0, D&D 5e subclasses now use the source of the subclass in the file name. If you are updating from 1.x and use the Templater plugin, you can use a templater script to rename files in your vault before merging with freshly generated content. View the contents of the template before running it, and adjust parameters at the top to match your Vault.

Summary of changes

  • 2649b4f ✏️ misc fixes & cleanup
  • 4bbec3a 🎨 Style for inline images
  • 43867ad ✨ Images embedded in text
ttrpg-convert-cli - Release 2.0.1

Published by github-actions[bot] over 1 year ago

πŸ”₯ As of 2.0.0, D&D 5e subclasses now use the source of the subclass in the file name. If you are updating from 1.x and use the Templater plugin, you can use a templater script to rename files in your vault before merging with freshly generated content. View the contents of the template before running it, and adjust parameters at the top to match your Vault.

Summary of changes

  • 5d1d90c πŸ› Preserve behavior with configured leading slash
  • 40db5af πŸ“ Update CONTRIBUTING.md
  • 3593591 πŸ“ Link to Java install instructions
  • a95ca37 🎨 flowchart admonition arrows
  • f220ec5 🎨 Skill admonition colors
ttrpg-convert-cli - Release 2.0.0

Published by github-actions[bot] over 1 year ago

πŸ”₯ File name and path changes, and styles!

  1. πŸ”₯ A leading slash (/) is no longer used at the beginning of compendium and root paths. This should allow you to move these two directories around more easily.

    • I recommend that you keep the compendium and rules sections together as big balls of mud.
    • If you do want to further move files around, do so from within obsidian, so obsidian can update its links.
  2. πŸ”₯ D&D 5e subclasses now use the source of the subclass in the file name.

    If you use the Templater plugin, you can use a templater script to rename files in your vault before merging with freshly generated content. View the contents of the template before running it, and adjust parameters at the top to match your Vault.

  3. 🎨 CSS styles for D&D 5e and Pathfinder are now available in examples/css-snippets.

  4. πŸ“ Admonitions are also available for import:

    Note: admonitions-5e.json and other-admonitions.json use colors from CSS snippets to adjust for light and dark mode.

Summary of changes

  • 2233ebb 🎨 ✨ Revised admonition json, css for dnd5e & pf2
  • 193a1d9 πŸ› Fix pf2e book section naming and behavior in native mode
  • 0213994 ⬆️ Java 17
  • a5a92f2 πŸ› Compensate for unreleased pf2 updates
  • 1d32fe3 πŸ› windows path matching: fixes and bestiary links
  • 620437c πŸ”₯ Remove leading slash for compendium and rules
  • 59b2c2a πŸ”₯ Include subclass source in links
  • 4607df8 🎨 Use headings in monster descriptions
  • b7db1cd πŸ› Fix template caching. I mean it this time.
  • 971b7a3 πŸ› Fix exclusion of variant rules
  • cad3b9f 🎨 πŸ› Fix default sources
  • fd79b4a πŸ› Fix test error reporting

Contributors

We'd like to thank the following people for their contributions:
Sigrunixia

ttrpg-convert-cli - Release 1.2.0

Published by github-actions[bot] over 1 year ago

Summary of changes

  • 97f8f37 πŸ› Extraneous letter in names table header
  • 2fcf744 πŸ› Restore spell class/subclass lists; fix subclass index
  • 238cedf πŸ› Error handling
  • 573676e πŸ› Fix source/page references in notes
  • 8f4c360 πŸ› Fix subclass links
  • ff23e88 πŸ› Fix SRD Attunement and Weapon Properties
  • d876a47 πŸ› Fix template caching
  • d1e5a39 πŸ› Restore count of written files
  • 85f6eea πŸ› Ignore extraneous fields in Legendary Group
  • 86b26da Revise readme

Contributors

We'd like to thank the following people for their contributions:
Colin McLear

ttrpg-convert-cli - Release 1.1.2

Published by github-actions[bot] over 1 year ago

Summary of changes

  • 76f9b88 🎨 Admonition example
  • c114b44 πŸ› Remove backticks in yaml blocks. Resolves #130
  • bed11c8 πŸ› Fix prepend w/ blockquote
  • a8c09e3 πŸ› link resolution and validation
  • 0d0f674 ♻️ update 5etools [sub]class feature rendering
  • 6470f9e Consolidate approach to parse state, types, and sources
  • cc547c2 Add token image to fantasy statblocks
  • 62d0e4d πŸ“ Update README.md
  • 8c1dd90 Revise template discussion in README.
  • 3aefb0f (maint) fix css snippet links in README
  • a4c0175 ✨ Use dice roller in statblocks. Resolves #122
  • b8dda0a ♻️ Begin refactor common elements
  • 1504971 πŸ› 5etools: add optional features to class def
  • 129f7e0 🎨 Separate CLI / IT test output
  • 68b166b πŸ› Qute list syntax issues
  • 6717bca 🎨 iterable elements
  • a4be845 πŸ“ TTRPG CLI updates; Quarkus platform 3.0.1.Final
  • c4885d7 ⬆️ ✨Quarkus 3
  • de39cb0 🎨 tweak styles
  • d3c1a47 ⬆️ format changes and additional sources
  • 3a225e6 πŸ› Stringify/Join list of domains in spells
  • fdf9944 🚧 Common ObjectMapper init
  • 5f8369c πŸ“ Adjust pf2e callouts .. resolves #95
  • a4c88dd 🎨 h3 as top level w/in callouts

Contributors

We'd like to thank the following people for their contributions:
Colin McLear, Steve Axthelm

ttrpg-convert-cli - Release 1.1.1

Published by github-actions[bot] over 1 year ago

Summary of changes

  • d88d81e 🩹 Fixes.
  • 00f37b5 ✨ cards and decks
  • 9a778f1 πŸ”¨ Pf2eTools CI
  • 9e5f72f 🎨 🚧 Fix native mode; generic data blocks
  • 8f58a18 🚧 🎨 Damage types, clarify names
  • 54a92e1 🚧 Sorted tags
  • 03d5e21 🎨🚧 Pf2e items
  • d0e3afd 🚧 ✨ Pf2e items (armor, shields, weapons)
  • 63763b3 🚧 ✨ Pf2eItems (basics)
  • b5cabe3 πŸ› Standalone abilities, book references
  • beb61de ♻️ Simplify construction with types
  • 149ab50 🚧 🚜 Change behavior of ImageRef & some paths
  • 557f731 πŸ› Fix 5eTools build
  • 99c82f0 🚧 🚜 Hazards
  • 580820f ✨ Trait links, tags, and sources
  • 92c26ec 🚧 ✨ Backgrounds; src tag
  • d7999c9 πŸ› Fix 5etools build
  • 1958f2d ✨ CRB, book test, corrections
  • 2d5472f 🚧 πŸ› Name hashes; state for page numbers
  • 2abc839 🚧 🚜 Messages for file errors; tpl cleanup
  • ef2f79d 🚧 🚜 Clean up / fixes
  • 29a9ed4 🚧✨ Deities and their avatars
  • 390ae76 🚧🎨 Common embedded templates; simplify activity, etc.
  • 69f9ac4 ✨🚧 Domains (move list of source files to json)
  • 8becffe 🚧 Clarify start/rendering of embedded feat
  • 9dd487d ✨🚧 Fix inline ability; refine field value resolution
  • 6a0572a ✨🚧 Archetypes, inline feats and references
  • 006e4fe 🚧 ✨ Archetypes
  • 51ed3cd ✨ πŸ› Level effects; remove traits as tags
  • 703393e ✨ 🚧 Afflictions (inline template); tables; traits as links
  • b6f9209 🚧 ✨ Pf2e feats
  • ed47a67 ✨ 🚧 Pf2e Rituals
  • 87acd0d πŸ› Append non-default source to filename fpr pf2e
  • 63fc8c4 ✨ 🚧 P2fe Spells!
  • 8c7d4db ✨ 🚧 Partial spells
  • 05684f6 🚧 ✨ Trait index by category
  • 90c2511 ✨ 🚧 Links for conditions
  • a5aade6 🚧 πŸ“ Readme, examples
  • a702f16 🚧 βœ… ✨ pf2e traits
  • 92aefcd βœ… πŸ“ ✨ Clean up readme. Move example templates to a more obvious place
  • ccd0f9d βœ… 🚧 Pf2e actions, rules vs compendium, templates..
  • 37b7584 Update README.md
  • 0e857f3 ✨ πŸ”₯ More than 5etools...
  • b941add 🚧 ✨ Actions and glyphs
  • b1a88c1 ✨🚧 Skills/Actions for Pf2e
  • a92d807 ♻️ 🚧 Split templates by datasource
  • 7bc920e ♻️ Move srd check
  • c756bbf 🚧 Begin work on pf2e text parse
  • e87e696 βœ… ♻️ System configuration (global/system config)
  • 9658c3d βœ… ♻️ Rename 5etools JsonIndex
  • 171bfd3 ♻️ βœ… Consolidate compendium sources
  • 602fb46 βœ… ♻️ Restructure templates; Rename IndexTypes
  • 545c343 βœ… ♻️ Move CompendiumSources, QuteBase, IndexType
  • a5011fc βœ… ♻️ Restructure config; back to all tests passing
  • 0f41350 ♻️ rename 5etools package
  • 4e2b772 ♻️ Rename CLI class
  • 5f2f484 ♻️ package rename
  • aa9d93e 🎨 CSS: statblock in Initiative Tracker creature view
ttrpg-convert-cli - Release 1.1.0

Published by github-actions[bot] almost 2 years ago

New feature: Images for backgrounds, items, monsters, races, and spells

The conversion tool downloads fluff images into img directories within each type, e.g. backgrounds/img or bestiary/aberration/img. These images are unordered, and are not referenced in entry text. Templates must be modified to include them.

To display all images, you can do something like this:

{#each resource.fluffImages}![{it.caption}]({it.path})  
{/each}

Note that the line above ends with two spaces, which serves as a line break when you have strict line endings enabled. You may need something a little different to get things to wrap the way you want in the case that there are multiple images (which is infrequent for these types).

You can also use two separate blocks, such that the first image is used at the top of the document, and any others are included later:

{#if resource.fluffImages && resource.fluffImages.0 }
![{resource.fluffImages.0.caption}]({resource.fluffImages.0.path}#right)  
{/if}

...

{#each resource.fluffImages}{#if it_index != 0}![{it.caption}]({it.path}#center)  
{/if}{/each}

Notice the #right and #center anchor tags in the example above. The following CSS snippet defines formatting for two anchor tags: #right (which will float the image to the right) and #center (which will display the image as a centered block).

.json5e-background div[src$="#center"],
.json5e-item div[src$="#center"],
.json5e-monster div[src$="#center"],
.json5e-race div[src$="#center"],
.json5e-spell div[src$="#center"] {
  text-align: center;
}
.json5e-background div[src$="#center"] img,
.json5e-item div[src$="#center"] img,
.json5e-monster div[src$="#center"] img,
.json5e-race div[src$="#center"] img,
.json5e-spell div[src$="#center"] img {
  height: 300px;
}
.json5e-background div[src$="#right"],
.json5e-item div[src$="#right"],
.json5e-monster div[src$="#right"],
.json5e-race div[src$="#right"],
.json5e-spell div[src$="#right"] {
  float: right;
  margin-left: 5px;
}
.json5e-background div[src$="#right"] img,
.json5e-item div[src$="#right"] img,
.json5e-monster div[src$="#right"] img,
.json5e-race div[src$="#right"] img,
.json5e-spell div[src$="#right"] img {
  height: 300px;
}

.rendered-widget .admonition-statblock-parent,
.markdown-rendered .admonition-statblock-parent,
.markdown-preview-section .admonition-statblock-parent {
  clear: both;
}

Notes:

  • I recommend constraining the image height (rather than the width) in your CSS snippet for images.
  • The above snippet also adds a clear setting to the admonition parent. Some text descriptions are shorter than the constrained image height. Setting clear: both on admonition-parent ensures that images floated to the right do not impact the statblock display.
  • This configuration is in the compendium.css snippet.
  • There is an example for each type in the templates directory directory. Relevant file names start with images-.

Summary of changes

  • 8881e5f πŸ› Include subclass features. Resolves #79
  • b746c9c 🎨 Image template heading whitespace
  • 1cdc95d πŸ› Resolve template paths (no shell expansion)
  • 7d49006 ✨ Fluff images for items, races, backgrounds, spells, and monsters
  • 03e8a6f ⬆️ diceType -> diceExpression for names tables
  • 5d9ea7e ♻️ replace deprecated with method
  • ba7b435 ♻️ default images() method
ttrpg-convert-cli - Release 1.0.22

Published by github-actions[bot] almost 2 years ago

Summary of changes

  • bf7931b πŸ› Include srd resource in native image. Fixes #72
  • 4ce5288 πŸ› Fix unresolved deity links
  • d150e89 πŸ› Correct unresolved background links
  • d67f075 ⬆️ define MCV2DC
ttrpg-convert-cli - Release 1.0.21

Published by github-actions[bot] almost 2 years ago

Summary of changes

  • ff419cd πŸ› Consistent parsing of sources; Resolves #64
  • 054f4c4 πŸ› SRD/Basic sources, notes on attunement. Fixes #63
  • 3e72861 ⬆️ Add DSotDQ. Resolves #65
  • 1dcc1d6 πŸ› Prophetess Dran from AI moved to bestiary/npc
ttrpg-convert-cli - Release 1.0.20

Published by github-actions[bot] almost 2 years ago

Summary of changes

  • d151dce πŸ“ Notes about running binaries
  • 3784363 πŸ› Register additional data types for reflection. Resolves #58
  • af1f642 πŸ“ Tweak install instructions (minor)
ttrpg-convert-cli - Release 1.0.19

Published by github-actions[bot] almost 2 years ago

Summary of changes

  • 685f237 πŸ› Escape spaces in crosslinks
ttrpg-convert-cli - Release 1.0.18

Published by github-actions[bot] almost 2 years ago

Summary of changes

  • fd548d8 πŸ“ Instructions for using native binaries
  • 8f0592c βœ¨πŸ› Import/Templates in json; Fix msg for template error
ttrpg-convert-cli - Release 1.0.17

Published by github-actions[bot] almost 2 years ago

Binary releases!

You do not need to use Java or JBang to run the converter if you use one of the platform-specific binaries.
Download and extract the zip or tgz for your platform. A 5e-convert binary executable will be in the bin directory. Invoke this executable as noted in README.md.

For example:

  • Linux/Mac:

    ./bin/5e-convert --help
    
  • Windows:

    .\bin.\5e-convert.exe --help
    

Summary of changes

  • f0e6e91 πŸ“ CONTRIBUTING guide
  • 42b07dd πŸ› Resolve links to dmg races
  • 01a360f ✨ local compile to native
  • 2363e36 πŸ“ Add notes for 1.0.16 changes
ttrpg-convert-cli - Release 1.0.16

Published by github-actions[bot] almost 2 years ago

Text for changes to spells at higher levels is added to spells a little differently depending on how complicated the spell is.

Some spells effectively have subsections. Create or Destroy Water, from the PHB, has one subsection describing how water is created, and another describing how it is destroyed. In many layouts, there is just a bit of bold text to visually highlight this information. I've opted to make these sections (with a heading) instead, because you can then embed/transclude just the variant you want into your notes where that is relevant.

If a spell has sections, then "At Higher Levels" will be added as an additional section. Otherwise, it will be appended with At Higher Levels. as leading eyecatcher text.

The default spell template has also been amended. It will test for sections in the spell text, and if so, now inserts a ## Summary header above the Classes/Sources information, to ensure that the penultimate section can be embedded cleanly.

{#if resource.hasSections }
## Summary

{/if}
**Classes**: {resource.classes}

Summary of changes

  • 90f157d πŸ› Include higher level text for spells. Fixes #38
ttrpg-convert-cli - Release 1.0.15

Published by github-actions[bot] almost 2 years ago

401b4ce ✨ Support flowcharts using callouts. Resolves #31
e3390b2 Bump quarkus.platform.version from 2.13.2.Final to 2.13.3.Final
7a13a25 πŸ“ Add note about include support to README.md.
4be2321 ✨ Support optfeature (from ttp). Fixes #32
b319c34 πŸ› detect styled rows. Fixes #35
6e530fd πŸ› Always sign returned modifier. Fixes #34
fc90f03 πŸ“„ add download tag (for fun, no jitpack)
f97b032 πŸ“„ Fix links

ttrpg-convert-cli - Release 1.0.14

Published by github-actions[bot] about 2 years ago

As shown in monster2md-scores.txt, you can now access ability scores directly to achieve alternate layouts in templates, for example:

- STR: {resource.scores.str} `dice: 1d20 {resource.scores.strMod}`
- DEX: {resource.scores.dex} `dice: 1d20 {resource.scores.dexMod}` 
- CON: {resource.scores.con} `dice: 1d20 {resource.scores.conMod}` 
- INT: {resource.scores.int} `dice: 1d20 {resource.scores.intMod}` 
- WIS: {resource.scores.wis} `dice: 1d20 {resource.scores.wisMod}`
- CHA: {resource.scores.cha} `dice: 1d20 {resource.scores.chaMod}`

Summary of changes

  • 8bf3e72 πŸ”§ Constrain version replace in readme
  • 5e79849 ✨ Give template access to ability score elements
  • 35c60a0 πŸ”§ Fix autoupdate
  • 2bd654c Bump quarkus.platform.version from 2.13.1.Final to 2.13.2.Final