farling42 / fvtt-export-markdown Goto Github PK
View Code? Open in Web Editor NEWExports Journal Tree to Markdown
License: MIT License
Exports Journal Tree to Markdown
License: MIT License
Add support for defining a handlebars template file for each type of document (Actor, Item, JournalEntryPage, etc.)
I'm not sure if a different template is required for each sub-type of the basic document types (e.g. different types of Actor).
When launching Foundry v10 (build 303) on the Forge, and running 5e 2.3.1 I get the following errors:
Uncaught (in promise) LibWrapperPackageError: Error detected in module Markdown Exporter.
This is *not* a libWrapper bug.
Find information about this module here: https://github.com/farling42/fvtt-export-markdown
Ask the community for support:
- FoundryVTT Discord's #modules-troubleshooting channel: https://discord.gg/foundryvtt
- FoundryVTT Reddit: https://www.reddit.com/r/FoundryVTT
== Technical Details:
Detected by libWrapper.
Package ID= export-markdown
Error= Could not find target 'DocumentDirectory.prototype._getEntryContextOptions': Could not find root scope 'DocumentDirectory'.
at pe (libWrapper-api.js:135:10)
at de (libWrapper-api.js:152:19)
at 🎁register [as register] (libWrapper-api.js:525:14)
at Object.fn (export-markdown.js:565:16)
at #call (foundry.js:724:20)
at Hooks.callAll (foundry.js:681:17)
at Game.initialize (foundry.js:7810:11)
at 🎁call_wrapped [as call_wrapped] (libWrapper-wrapper.js:507:22)
at 🎁libWrapperInit (libWrapper-api.js:805:11)
This leads to multiple errors that "Document Directory is not defined."
(Sorry if this is the wrong place to post this, I am new to GitHub)
After parsing something into JSON or YAML, search for all valid UUID link syntax and convert to Obsidian link format.
Also do the same for journal pages.
Hi Farling,
I've been bashing my head against this one for about 2 weeks now. Nothing I try results in success so hoping you can help.
Note: I am not that technical, stumbling my way through this!
Objective: I am trying to create a Handlebar that can handle Monsters exporting from Foundry.
Issue: Some of the fields contain a \n. I have tried all sorts of solutions and created handlebars to handle the '\n' but so far I have had 0% at removing the breaklines. The breakline instantly breaks the rendering of the statblock in Obsidian.
Example Source Data
Blood Ooze.md
Example of Problematic Data
"system": {
"description": {
"gm": "",
"value": "<p><strong>Trigger</strong> The blood ooze is damaged by a piercing or slashing attack.</p>\n<hr />\n<p><strong>Effect</strong> The blood ooze forms a clot around the wound, reducing the damage taken by 5 (to a minimum of 0).</p>"
My current handlebar template:
Uploading PF2e_Foundry_Monster_Handlebar_v1.1_Foundry.md…
Pre-Requirements
I am using Kgar's More-Handlebars-Helpers in the process.
https://github.com/kgar/foundry-vtt-more-handlebars-helpers/releases/latest/download/module.json
Example Handlebar Template:
Here are some of the things I have tried.
raw: {{system.description.value}}
raw: {{{system.description.value}}}
version1: {{more-handlebars-helpers-replaceAll system.description.value '\n' ''}}
version1: {{more-handlebars-helpers-replaceAll system.description.value '\\n' ''}}
Version2: {{more-handlebars-helpers-replaceAll system.description.value '\\n' '' }}
Version2: {{{more-handlebars-helpers-replaceAll system.description.value '\\n' '' }}}
version1: {{more-handlebars-helpers-replaceAll system.description.value '</p>\n<hr />\n<p>' ''}}
Version4: {{more-handlebars-helpers-sanitize system.description.value}}
Version5: {{{more-handlebars-helpers-sanitize system.description.value}}}
I have tried this through both the JSON/CSV Importer on the Obsidian side and the Foundry Markdown Exporter. In both situations the handlebar does not seem to recognise the '\n' is there. I get different variations in the results above but in all cases the breakline exists in the output.
Example output:
version1: <p><strong>Trigger</strong> The blood ooze is damaged by a piercing or slashing attack.</p>
<hr />
<p><strong>Effect</strong> The blood ooze forms a clot around the wound, reducing the damage taken by 5 (to a minimum of 0).</p>
Version4: Trigger The blood ooze is damaged by a piercing or slashing attack.
Effect The blood ooze forms a clot around the wound, reducing the damage taken by 5 (to a minimum of 0).
Is it possible the \n is processed before the handlebar is applied? That's what it feels like.
Gday Farling,
I took this for a spin tonight. The format looks lovely and working really quite well.
I have noticed an issue with some of the linking though.
Here is an example where the link includes an expected folder structure. The link that the export is providing though is not matching the folder structure of the output and thus the link is broken.
The link in question is:
[[Abomination Vaults/Adventure Toolbox/The Roseguard|Roseguard]]
But the note is at the following:
F:\Obsidian\PF2e New*Abomination Vaults\Adventure Toolbox\Abomination Vaults\Adventure Toolbox*\The Roseguard
Looks like it is duplicating part of the folder structure.
Josh
Pressing the "Export to Compendium" button appears to do nothing, since there is no visible progress that something is happening.
Introduce a simple bar to show the current progress.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.