Thread: FG Module XML to Formatted Text
-
November 29th, 2016, 17:23 #1
FG Module XML to Formatted Text
Sometime next year I am going to be wanting to take several large 5E modules I've created in FG and export them into formatted text (ultimately to PDF format). These modules have many hundreds of objects (stories, NPCs, encounters, items, etc) and I expect them each to be several hundreds of standard pages in length. Copy/paste into Word/text editor is not going to be reasonable.
I'd like to understand what tools are available that might be able to be converted, as well as what I might need to develop or define (as well as learn). I'm thinking something kind of like the Universal Character Exporter, XML DTD types of things etc. What about one of the current 5E parsers?
Is there some tool that takes XML of one format where I can provide a mapping to another XML format (i.e. FG XML to Word/PDF XML)?
Problems? See; How to Report Issues, Bugs & Problems
On Licensing & Distributing Community Content
Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
Note, I am not a SmiteWorks employee or representative, I'm just a user like you.
-
November 29th, 2016, 17:35 #2
Hi, LordEntrails!
You might look into XSLT if you are programmatically inclined. You don't need any special tools to use it, just find a good reference on the Internet.
Oxygen used to be a good editor but I haven't used it for years so no idea now. There may also be some really good free ones. Eclipse may have a plug in too.
Good luck!
-
November 29th, 2016, 17:58 #3
Thanks, I'm no developer. Only language I ever knew much of was Fortran 77...
I do do a lot of scripting and some existing code modification along with using things like SQL queries from documentation. So I'm familiar at the 100,000 foot level
But, that's why I'm trying to plan ahead. So I have time to learn and figure things out. I figure that converting XML to a PDF can't be an unusual desire (as Google shows), but I'm just at a loss of where to start.
Anyone else with ideas or knowledge, thoughts would be appreciated.
Problems? See; How to Report Issues, Bugs & Problems
On Licensing & Distributing Community Content
Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
Note, I am not a SmiteWorks employee or representative, I'm just a user like you.
-
November 29th, 2016, 19:04 #4
- Join Date
- Nov 2016
- Posts
- 5
Hi,
It's just a suggestion but I would say try out Scribus. It's Libre Software meaning there's no monetary cost to you and it both supports export to PDF and importing text with mark-up. If you're not used to Desk Top Publishing software there's a modest learning curve, but I believe it will be one of the quickest ways to do what you want. Create a document with a master page and the styles you like. Then take your XML files and turn them into a suitable markup. That may well be as simple as doing a search and replace on certain XML tags and a search and delete on others. Once done, you import it into Scribus (this is the big difference between something like a Word Processor where you're typing text into it and a DTP program where you're defining styles and sources and then attaching text to it from a source). It will turn your mark-up into the chosen paragraph styles.
Once done, export it as a PDF. (Or many).
Here are a couple of resources that will let you see if this is the sort of thing that you're looking for. Once you've read them you'll need to go back to the actual start and learn to use Scribus properly, but this will show you the areas relevant to whether you think it might work for you.
ocsmag.com/2015/11/24/layout-according-to-scribus-ii-using-styles-to-improve-your-workflow/
wiki.scribus.net/canvas/Working_with_text_frames
Note, Scribus actually saves its files as XML. You might, with some judicious search and replacing, actually be able to turn your XML export directly into a Scribus document. (Maybe. ).
Hope this helps.
EDIT: The forum blocked me from pasting links so I stripped off the h and the t and the other t and then the p from the front of those two URLs. I'm naughty like that.
-
November 29th, 2016, 19:46 #5
You are going to be doing a lot of copy and paste....
-
November 29th, 2016, 20:39 #6
No no no *G*
That's why I have to find a way to do it systematically/programmatically *G* I'm pretty confident at the moment that I can at least create a reasonable XLST and import the data into Word. The story entries look like they will come in by list Group I could then drag/drop or copy/paste them into a linear order. (That part looks pretty straight forward, see; https://msdn.microsoft.com/en-us/lib...fice.12).aspx)
Right now I'm trying to figure out if Word 2013 has better tools or if I should take that approach. Scribus, Eclipse and various Apache project tools also look to be able to do it using XLS-FO, but that requires multiple application installs and custom application development (I think).
For anyone interested, attached is a sample campaign that can be used to see how the FG XML is laid out. I haven't done all the data types yet, but it would get most of the info out (except NPCs and Encounters, at the moment).
Still open to suggestions though as I'm not (yet) fixated on the Word/XLST approach. (Though I'm leaning that way because I know I will need to re-order elements once they are converted, so straight conversion to PDF won't help unless I then plan to edit the PDF.
Problems? See; How to Report Issues, Bugs & Problems
On Licensing & Distributing Community Content
Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
Note, I am not a SmiteWorks employee or representative, I'm just a user like you.
-
November 29th, 2016, 22:42 #7
Alternative to XSL-FO would be princexml (https://www.princexml.com). You can run XSL-FO as commandline tool so there is no need to build appdev environment
"Alright, you primitive screwheads, listen up: THIS... is my BOOMSTICK!" -- Ash Williams, Army of Darkness
Post your SavageWorlds ruleset feature requests and issue reports here!
-
November 30th, 2016, 04:26 #8
Well, looks like Word might not work anymore, found this as I got farther into it and it wasn't working as expected;
The removal of custom XML markup is the result of a United States court ruling on December 22, 2009. Customers who buy or license Word 2013 will find that the software does not include a particular custom XML tagging implementation.
Problems? See; How to Report Issues, Bugs & Problems
On Licensing & Distributing Community Content
Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
Note, I am not a SmiteWorks employee or representative, I'm just a user like you.
-
November 30th, 2016, 12:26 #9
libreoffice
Paul Grosse
PCGen BoD
PR Silverback
Autobackup Batch file, Always ALWAYS backup your data. Remember to follow the 3-2-1 rule!
-
November 30th, 2016, 16:13 #10
Problems? See; How to Report Issues, Bugs & Problems
On Licensing & Distributing Community Content
Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
Note, I am not a SmiteWorks employee or representative, I'm just a user like you.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks