Closed Schmiggolas closed 1 year ago
Working on it. Templates won't be able to handle these well, as they're inline with the text.
That was fast. Thanks!
Resolved by 43867ad3e9aa2d5f26c59575db2e470243969547
Try the snapshot? https://github.com/ebullient/ttrpg-convert-cli#use-java-jar
I will once I've got the time to do so. Thanks a bunch!
Will wait for your feedback to close. =)
I just rebuilt and pulled some books. Looks amazing! π₯³ Thank you!! π
Note additional admonition type (gallery) here:
And updated styles for center/right/gallery: https://github.com/ebullient/ttrpg-convert-cli/blob/main/examples/css-snippets/dnd5e-compendium.css
Unfortunately the cli crashes for me when running it with my setup that worked before. Looks like it breaks while while processing the images in my template. I included the log and one of the templates that causes the crash below.
Before updating to the snapshot version I was running 2.01, just FYI.
``` io.quarkus.qute.TemplateException at io.quarkus.qute.CompletedStage.get(CompletedStage.java:48) at io.quarkus.qute.MultiResultNode.process(MultiResultNode.java:20) at io.quarkus.qute.MultiResultNode.process(MultiResultNode.java:20) at io.quarkus.qute.TemplateImpl$TemplateInstanceImpl.lambda$renderData$5(TemplateImpl.java:233) at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859) at java.base/java.util.concurrent.CompletableFuture.uniWhenCompleteStage(CompletableFuture.java:883) at java.base/java.util.concurrent.CompletableFuture.whenComplete(CompletableFuture.java:2251) at java.base/java.util.concurrent.CompletableFuture.whenComplete(CompletableFuture.java:143) at io.quarkus.qute.TemplateImpl$TemplateInstanceImpl.renderData(TemplateImpl.java:227) at io.quarkus.qute.TemplateImpl$TemplateInstanceImpl.renderAsyncNoTimeout(TemplateImpl.java:218) at io.quarkus.qute.TemplateImpl$TemplateInstanceImpl.render(TemplateImpl.java:143) at dev.ebullient.convert.io.Templates.render(Templates.java:69) at dev.ebullient.convert.io.Templates_ClientProxy.render(Unknown Source) at dev.ebullient.convert.io.MarkdownWriter.doWrite(MarkdownWriter.java:86) at dev.ebullient.convert.io.MarkdownWriter.writeFiles(MarkdownWriter.java:66) at dev.ebullient.convert.tools.dnd5e.Json2MarkdownConverter.writeFiles(Json2MarkdownConverter.java:85) at dev.ebullient.convert.tools.dnd5e.Json2MarkdownConverter.writeAll(Json2MarkdownConverter.java:34) at dev.ebullient.convert.tools.dnd5e.Json2MarkdownConverter.writeAll(Json2MarkdownConverter.java:22) at dev.ebullient.convert.RpgDataConvertCli.call(RpgDataConvertCli.java:230) at dev.ebullient.convert.RpgDataConvertCli.call(RpgDataConvertCli.java:39) at picocli.CommandLine.executeUserObject(CommandLine.java:2041) at picocli.CommandLine.access$1500(CommandLine.java:148) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461) at picocli.CommandLine$RunLast.handle(CommandLine.java:2453) at picocli.CommandLine$RunLast.handle(CommandLine.java:2415) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273) at picocli.CommandLine$RunLast.execute(CommandLine.java:2417) at dev.ebullient.convert.RpgDataConvertCli.executionStrategy(RpgDataConvertCli.java:239) at picocli.CommandLine.execute(CommandLine.java:2170) at dev.ebullient.convert.RpgDataConvertCli.run(RpgDataConvertCli.java:259) at dev.ebullient.convert.RpgDataConvertCli_ClientProxy.run(Unknown Source) at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:130) at io.quarkus.runtime.Quarkus.run(Quarkus.java:71) at io.quarkus.runtime.Quarkus.run(Quarkus.java:44) at io.quarkus.runner.GeneratedMain.main(Unknown Source) Caused by: io.quarkus.qute.TemplateException: Rendering error: Property "title" not found on the base object "dev.ebullient.convert.qute.ImageRef" in expression {first.title} at io.quarkus.qute.TemplateException$Builder.build(TemplateException.java:169) at io.quarkus.qute.EvaluatorImpl.propertyNotFound(EvaluatorImpl.java:247) at io.quarkus.qute.EvaluatorImpl.resolve(EvaluatorImpl.java:201) at io.quarkus.qute.EvaluatorImpl.lambda$resolve$4(EvaluatorImpl.java:211) at io.quarkus.qute.CompletedStage.thenCompose(CompletedStage.java:232) at io.quarkus.qute.EvaluatorImpl.resolve(EvaluatorImpl.java:208) at io.quarkus.qute.EvaluatorImpl.resolveReference(EvaluatorImpl.java:128) at io.quarkus.qute.EvaluatorImpl.lambda$resolveReference$2(EvaluatorImpl.java:132) at io.quarkus.qute.CompletedStage.thenCompose(CompletedStage.java:232) at io.quarkus.qute.EvaluatorImpl.resolveReference(EvaluatorImpl.java:132) at io.quarkus.qute.EvaluatorImpl.evaluate(EvaluatorImpl.java:87) at io.quarkus.qute.ResolutionContextImpl$ChildResolutionContext.evaluate(ResolutionContextImpl.java:87) at io.quarkus.qute.ExpressionNode.resolve(ExpressionNode.java:34) at io.quarkus.qute.SectionNode$SectionResolutionContextImpl.execute(SectionNode.java:223) at io.quarkus.qute.SectionHelper$SectionResolutionContext.execute(SectionHelper.java:56) at io.quarkus.qute.SetSectionHelper.lambda$resolve$1(SetSectionHelper.java:49) at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859) at java.base/java.util.concurrent.CompletableFuture.uniWhenCompleteStage(CompletableFuture.java:883) at java.base/java.util.concurrent.CompletableFuture.whenComplete(CompletableFuture.java:2251) at java.base/java.util.concurrent.CompletableFuture.whenComplete(CompletableFuture.java:143) at io.quarkus.qute.SetSectionHelper.resolve(SetSectionHelper.java:44) at io.quarkus.qute.SectionNode.resolve(SectionNode.java:53) at io.quarkus.qute.SectionNode.resolve(SectionNode.java:58) at io.quarkus.qute.SectionNode$SectionResolutionContextImpl.execute(SectionNode.java:219) at io.quarkus.qute.IfSectionHelper$SingletonContext.lambda$resolve$0(IfSectionHelper.java:68) at io.quarkus.qute.CompletedStage.thenCompose(CompletedStage.java:232) at io.quarkus.qute.IfSectionHelper$SingletonContext.resolve(IfSectionHelper.java:64) at io.quarkus.qute.IfSectionHelper.resolve(IfSectionHelper.java:45) at io.quarkus.qute.SectionNode.resolve(SectionNode.java:53) at io.quarkus.qute.SectionNode.resolve(SectionNode.java:58) at io.quarkus.qute.SectionNode$SectionResolutionContextImpl.execute(SectionNode.java:223) at io.quarkus.qute.SectionHelper$SectionResolutionContext.execute(SectionHelper.java:46) at io.quarkus.qute.Parser$1.resolve(Parser.java:1247) at io.quarkus.qute.SectionNode.resolve(SectionNode.java:53) at io.quarkus.qute.SectionNode.resolve(SectionNode.java:58) ... 27 more ```
--- obsidianUIMode: preview cssclass: json5e-monster statblock: inline statblock-link: "#^statblock" {#if resource.tags } tags: {#for tag in resource.tags} - {tag} {/for} {/if} aliases: ["{resource.name}"] --- # {resource.name} *Source: {resource.source}* {#if resource.description } {resource.description} {#each resource.fluffImages}{#if it_index != 0 } ![{it.title}]({it.vaultPath}#center) {/if}{/each} {#else} {#each resource.fluffImages} ![{it.title}]({it.vaultPath}#center) {/each} {/if} ```statblock {resource.5eStatblockYaml} ``` ^statblock {#if resource.environment } ## Environment {resource.environment} {/if}
Looks like it breaks while while processing the images in my template. I included the log and one of the templates that causes the crash below.
Thanks for the example template & exception. I use the same/similar field, and did not have that issue, but I'll try again to make sure.
As an aside, you'll want to double check how you're including the images & description in the template above, as I think you drop the first image if a description is present. The reference template for images tries to split things: the first image, then the description, then the rest of the images (if there is more than one).
{#if resource.description }
{#if resource.fluffImages && resource.fluffImages.size > 0 }{#let first=resource.fluffImages.get(0)}
![{first.title}]({first.vaultPath}#right)
{/let}{/if}
{resource.description}
{#each resource.fluffImages}{#if it_index != 0 }
![{it.title}]({it.vaultPath}#center)
{/if}{/each}
{#else}
{#each resource.fluffImages}
![{it.title}]({it.vaultPath}#center)
{/each}
{/if}
If you want to show all images after the description, you can simplify:
{#if resource.description }
{resource.description}
{/if}
{#each resource.fluffImages}
![{it.title}]({it.vaultPath}#center)
{/each}
(mess with whitespace before/after as you wish)
Thanks you for fixing my template while you're at it lol π
Unfortunately I still get the same error.
I removed all templates except one to narrow it down, but it still fails:
--- obsidianUIMode: preview cssclass: json5e-monster statblock: inline statblock-link: "#^statblock" {#if resource.tags } tags: {#for tag in resource.tags} - {tag} {/for} {/if} aliases: ["{resource.name}"] --- # {resource.name} *Source: {resource.source}* {#each resource.fluffImages} ![{it.title}]({it.vaultPath}#center) {/each} {#if resource.description } {resource.description} {/if} ```statblock {resource.5eStatblockYaml} ``` ^statblock {#if resource.environment } ## Environment {resource.environment} {/if}
The template should be fine like that, no?
This is the full log of the tool, not just the exception. Maybe something else is broken?
``` Γ£à finished reading config. ΓΓ β Reading Y:\Repositories\5etools-tooling\5etools\data ΓΓ β Reading Y:\Repositories\5etools-tooling\config.json Γ£à finished reading data. ΒΖΓΆΒ© Source KftGV is unknown ΒΖΓΆΒ© Source HAT-LMI is unknown ΒΖΓΆΒ© Source MisMV1 is unknown ΒΖΓΆΒ© Source MCV3MC is unknown ΒΖΓΆΒ© Source HAT-TG is unknown ΒΖΓΓ Writing files to Y:\Repositories\5etools-tooling ΒΖΓΈΓ¦ Unknown entry type in sources[monster|sea hag|mm]: 179 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|diderius|rot]: 229 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|vampire|mm]: 297 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|ancient emerald dragon|ftd]: 196 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|demilich|mm]: 48 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|juiblex|mpmm]: 160 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|adult deep dragon|ftd]: 174 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|faerie dragon (green)|mm]: 118 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|vampire spellcaster|mm]: 297 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|lich|mm]: 202 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|ancient red dragon|mm]: 98 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|adult sapphire dragon|ftd]: 215 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|illithilich|vgm]: 172 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|death tyrant|mm]: 29 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|aboleth|mm]: 13 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|sea fury|egw]: 299 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|ancient amethyst dragon|ftd]: 160 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|adult gold dragon|mm]: 114 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|green hag|mm]: 177 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|morkoth|mpmm]: 186 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|storm giant quintessent|mpmm]: 235 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|graz'zt|mpmm]: 148 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|yeenoghu|mpmm]: 270 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|ancient moonstone dragon|ftd]: 212 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|ki-rin|mpmm]: 162 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|ancient dragon turtle|ftd]: 191 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|ancient silver dragon|mm]: 117 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|gynosphinx|mm]: 281 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|faerie dragon (indigo)|mm]: 118 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|vampire warrior|mm]: 297 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|morgantha|cos]: 178 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|orcus|mpmm]: 204 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|faerie dragon (blue)|mm]: 118 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|adult red dragon|mm]: 98 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|adult brass dragon|mm]: 105 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|night hag|mm]: 178 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|drow matron mother|mpmm]: 104 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|adult bronze dragon|mm]: 108 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|ancient blue dragon|mm]: 91 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|oracs the enduring|egw]: 88 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|mummy lord|mm]: 229 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|zuggtmoy|mpmm]: 281 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|faerie dragon (violet)|mm]: 118 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|baphomet|mpmm]: 58 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|ancient bronze dragon|mm]: 108 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|adult blue dragon|mm]: 91 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|adult copper dragon|mm]: 112 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|ancient topaz dragon|ftd]: 221 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|adult white dragon|mm]: 101 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|balhannoth|mpmm]: 55 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|ancient copper dragon|mm]: 112 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|ancient sapphire dragon|ftd]: 215 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|adult green dragon|mm]: 94 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|strahd von zarovich|cos]: 240 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|unicorn|mm]: 294 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|elder brain|mpmm]: 120 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|adult topaz dragon|ftd]: 221 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|lorry wanwillow|dsotdq]: 297 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|adult crystal dragon|ftd]: 171 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|zariel|mpmm]: 280 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|adult silver dragon|mm]: 117 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|exethanter|cos]: 202 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|ancient white dragon|mm]: 101 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|felgolos|skt]: 108 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|ancient black dragon|mm]: 88 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|fraz-urb'luu|mpmm]: 129 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|ancient crystal dragon|ftd]: 171 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|runara|dosi]: 108 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|geryon|mpmm]: 136 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|adult red dracolich|tce]: 98 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|beholder|mm]: 28 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|adult amethyst dragon|ftd]: 160 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|isendraug|skt]: 101 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|demogorgon|mpmm]: 90 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|klauth|skt]: 98 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|cryovain|skt]: 101 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|karkethzerethzerus, the sable despoiler|egw]: 142 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|githzerai anarch|mpmm]: 142 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|kraken|mm]: 197 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|androsphinx|mm]: 281 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|ancient brass dragon|mm]: 105 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|iymrith|skt]: 91 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|ancient deep dragon|ftd]: 174 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|adult black dragon|mm]: 88 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|adult blue dracolich|mm]: 91 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|adult emerald dragon|ftd]: 196 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|ancient deep crow|ai]: 211 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|ancient gold dragon|mm]: 114 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|merrenoloth|mpmm]: 180 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|ancient green dragon|mm]: 94 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|claugiyliamatar|skt]: 94 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|slarkrethel|skt]: 197 ΒΖΓΈΓ¦ Unknown entry type in sources[monster|adult moonstone dragon|ftd]: 212 io.quarkus.qute.TemplateException at io.quarkus.qute.CompletedStage.get(CompletedStage.java:48) at io.quarkus.qute.MultiResultNode.process(MultiResultNode.java:20) at io.quarkus.qute.MultiResultNode.process(MultiResultNode.java:20) at io.quarkus.qute.TemplateImpl$TemplateInstanceImpl.lambda$renderData$5(TemplateImpl.java:233) at io.quarkus.qute.CompletedStage.whenComplete(CompletedStage.java:268) at io.quarkus.qute.TemplateImpl$TemplateInstanceImpl.renderData(TemplateImpl.java:227) at io.quarkus.qute.TemplateImpl$TemplateInstanceImpl.renderAsyncNoTimeout(TemplateImpl.java:218) at io.quarkus.qute.TemplateImpl$TemplateInstanceImpl.render(TemplateImpl.java:143) at dev.ebullient.convert.io.Templates.render(Templates.java:69) at dev.ebullient.convert.io.Templates_ClientProxy.render(Unknown Source) at dev.ebullient.convert.io.MarkdownWriter.doWrite(MarkdownWriter.java:86) at dev.ebullient.convert.io.MarkdownWriter.writeFiles(MarkdownWriter.java:66) at dev.ebullient.convert.tools.dnd5e.Json2MarkdownConverter.writeFiles(Json2MarkdownConverter.java:85) at dev.ebullient.convert.tools.dnd5e.Json2MarkdownConverter.writeAll(Json2MarkdownConverter.java:34) at dev.ebullient.convert.tools.dnd5e.Json2MarkdownConverter.writeAll(Json2MarkdownConverter.java:22) at dev.ebullient.convert.RpgDataConvertCli.call(RpgDataConvertCli.java:230) at dev.ebullient.convert.RpgDataConvertCli.call(RpgDataConvertCli.java:39) at picocli.CommandLine.executeUserObject(CommandLine.java:2041) at picocli.CommandLine.access$1500(CommandLine.java:148) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461) at picocli.CommandLine$RunLast.handle(CommandLine.java:2453) at picocli.CommandLine$RunLast.handle(CommandLine.java:2415) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273) at picocli.CommandLine$RunLast.execute(CommandLine.java:2417) at dev.ebullient.convert.RpgDataConvertCli.executionStrategy(RpgDataConvertCli.java:239) at picocli.CommandLine.execute(CommandLine.java:2170) at dev.ebullient.convert.RpgDataConvertCli.run(RpgDataConvertCli.java:259) at dev.ebullient.convert.RpgDataConvertCli_ClientProxy.run(Unknown Source) at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:130) at io.quarkus.runtime.Quarkus.run(Quarkus.java:71) at io.quarkus.runtime.Quarkus.run(Quarkus.java:44) at io.quarkus.runner.GeneratedMain.main(Unknown Source) Caused by: io.quarkus.qute.TemplateException: Rendering error: Property "title" not found on the base object "dev.ebullient.convert.qute.ImageRef" in expression {it.title} at io.quarkus.qute.TemplateException$Builder.build(TemplateException.java:169) at io.quarkus.qute.EvaluatorImpl.propertyNotFound(EvaluatorImpl.java:247) at io.quarkus.qute.EvaluatorImpl.resolve(EvaluatorImpl.java:201) at io.quarkus.qute.EvaluatorImpl.lambda$resolve$4(EvaluatorImpl.java:211) at io.quarkus.qute.CompletedStage.thenCompose(CompletedStage.java:232) at io.quarkus.qute.EvaluatorImpl.resolve(EvaluatorImpl.java:208) at io.quarkus.qute.EvaluatorImpl.resolveReference(EvaluatorImpl.java:128) at io.quarkus.qute.EvaluatorImpl.lambda$resolveReference$2(EvaluatorImpl.java:132) at io.quarkus.qute.CompletedStage.thenCompose(CompletedStage.java:232) at io.quarkus.qute.EvaluatorImpl.resolveReference(EvaluatorImpl.java:132) at io.quarkus.qute.EvaluatorImpl.evaluate(EvaluatorImpl.java:87) at io.quarkus.qute.ResolutionContextImpl$ChildResolutionContext.evaluate(ResolutionContextImpl.java:87) at io.quarkus.qute.ExpressionNode.resolve(ExpressionNode.java:34) at io.quarkus.qute.SectionNode$SectionResolutionContextImpl.execute(SectionNode.java:223) at io.quarkus.qute.SectionHelper$SectionResolutionContext.execute(SectionHelper.java:56) at io.quarkus.qute.LoopSectionHelper.nextElement(LoopSectionHelper.java:127) at io.quarkus.qute.LoopSectionHelper.lambda$resolve$0(LoopSectionHelper.java:56) at io.quarkus.qute.CompletedStage.thenCompose(CompletedStage.java:232) at io.quarkus.qute.LoopSectionHelper.resolve(LoopSectionHelper.java:45) at io.quarkus.qute.SectionNode.resolve(SectionNode.java:53) at io.quarkus.qute.SectionNode.resolve(SectionNode.java:58) at io.quarkus.qute.SectionNode$SectionResolutionContextImpl.execute(SectionNode.java:223) at io.quarkus.qute.SectionHelper$SectionResolutionContext.execute(SectionHelper.java:46) at io.quarkus.qute.Parser$1.resolve(Parser.java:1247) at io.quarkus.qute.SectionNode.resolve(SectionNode.java:53) at io.quarkus.qute.SectionNode.resolve(SectionNode.java:58) ... 27 more ```
Also this is my config:
``` { "from": [ "AAG", "AI", "CRCotN", "CoS", "DIP", "DMG", "DSotDQ", "DoSI", "EEPC", "EET", "EGW", "FTD", "KftGV", "LMoP", "MM", "MPMM", "MTF", "PHB", "RoT", "SCAG", "SKT", "SLW", "TCE", "VGM", "XGE", "SCREEN", "SCREENDUNGEONKIT", "SCREENWILDERNESSKIT" ], "paths": { "compendium": "Sources/", "rules": "Sources/rules/" }, "template": { "monster": "./templates/monster.txt" }, "convert": { "adventure": [ "DIP" ], "book": [ "DMG", "PHB", "SCAG", "TCE", "MM", "XGE", "FTD", "VGM" ] }, "useDiceRoller": true } ```
And I'm using a python script to automate everything. I'm just calling ttrpg-convert -o ./ 5etools/data/ ./config.json
```python import os from git import Repo import shutil print("Pulling 5etools repo") five_e_tools_repo = Repo("5etools") five_e_tools_repo.remotes[0].pull() print("Done") print("Deleting old sources") root = "Sources" subdirs = list() for item in os.listdir(root): joinedPath = os.path.join(root, item) if os.path.isdir(joinedPath): subdirs.append(joinedPath) for directory in subdirs: if ".git" in directory: continue shutil.rmtree(directory) print("Deleted " + directory) print("Done") print("Converting 5etools data to markdown") os.system("ttrpg-convert -o ./ 5etools/data/ ./config.json") print("Done") ```
Thank you for helping me this far. Any further help is also greatly appreciated!
//Edit: I'm running the tool through jbang (like you mentioned in your installation guide) using openjdk installed via scoop on a Windows machine. Just to complete the info-dump
blargh. I really need to do the thing to hide emoji for terminal/command lines that can't handle them. That said, the above suggests that the snapshot is older. I fixed "Source KftGV is unknown" awhile ago. I think the jitpack build is (or was) broken.
Will push a new release shortly.
Released.. try 2.0.2
Works like a charm! Thank you very much!
Hey, as the title suggests I think it would be cool if exported adventures and books included images in them.
Since most adventures contain maps of some kind and you kind of need them to play (since the book actually references locations on the maps) you would need to manually add them to every adventure page after it has been exported for the exported markdown to be useful.
Is this something that you would consider implementing or can you already do this with the templating engine?