Migrating from Planet 2 to Venus (sanitize.py?)

Sam Ruby rubys at intertwingly.net
Sat Sep 6 03:32:52 EST 2008


On Fri, Sep 5, 2008 at 11:46 AM, Gordon Hodgson <feeds at greenfeed.org.uk> wrote:
> Apologies for the newbness of this email, I don't have any experience
> with or understanding of Python, but I've got on with this all right
> so far it seems...
>
> I was wondering, if anyone can tell me if there is an equivalent to
> sanitize.py in Venus? I was using this to strip h1-h4 tags out of the
> page (because they were breaking it...)

Minhead is a plugin that will renumber such headings to be below your
specified minimum:

http://www.intertwingly.net/code/venus/filters/minhead.py

Alternately, if you start with this plugin:

http://www.intertwingly.net/code/venus/filters/h1title.xslt

And remove the first template (the one that matches on atom:title),
you will be left with a filter that removes h1 tags.  The template
that matches on h1 (and effectively replaces it with nothing) can be
repeated for each element that you wish to remove.

A description of how you can make use of plugins can be found here:

http://www.intertwingly.net/code/venus/docs/filters.html

> Also, do blogs now have to have titles specified in the config.ini
> file? a lot of my blogs had blank titles when the html was exported
> (I've probably just done something weird to the configuration, as I
> seem to remember having had this problem once before, but I don't
> remember how I fixed it...)

Um, no.

> Cheers,
> Gordon
> (www.greenfeed.org.uk)

- Sam Ruby


More information about the devel mailing list