Categories not showing up

Sam Ruby rubys at intertwingly.net
Sat Oct 14 02:25:33 EST 2006


Eric van der Vlist wrote:
> Michel,
> 
> Le vendredi 13 octobre 2006 à 17:39 +0200, Michel Klijmij a écrit :
>> Op vr, 13-10-2006 te 11:19 -0400, schreef Sam Ruby: 
>>> The htmltmpl support in Venus specifically requests individual keys to 
>>> avoid this problem in the future.
>> Sounds great, but being less technically knowledgable: how can I get
>> categories in Venus with htmltmpl and how in Planet 2.0?
> 
> It's a dirty patch, but if it's acceptable for you to display only the
> first category of each entry, you can
> replace ./venus/planet/shell/tmpl.py by the attached file.

Here's how to make it less dirty.  :-)

Take a quick peek at any xml file in this directory:

http://intertwingly.net/code/venus/tests/data/filter/tmpl/

Each has a structured comment at the top, followed by a feed (in any 
format supported by the Universal Feed Parser).

Description is simply a short description of what the test is all about.

Expect is any Python expression that should evaluate 'true' given the 
data that would be passed to htmltmpl.  It would look something like

   Item[0]['category'] == 'foo'

If the patch is accompanied by a testcase it will be incorporated.

> Hope this helps.
> 
> Eric (needing to get more fluent with bzr before he dares to try
> uploads...)

Quick primer:

    bzr get http://intertwingly.net/code/venus
    gedit venus/tests/data/filter/tmpl/category.xml
    gedit venus/planet/shell/tmpl.py
    python runtests.py
    bzr commit

For more information:

    http://www.intertwingly.net/blog/2006/04/19/bzr

- Sam Ruby


- Sam Ruby


More information about the devel mailing list