Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong white space, small export bug to Fantasy Ground PC xml (dis/advantages) #154

Open
KSA001 opened this issue Jul 9, 2021 · 8 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@KSA001
Copy link

KSA001 commented Jul 9, 2021

Hi,
just tried out the function in V.4.32 to export a character sheet for Fantasy Ground PC (xml format).

Basically it worked fine, but I found a little issue regarding the export of advantages:
The export file contains an additional (wrong) space character (blank, white space) at the end of the name string, as can be seen below in the example! I don't think it was intentional...

<adslist> <id-1429c314-d18d-4f50-a135-1bb1b6268cc7> <name type="string">Absolute Direction </name> <points type="number">5</points>

For the test I used GCS on Linux Mint 18.3 x64.

@richardwilkes
Copy link
Owner

Hmm... did you verify that the advantage in question didn't actually have a trailing space? At any rate, I'll look at it when I get a spare moment.

@KSA001
Copy link
Author

KSA001 commented Jul 9, 2021

Yes, I verified it with other advantages, too. Update: Sorry, regarding disadvantages there is something unclear, maybe it's not the case there, I'll recheck.
Here another example issue from advantages:
<id-910dd3b7-be71-4a88-824a-e19bee7bd9fe> <name type="string">Invisibility </name> <points type="number">40</points>

@KSA001
Copy link
Author

KSA001 commented Jul 9, 2021

Ok, rechecked it, for some reason it did not see it in one test case with disadvantages, but here is another example where I encountered the issue with the extra space at the ending and disads:

<disadslist> <id-3f5f35b7-d980-4812-b7f6-76d34784cb6a> <name type="string">Disadvantages </name> <points type="number">-56</points> <text type="formattedtext"><p> </p><p>Page Ref: </p></text> </id-3f5f35b7-d980-4812-b7f6-76d34784cb6a> <id-57017d2c-8776-4780-80e8-3349b6dd4fc1> <name type="string">Allergy (Nuts) </name> <points type="number">-1</points> <text type="formattedtext"><p> </p><p>Page Ref: PU6:22</p></text> </id-57017d2c-8776-4780-80e8-3349b6dd4fc1> <id-fdf8bf44-26a0-4f11-8078-d6d59dd82fb0> <name type="string">Atheist </name> <points type="number">-1</points>

@KSA001
Copy link
Author

KSA001 commented Jul 9, 2021

And by the way: Thank you for the great 4.32 update! :) thumbs up

@richardwilkes
Copy link
Owner

Can you attach the file you used to export with... and give me the name of the export template you used? Looking at the code, I'm not seeing anywhere that would add a trailing space like that, so would like to walk the code through the export sequence with a known failing case.

@richardwilkes richardwilkes added the bug Something isn't working label Jul 9, 2021
@KSA001
Copy link
Author

KSA001 commented Jul 10, 2021

In case my mail reply did not work (?), here is a sample gcs file along with the resulting Fantasy Grounds PC xml export.

@KSA001
Copy link
Author

KSA001 commented Jul 10, 2021

@richardwilkes
Copy link
Owner

OK, so as I suspected, its not a code issue, but an output template issue. Specifically, things like this (from line 218 of the Fantasy Grounds PC.xml file):

@DESCRIPTION_PRIMARY @DESCRIPTION_MODIFIER_NOTES_BRACKET

Note the space between @DESCRIPTION_PRIMARY and @DESCRIPTION_MODIFIER_NOTES_BRACKET. In the case where there aren't any notes, the space is still emitted. You could fix that by removing the space, but then the resulting output when notes are present would be jammed up against the description. Not having Fantasy Grounds, I have no idea if that will work or not.

Anyway, I'm happy to take a PR that fixes this -- but since I don't have Fantasy Grounds, I will just have to accept the submission on good faith and assume it works as needed for that tool.

@richardwilkes richardwilkes added the help wanted Extra attention is needed label Jul 19, 2021
@richardwilkes richardwilkes transferred this issue from richardwilkes/gcs Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants