Giter Club home page Giter Club logo

fvtt-export-markdown's Introduction

Welcome

farling42 github stats

Top Langs

fvtt-export-markdown's People

Contributors

dependabot[bot] avatar farling42 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

fvtt-export-markdown's Issues

Console Errors

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)

Help: Handling \n

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.

Issue: Linking Issue

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.
image

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.

image

Josh

Introduce a progress bar

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.