DMFA RSS

Started by spacewarp, July 11, 2012, 06:14:16 PM

Previous topic - Next topic

spacewarp

Hello everyone. As a long-time reader of DMFA and user of Google Reader I've been slightly annoyed at the lack of a DMFA RSS feed. However, instead of complaining about it I decided that as a programmer with a mostly unused server I could make one myself. So I did.

It's been working wonderfully for a while now so I though that maybe I should share. I'm hoping that for once one of my projects may benefit others :)

TLDR; http://spacewarp.se/DMFA.php spacewarp.se/DMFA now serves a valid DMFA RSS :D

Tapewolf

Cool.  Actual RSS support has long been promised for the site rebuild, but things seem to have stalled with that again.

It's perhaps also worth noting that DMFA is announced on Twitter.  I believe the URL is https://twitter.com/Ambaaargh

J.P. Morris, Chief Engineer DMFA Radio Project * IT-HE * D-T-E


llearch n'n'daCorna

*makes notes* We may request the code for that, soas to simply duplicate it across to the new format.

Or we may not. Depends on how things work out...
Thanks for all the images | Unofficial DMFA IRC server
"We found Scientology!" -- The Bad Idea Bears

spacewarp

#3
Well, I've poked at the server configuration so the code is openly available from http://spacewarp.se/DMFA/. The code isn't commented but is quite short (only 250 lines total), simple and well-named (hurray Python :) ).

llearch n'n'daCorna

Ah. So.. you're using php to call python to generate xml.

I...

Honestly, I'm not sure what to say. >.<
Thanks for all the images | Unofficial DMFA IRC server
"We found Scientology!" -- The Bad Idea Bears

Turnsky

Quote from: llearch n'n'daCorna on July 12, 2012, 06:49:03 AM
Ah. So.. you're using php to call python to generate xml.

I...

Honestly, I'm not sure what to say. >.<

This?  >:3

Dragons, it's what's for dinner... with gravy and potatoes, YUM!
Sparta? no, you should've taken that right at albuquerque..

spacewarp

#6
Hahaha...  

The first draft for the system was pure php, but I simply like python a whole lot better. I would have made apache run the python script directly, but then I would have to add a bunch of code to handle the protocol as well as xml output. Also, the php step turned out to be necessary to make the system run with correct text encoding.

llearch n'n'daCorna

... why? All you need to do is mod_python or wsgi, and then print to stdout, and apache will handle everything else.

... which is all you're doing anyway.

See http://www.ossramblings.com/node/380 for example...
Thanks for all the images | Unofficial DMFA IRC server
"We found Scientology!" -- The Bad Idea Bears

spacewarp

Honestly I pretty much forgot about that... I blame it on me setting it up at 1 AM. It was easier to avoid the problem than fix it. But now that you've (with horror :)) pointed it out I'm feeling ashamed enough to try again :)

llearch n'n'daCorna

Hehehehe. Good luck with that, then.
Thanks for all the images | Unofficial DMFA IRC server
"We found Scientology!" -- The Bad Idea Bears

spacewarp

#10
There you go :) After some .conf poking spacewarp.se/DMFA now runs the RSS output program directly. I feel a bit silly now as apparently I already had wsgi installed, just not used. spacewarp.se/DMFA.php now provides short info and source instead of RSS.

Darkmoon

Depending on what we do with the site redesign, RSS may get automated by the server itself. It is on CVRPG, so there's an easy possibility.
In Brightest Day. In Blackest Night...

Damaris

Thank you for putting in the effort, Spacewarp. I'm sure many people are currently thrilled :)

You're used to flame wars with flames... this is more like EZ-Bake Oven wars.   ~Amber
If you want me to play favorites, keep wanking. I'll choose which hand to favour when I pimpslap you down.   ~Amber

Arcblade

There's also this one, which I did not write I'm afraid.  www.comicsyndicate.org/Comics/Rss/175 

spacewarp

#14
Quote from: Arcblade on July 14, 2012, 11:04:54 AM
There's also this one, which I did not write I'm afraid.  www.comicsyndicate.org/Comics/Rss/175  

For me that url just generates a long error message about incorrect authentication. That can't just be me can it?

[Edit] Never mind, a few reloads later it randomly works :I

I'll claim my feed to be better though, as I also grab the rant at time of update :)

[Edit 2] Speaking of which, I've been thinking about updating the code to also grab non-update rants. Thoughts?

Mao

I'd be a bit careful with that.  Mab seems to not like having her rants archived for the world to see.

spacewarp

Quote from: Mao on July 14, 2012, 12:37:58 PM
I'd be a bit careful with that.  Mab seems to not like having her rants archived for the world to see.

Hmm, well then I suppose it's a good thing I decided not to make the RSS accept a way to go back in time to older posts.

llearch n'n'daCorna

Quote from: Damaris on July 12, 2012, 11:38:47 PM
Thank you for putting in the effort, Spacewarp. I'm sure many people are currently thrilled :)

This is why we keep Damaris around. She's the one who knows how to say "thankyou" ;-]
Thanks for all the images | Unofficial DMFA IRC server
"We found Scientology!" -- The Bad Idea Bears