[Rumble 5.1.3] Bugfix: (LCB) PDF Parsing - RegEx

Framework(s) for D&D 4e, including Veggiesama's.

Moderators: Azhrei, dorpond, trevor, giliath, Gamerdude, jay, Mr.Ice

Post Reply
User avatar
Posts: 162
Joined: Fri Sep 09, 2011 4:41 am
Location: Honolulu, HI

[Rumble 5.1.3] Bugfix: (LCB) PDF Parsing - RegEx

Post by Vhex »

There are some issues with tokens that have a space at the end of the name. Honestly, I forget what the issues are, but I ran into them. I couldn't figure out why I kept getting a space at the end of the name until I was looking at the code for the PDF portion of the RegEx parser.

There are quick fix bugs here: the first is the space after the character name and the second is when you have a paragon path, epic destiny, or Hybrid Class it does not pick up the class at all. The fixes for both are below, but I decided to start using the Summary Importer rather than the PDF Importer after looking at the format of both, so this fix for Paragon/Epic Destiny just dumps it all into class. There is a better way to do this, but I can't see a benefit of doing the PDF import over doing the better formatted Summary import so I decided to stop work on it. If someone can give me a reason I've missed, I'll pick up where I left off.

Fix space after character name
1.) Find the Lib:RegExParser token and edit the PDFSheetParser macro.
2.) Change [h: nameId = strfind(text, "^(.*?)[0-9]+")] to:

Code: Select all

[h: nameId = strfind(text, "^(.*?)\\s[0-9]+")]

Fix Issues when you have a Paragon Path or Epic Destiny
3.) Change [h:lcId = strfind(text, "([0-9]+)\\s(\w+)\\s[0-9,]+(?=<br>Character)")] to:

Code: Select all

[h:lcId = strfind(text, "([0-9]+)\\s(.*)\\s[0-9,]+(?=<br>Character)")]

4.) Click OK

Post Reply

Return to “D&D 4e Frameworks”