Cheetah
from rssparser import parse
from Cheetah.Template import Template
rss = parse('http://www.intertwingly.net/blog/index.rss2')
print Template('title: $channel.title', [rss])
Output:
title: Sam Ruby
It’s just data
from rssparser import parse
from Cheetah.Template import Template
rss = parse('http://www.intertwingly.net/blog/index.rss2')
print Template('title: $channel.title', [rss])
Output:
title: Sam Ruby
That is just stunningly ... cool.
BTW: this particular entry doesn't seem to render correctly under IE 6 -- the text above is invisible till I highlight it with my cursor.
Displays just find under my IE 6:
Version 6.0.2800.1106.xpsp1.020828-1920
Mine's a few version back -- I guess I need to upgrade:
6.0.2600
It displays fine on my blog when I view your main page, but when I display this particular page...
http://www.intertwingly.net/blog/1185.html
... the problem occurs.
Reproduced with the version of IE I have installed. Very weird. Try this:
Obscure the window by putting another window over top of it. Now SLOWLY, uncover the bottom window by moving or resizing the top window. The effect varies based on the direction in which the resizing takes place. Moving diagonally, for example, can leave gaps and holes.
This page validates as XHTML 1.0 transitional and CSS.
Posted by Sam Ruby atWFM Gecko/20021207 ;)
What I'm wondering is how many more lines to start up a little webserver listening on localhost? Ah, a quick google later, and the answer is six or seven, depending. Time to install that copy of Python that's been sitting on my desktop for a couple of weeks.
Cheetah. Input: from rssparser import parse from Cheetah.Template import Template rss = parse('http://www.intertwingly.net/blog/index.rss2') print Template('title: $channel.title', [rss]) Output: title: Sam Ruby [Sam Ruby]...
Excerpt from Rahul Dave: TIG's Software Picks atSam,
I looked for an email address for you somewhere, but didn't find one. I'm trying to use Cheetah myself and am having some problems. Would you mind taking a gander at this post for me?
Debugging Cheetah template engine
Thanks,
--Steve
Steve: items() happens to be a method on dict objects, so Cheetah gets confused.
Change $items to $Items in both the template and the data, and things should work better.
Thanks, Sam - that did it.
<smacks forehead>
--Steve
I did a quick post over in Sam Ruby's comments section asking for help, and he quickly replied with the answer I needed! Thanks Sam!...
Excerpt from monkinetic weblog at