|
|
|
 |

June 24th, 2008, 10:28 AM
|
National Security Advisor
|
|
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
|
|
Re: Wraithlord\'s dominionsKB
Quote:
but since all the text is considered pre-formatted and uses text-style bullet lists etc., I don't think that it's very feasible.
|
I didn't quite follow that bit sorry. Which bit would be difficult? Is it to do with the fact that newlines sometimes are important and sometimes not, or something like that?
I'm not implying it's easy you understand, just trying to clarify my own understanding of the problem.
|

June 24th, 2008, 10:35 AM
|
 |
General
|
|
Join Date: Feb 2007
Location: R'lyeh
Posts: 3,861
Thanks: 144
Thanked 403 Times in 176 Posts
|
|
Re: Wraithlord\'s dominionsKB
HTML ignores all superfluous whitespace (spaces, newlines, tabs) and shortens it to a single space. Thus you'd have to use PRE tags for pre-formatted text for the whole document if you'd convert it to HTML. Or you'd have to "guess" the document structure and put in paragraph tags etc. yourself, but writing such a parser is definitely non-trivial. Furthermore, text is used for bulleted lists like this, too:
Code:
My thoughts on the blessing:
- Most things that a Niefel (or even a Jotun) hit, die so why not make them hit a little better; I'll also be fielding fewer troops than my opponents -> F4 for +2 att.
- Since I'm fielding fewer troops, my troops must make more hits to get rid of enemy troops; also my Jarls need to buff and NOT get hit while too much fatigued -> E4 for reinvigoration +2.
- Magic Resistance: Goooood for Jarls -> S4
- To drive the affliction chance down and 10% regeneration -> N6
or Code:
HOLY, 11 sites (10 effective)
* Level 0: 2 sites, 1 rare, 1 special (506 Holy Crypt of Anre, any land but cave, unique)
* Level 1: 2 sites, 2 common (1 any land, one only in sea)
* Level 2: 2 sites, 2 uncommon (1 unique)
* Level 3: 3 sites, 3 uncommon (2 unique)
* Level 4: 2 sites, rare (410 Temple of Time, any land, non-unique; 414 The Ward, any land but cave, unique)
Linux man pages, Perl's POD pages and Wikitext all have easy text markup for things like bold/italic text, lists etc. So I think that this might be a better portable format.
|

June 24th, 2008, 11:34 AM
|
 |
General
|
|
Join Date: Sep 2003
Location: Tel Aviv, Israel
Posts: 3,465
Thanks: 511
Thanked 162 Times in 86 Posts
|
|
Re: Wraithlord\'s dominionsKB
Oh, writing such a parser was just what I had in mind. I was thinking of using the basic power tools for this the twins sed and awk. It should make writing the parser more feasible.
I admit I'm far from being an HTML expert though, so I might be missing some hidden (for me) difficulties.
I think the best way to get a feel for how difficult the parse is will be to start writing it. Probably if I get stuck I could get help from you Ich.
|

June 24th, 2008, 11:35 AM
|
 |
Colonel
|
|
Join Date: Oct 2007
Location: in a sleepy daze
Posts: 1,678
Thanks: 116
Thanked 57 Times in 33 Posts
|
|
Re: Wraithlord\'s dominionsKB
I just chose to open it in Word and it is pretty easy to read. Nice work WraithLord (600+ pages in my file format) Caramba!
__________________
i crossed blades with the mightiest warriors of the golden age. i witnessed with sorrow the schism that led to the passing of legends. now my sword hangs in its scabbard, with nothing but memories to keep it warm.
|

June 24th, 2008, 11:54 AM
|
 |
General
|
|
Join Date: Feb 2007
Location: R'lyeh
Posts: 3,861
Thanks: 144
Thanked 403 Times in 176 Posts
|
|
Re: Wraithlord\'s dominionsKB
Wraithlord, I really think it's far less work and a better end result to redo the whole thing in another format than writing a parser. Some things are easy to replace, for example the URL links, but some things might be needlessly complicated. I'd setup a Wiki for you so that you can use a real Wiki, too. But if you want to write a parser for this, regardless, that's ok.
If you want to use a text-based markup language that's easy to write, easy to read and easy to parse (which e.g. Wikitext is not), then use Perl's Plain Old Documentation: http://perldoc.perl.org/perlpod.html
There are already converters for pod to pretty much anything: pod2html, pod2latex, pod2man, pod2text, pod2usage and a podchecker to check the syntax of your pod files.
|

June 24th, 2008, 04:24 PM
|
 |
General
|
|
Join Date: Sep 2003
Location: Tel Aviv, Israel
Posts: 3,465
Thanks: 511
Thanked 162 Times in 86 Posts
|
|
Re: Wraithlord\'s dominionsKB
Very well, I think I'll go for the POD option. I'll do a KB2POD translator and then I'll use the existing converters to produce latex (and PDF) and html.
Don't know how much time it'll take to complete but I'll be on it 'till its ready.
|

June 25th, 2008, 07:00 AM
|
 |
General
|
|
Join Date: Sep 2003
Location: Tel Aviv, Israel
Posts: 3,465
Thanks: 511
Thanked 162 Times in 86 Posts
|
|
Re: Wraithlord\'s dominionsKB
Gandalf has graciously agreed to host the document on his server, so it's now also there.
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|