Bay 12 Games Forum

Dwarf Fortress => DF Suggestions => Topic started by: trav on February 12, 2007, 11:36:00 pm

Title: rss feed for devnow.html
Post by: trav on February 12, 2007, 11:36:00 pm
Seriously, I'm coming back to the web site less and less as time goes on, but I still want to be in the loop for new releases.

You could have one xml source for both rss and the html page, I could code you up something to avoid double entry if you wanted.

Alternatively something like wordpress, or other blogging software would give you all of that without any effort on your part at all.

Title: Re: rss feed for devnow.html
Post by: Gakidou on February 13, 2007, 12:14:00 am
Why not just put a "http://www.bay12games.com/dwarves/dev_now.html" text link on your page? Toady seems to update the page about once every day, so it might be better for you to just check rather than getting your feed constantly flooded with new features and bug fixes...
Title: Re: rss feed for devnow.html
Post by: trav on February 13, 2007, 12:31:00 am
Because I use an aggregator, not a page.  http://www.google.com/reader

rss gives me lots of useful features such as highlighting new stuff and letting me filter and categorise things.

Most importantly it means I don't have to check the massive list (about 40 individual sites at the moment) of information sources to make sure I don't miss out on anything.

Title: Re: rss feed for devnow.html
Post by: Toady One on February 13, 2007, 09:05:00 pm
The current things looks like:

[status [date 02/13/07] Description.]

[update [date 02/13/07] Handled storage of biome info, handled vegetation, allowed setting of gate point]
[update [date 02/12/07] Tweaked the fortress mode midmap selection somewhat]
[update [date 02/11/07] Handled initial gate placement, did some work on the new dwarf site generation]
- etc -

[afterword Dwarf Fortress started October 2002, this log was started around the same time as the [forum 3:40 "back to the dwarf game"] thread.]


This is processed by something in python/xsl to an html file.  I didn't write the transform, and I don't know enough about xsl to know how to take the intermediate xml stuff and spit out an rss thingy in addition to what it's doing now.

Title: Re: rss feed for devnow.html
Post by: trav on February 13, 2007, 10:20:00 pm
Oh i am SO ON THAT!  :)

Am i allowed a sample of the xml that the xsl gets?

is it <status>bar</status>
<update>bar</update>

or <status><date>foo</date>bar</status>?

I can write a transform that will give you rss xml easy.

I know a bit of python as well, so if you wanted I could show/help you get the intermediate xml out as well

Title: Re: rss feed for devnow.html
Post by: trav on February 13, 2007, 10:41:00 pm
the rs in rss stands for realy simple.  Here's an example xsl that would produce a feed for xml like:
code:

<doc>
<update>
<date>12/04/07</date>
<textnode>I made an update</textnode>
</update>
</doc>

the xsl:

code:

<xml>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   version="1.0">
   <xsl>
   <xsl>
      <rss>
         <channel>
            <title>Dwarf Fortress Development Log</title>
            <link>http://www.bay12games.com/dwarves/dev_now.html</link>
            <description>Toady's Regular Development updates</description>
            <xsl>
               <item>
                  <title><xsl></title>
                  <description><xsl></description>
               </item>
            </xsl>
         </channel>
      </rss>
   </xsl>
</xsl>

the output

code:

<rss>
   <channel>
      <title>Dwarf Fortress Development Log</title>
      <link>http://www.bay12games.com/dwarves/dev_now.html</link>
      <description>Toady's Regular Development updates</description>
      <item>
         <title>12/04/07</title>
         <description>I made an update</description>
      </item>
   </channel>
</rss>


Which is the minimum required by the rss 2.0 spec and so should work in most aggregators.

Title: Re: rss feed for devnow.html
Post by: trav on February 13, 2007, 10:44:00 pm
I'd join irc to pester you about it but for some reason worldIRC has decided that I'm not allowed in anymore.

Edit: www.bay12games.com/dwarves/dev_now.rss  appears to work in the google reader.

[ February 13, 2007: Message edited by: Toady One ]

Edit 2: Ha ha ha.. . I edited your message instead of mine...  whoops.

[ February 13, 2007: Message edited by: Toady One ]

Title: Re: rss feed for devnow.html
Post by: Toady One on February 13, 2007, 11:19:00 pm
The xml was doing various complicated things with spans and so on, but I managed to make a copy of the old xsl and hack it to pieces to produce the rss output.  What do I do with it?

Edit: www.bay12games.com/dwarves/dev_now.rss  appears to work in the google reader.

[ February 13, 2007: Message edited by: Toady One ]

Title: Re: rss feed for devnow.html
Post by: trav on February 13, 2007, 11:36:00 pm
Thanks Toady, you're the best ever!

Only problem now though is that the releases don't show up on the feed.

How about a feed for releases separate to updates?

Ideal would be an item for each feed containing all the updates for that release, but that's probably not easily achievable with your current structure.

Title: Re: rss feed for devnow.html
Post by: Toady One on February 13, 2007, 11:54:00 pm
For some reason the releases aren't showing up in the main feed even now that they appear as items in the file.  Might just be how google handles inserts.  Anyway, this seems to work:

www.bay12games.com/dwarves/dev_release.rss

I could paste in the release notes for the rss description as a new field in the master or something for future version.  That wouldn't take long.