Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Realm Works Forums > Realm Works Discussion

Notices

Reply
 
Thread Tools Display Modes
AEIOU
Senior Member
 
Join Date: Jan 2012
Posts: 1,109

Old January 16th, 2017, 05:14 PM
Hey! I had a pitchfork LAST time. You promised me I could have a torch!!!

Oh, and github is beautiful. Even for us non-coders. The 5e HL community stuff is there and it's easy to download and provide edits.
AEIOU is offline   #21 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,034

Old January 17th, 2017, 06:02 AM
Quote:
Originally Posted by davidp View Post
The <contents> of a <snippet> should all be HTML and that would be the only place that the lists, tables, etc. would be present. You should be able to take the <contents> and just treat it as HTML and be done with it. Any more and you are making life hard on yourself.

The only slight gotcha is that we use encoding of the contents so that it isn't interpreted as XML tags, but that should be straight-forward to deal with.
Nope, I still have to tear things apart for HTML. There's another gotcha.

I'm adding an option to indent nested topics and sections. And it works great for everything except tables. Mind you, I'm still very much an amateur coder, but here's basically what's happening.

In order to indent blocks of text, and not just the first line, I'm using margin-left. For pre-formatted HTML text in the contents node, I'm inserting it right after the "<p " tag. And I add it to every instance, otherwise only some parts of some snippets will indent, and the rest will not.

Adding it to every instance of <p means it's also adding the margin to the table cells.

I could just write code that says if this snippet includes a table tag, then don't insert a margin, but if I have a combo snippet with text and lists and tables, that's not going to work.

So I have to divide things up into components again so I can have better control of where I insert the margins.

The GOOD news is that I already have that code. :-)

The bad news is that I've been up all night, and I'm tired.

But the GOOD news is that everything else is looking good, and this is hopefully the last thing I have to tackle.

The bad news is that I can't do it right now.

But the GOOD news is that ... uhhh ... oh, never mind.
EightBitz is offline   #22 Reply With Quote
Vargr
Senior Member
 
Join Date: Apr 2014
Location: Denmark
Posts: 664

Old January 17th, 2017, 10:57 AM
Quote:
Originally Posted by rob View Post
I'm onto you guys. This is just the calm before the storm, when the pitchforks and torches are properly gathered and the villagers summoned from their homes to be properly equipped and whipped into a frenzy in the days ahead. Right?
Darn! Well, seems we will have to switch to plan B

Vargr
Deputy Calendar Champion


Legend has it, that the Tarrasque is a huge fighting beast, perpetually hungry.
Sleet entered History when he managed to get on the back of a Tarrasque only to be ridden out of History shortly after.

Using Realm Works, Hexographer, LibreOffice, Daz3D Studio, pen & paper for the realm World of Temeon and the system LEFD - both homebrewed.

Vargr is offline   #23 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,034

Old January 17th, 2017, 02:12 PM
New version up. Handles HTML. See the first message in this thread or go here:

https://gist.github.com/EightBitz/c2...52ba593a9735a1
EightBitz is offline   #24 Reply With Quote
daplunk
Senior Member
 
Join Date: Jan 2016
Location: Adelaide, Australia
Posts: 1,645

Old January 18th, 2017, 04:15 AM
Bloody nice work EightBitz! I tried it tonight and managed it with little to no issues. Had to modify the security settings on my PC to enable the script to run and I had removed the full stop from the start of the script thinking that was just to break any auto-formatting (I do that in Excel alot).

To make this a bit easier for new users to pick up here's a video on the process of setting up and running the script.

Realm Works - How To Print Your Realm

Realm Works - Community Links
Realm Work and Hero Lab Videos
Ream Works Facebook User Group
Realm Works - Community Content List

D&D 5e Community Pack - Contributor
General Hero Lab Support & Community Resources
D&D 5e Community Pack - Install Instructions / D&D 5e Community Pack - Log Fault / D&D 5e Community Pack - Editor Knowledge Base
daplunk is online now   #25 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,034

Old January 18th, 2017, 04:55 AM
Doh! I forgot about the security issue.
The Powershell command you need is:
Set-ExecutionPolicy RemoteSigned

That SHOULD do the trick.
EightBitz is offline   #26 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,034

Old January 18th, 2017, 05:07 AM
Quote:
Originally Posted by daplunk View Post
Bloody nice work EightBitz! I tried it tonight and managed it with little to no issues. Had to modify the security settings on my PC to enable the script to run and I had removed the full stop from the start of the script thinking that was just to break any auto-formatting (I do that in Excel alot).

To make this a bit easier for new users to pick up here's a video on the process of setting up and running the script.

Realm Works - How To Print Your Realm
OK, that was an awesome video, but you overlooked one very important detail.

There's a file called "main.css" that should have been included in the zip download. Put the HTML file in the same folder as the main.css file, and you will see a world of difference.
EightBitz is offline   #27 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,034

Old January 18th, 2017, 05:12 AM
And if you want nested topics and sections indented, you can add -Indent to the end of the command line.

If you type:
Get-Help .\RWExport-To-HTML.ps1 -full

You will see all the options available, with examples of how to use them on the command line.
EightBitz is offline   #28 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,034

Old January 18th, 2017, 06:21 AM
I just wanted to show people what the output SHOULD look like in your web browser, if you have the html and css files together, and if you use the -Indent option.

Playground1.pdf is the way I have things setup by default.
In Playground2.pdf, I just made a few changes to the css file to change the formatting, but it's the exact same HTML file.

EDIT: Note this is also from a newer version of the script that now displays images inline, and has links for statblocks. I want to smooth a few things out before I put this new version up, but the key here is to showcase the formatting.
Attached Files
File Type: pdf Playground1.pdf (319.1 KB, 57 views)
File Type: pdf Playground2.pdf (319.6 KB, 26 views)

Last edited by EightBitz; January 18th, 2017 at 06:24 AM.
EightBitz is offline   #29 Reply With Quote
daplunk
Senior Member
 
Join Date: Jan 2016
Location: Adelaide, Australia
Posts: 1,645

Old January 18th, 2017, 10:30 AM
Excellent! Have to admit... I was excited that I figured out how to get it working at all.... Will put a full video together showing this next step.

Realm Works - Community Links
Realm Work and Hero Lab Videos
Ream Works Facebook User Group
Realm Works - Community Content List

D&D 5e Community Pack - Contributor
General Hero Lab Support & Community Resources
D&D 5e Community Pack - Install Instructions / D&D 5e Community Pack - Log Fault / D&D 5e Community Pack - Editor Knowledge Base
daplunk is online now   #30 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 04:23 AM.


Powered by vBulletin® - Copyright ©2000 - 2017, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.