Senior Member
Join Date: Jan 2012
Posts: 1,147
|
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. |
#21 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
Quote:
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. |
|
#22 |
Senior Member
Join Date: Apr 2014
Location: Denmark
Posts: 740
|
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, Worldographer (Hexographer 2), LibreOffice, Daz3D Studio, pen & paper for the realm World of Temeon and the system LEFD - both homebrewed. |
#23 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
New version up. Handles HTML. See the first message in this thread or go here:
https://gist.github.com/EightBitz/c2...52ba593a9735a1 |
#24 |
Senior Member
Join Date: Jan 2016
Location: Adelaide, Australia
Posts: 2,294
|
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 CC3+ Facebook User Group 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 Obsidian Obsidian TTRPG Tutorials |
#25 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
Doh! I forgot about the security issue.
The Powershell command you need is: Set-ExecutionPolicy RemoteSigned That SHOULD do the trick. |
#26 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
Quote:
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. |
|
#27 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
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. |
#28 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
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. Last edited by EightBitz; January 18th, 2017 at 06:24 AM. |
#29 |
Senior Member
Join Date: Jan 2016
Location: Adelaide, Australia
Posts: 2,294
|
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 CC3+ Facebook User Group 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 Obsidian Obsidian TTRPG Tutorials |
#30 |
|
|