Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: Dwarf Fortress World Information to XML - Now Online, No Download Required  (Read 7627 times)

timmeh

  • Bay Watcher
    • View Profile
    • My Portfolio

@Hummingbird - Could you post the contents of the history file that isn't working for me?  I can't think of any reason it would have any output at all.... what browser are you using?

@Scarpa - I actually have to leave right now, but I should be able to fix the malformed XML output pretty quickly, thanks for the heads up! 

I like XSL, but unfortunately, it doesn't work as well with XML strings... I've actually kinda gotten into the habit of using JQuerry now, since I can do some more dynamic stuff with it.  The project menu on my website for example, no HTML, it generates the whole menu, links and all, from an XML file.  Same with the project display pages, all the same page, it just takes a URL argument of the name of the project to look up in the XML file... web design stuff is awesome :P

@Sizik - Awesome, thanks!  I'll see if I can figure out the regex symbol for accented and other characters later :D  The Unnumbered this is something I must've over-looked, and shouldn't take me much more than five minutes to fix, tops.  That'll probably be first, as soon as I get back (around noon-ish I think).


Thanks for all the awesome input guys, it's really helpful!
Logged
On the Wall is a Masterfully engraved carving of Urist McHardcastle and Goblins. Urist McHardcastle is surrounded by the Goblins. The Golbins are stamping on Urist McHardcastle. Urist McHardcaste is laughing at the Goblins. The carving related to the prolonged and bloody death of Urist McHardcastle in the Fall of 1659, the Winter of 1659, and the Spring of 1660. On the engraving is an image of Cheese.

Scarpa

  • Bay Watcher
    • View Profile

@Scarpa - I actually have to leave right now, but I should be able to fix the malformed XML output pretty quickly, thanks for the heads up! 

I like XSL, but unfortunately, it doesn't work as well with XML strings... I've actually kinda gotten into the habit of using JQuerry now, since I can do some more dynamic stuff with it.  The project menu on my website for example, no HTML, it generates the whole menu, links and all, from an XML file.  Same with the project display pages, all the same page, it just takes a URL argument of the name of the project to look up in the XML file... web design stuff is awesome :P

Yeah I plan to use JQuery later on. The rough plan is to use XSL to transform the data to XHTML that is styled with CSS and then use JQuery for any interactive type features. I'm glad you started up this project because I can get a head start on ways to present the data.

XPath has fairly strong string support, what kinds of issues were you having trouble with?
« Last Edit: March 07, 2010, 12:22:45 pm by Scarpa »
Logged

timmeh

  • Bay Watcher
    • View Profile
    • My Portfolio

Okay, fixed the site generator not picking up unnumbered creatures.  I also fixed the history to XML one, so that it closes the ruler tag.  Not ideal, but I can get a better fix (like not adding the tag in the first place :P) in a minute.  I'm assuming though, since you noticed that issue, that the world history converter worked for you then Scarpa?  If the display one doesn't work there's a good chance the XML is malformed...

I fixed the civilization name bug, although it's a little hack-ish.  I'm currently just using the regex expression \D, which is any symbol that isn't a number, to check for the weird characters.  If there's a better expression I'd prefer to use that, cause while this works, I'd prefer a more specific symbol, if only to make the code make a little more sense...

Anyways, thanks for all the awesome input!  I'm going to see if I can figure out a better way to handle the ruler thing...
Logged
On the Wall is a Masterfully engraved carving of Urist McHardcastle and Goblins. Urist McHardcastle is surrounded by the Goblins. The Golbins are stamping on Urist McHardcastle. Urist McHardcaste is laughing at the Goblins. The carving related to the prolonged and bloody death of Urist McHardcastle in the Fall of 1659, the Winter of 1659, and the Spring of 1660. On the engraving is an image of Cheese.

Scarpa

  • Bay Watcher
    • View Profile

I'm using your executable to convert the history file on my system. So far the web page for that hasn't worked, nothing happens when the button to convert is clicked.

Logged

timmeh

  • Bay Watcher
    • View Profile
    • My Portfolio

Can I see the file in question?  What browser are you using?  To be entirely honest, I do all of my testing in Chrome so I can use it's dev tools, so I haven't really tested anything else...
Logged
On the Wall is a Masterfully engraved carving of Urist McHardcastle and Goblins. Urist McHardcastle is surrounded by the Goblins. The Golbins are stamping on Urist McHardcastle. Urist McHardcaste is laughing at the Goblins. The carving related to the prolonged and bloody death of Urist McHardcastle in the Fall of 1659, the Winter of 1659, and the Spring of 1660. On the engraving is an image of Cheese.

Hummingbird

  • Bay Watcher
    • View Profile

Using Safari 4.0.3 here.

History file:
Spoiler (click to show/hide)
Logged
But Elves aren't Vegetarians. They eat people.
So they are humanitarians.

timmeh

  • Bay Watcher
    • View Profile
    • My Portfolio

Found the problem, should be fixed in a couple minutes :D

[EDIT]:  Okay, that took a bit longer than I expected :P  I initially thought it might be that I used a different HTML tag for the button in the history converter, and that maybe Chrome was the only browser that supported that tag using the onClick event.  I was wrong, it was the same tag, and changing it didn't help any.  The real problem was a typo in one of the regex expressions, I've tested it to be working in Firefox 3.6, Safari 4.0.4 and Chrome 4.0.249.89

Thanks for the input everyone!
« Last Edit: March 07, 2010, 07:33:17 pm by timmeh »
Logged
On the Wall is a Masterfully engraved carving of Urist McHardcastle and Goblins. Urist McHardcastle is surrounded by the Goblins. The Golbins are stamping on Urist McHardcastle. Urist McHardcaste is laughing at the Goblins. The carving related to the prolonged and bloody death of Urist McHardcastle in the Fall of 1659, the Winter of 1659, and the Spring of 1660. On the engraving is an image of Cheese.

Scarpa

  • Bay Watcher
    • View Profile

Works in IE8 now. Thanks!
Logged

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile

Two minor things in the history display page - One, deities etc state "Nish is deity that represents...", which should be "Nish is a deity". Also, when rulers are married, it says that they got married in year X, which is actually the year that the spouse died. That's easily seen with your sample history output, which then claims that Urist Reignedblockades died in 101, but married in 102 (and still managed to have 10 children).
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

timmeh

  • Bay Watcher
    • View Profile
    • My Portfolio

@Scarpa - Good to know!  IE support is a pain, so it's nice to hear it still works :)

@Knight Otu - Awesome, thanks for the input!  Fixed :D  Don't know how I missed the marriage thing, hard to marry someone and have 10 children when you're dead.... :P


[EDIT]:  I've been working on a semi-related secret project for the last couple days, and should have it in a presentable state either tonight or tomorrow.  When it's done I'll add mention of it in the first post, and create a new topic for it.

Also, I'm leaving for a camping trip Friday, and won't be back until Sunday, possibly late at night, and won't have access to the internet or a computer durring that time.  Please don't let it deter you from commenting on this (or the secret project once I get it up) in the mean time, I'll get back to it as soon as I get back and finish wading through unread e-mails.
« Last Edit: March 10, 2010, 05:00:02 pm by timmeh »
Logged
On the Wall is a Masterfully engraved carving of Urist McHardcastle and Goblins. Urist McHardcastle is surrounded by the Goblins. The Golbins are stamping on Urist McHardcastle. Urist McHardcaste is laughing at the Goblins. The carving related to the prolonged and bloody death of Urist McHardcastle in the Fall of 1659, the Winter of 1659, and the Spring of 1660. On the engraving is an image of Cheese.

timmeh

  • Bay Watcher
    • View Profile
    • My Portfolio

Okay, the secret project is done, and has a topic (probably directly below this one at the time of this posting...).  It's a sort-of sister-project to this one, feel free to check it out :D

[EDIT]:  I will be out camping from Friday the 12th through Sunday the 14th, I will not have any access to a computer, the internet, or any other electronics, so I won't be checking any of my projects.  However, please do comment while I'm gone, I'll get to the replies as soon as I get back.
« Last Edit: March 11, 2010, 11:31:46 pm by timmeh »
Logged
On the Wall is a Masterfully engraved carving of Urist McHardcastle and Goblins. Urist McHardcastle is surrounded by the Goblins. The Golbins are stamping on Urist McHardcastle. Urist McHardcaste is laughing at the Goblins. The carving related to the prolonged and bloody death of Urist McHardcastle in the Fall of 1659, the Winter of 1659, and the Spring of 1660. On the engraving is an image of Cheese.
Pages: 1 [2]