Re: Category title plugin

Robert Wall <[email protected]>
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <[email protected]>
Nice work!

I've tested them both on current pyblosxom CVS code and CVS code before 
the recent checkins (roughly version 1.0 with a few smaller changes), 
the results are below.

Ross Burton wrote:
> section_title.py allows you to create a '.title' file in each category
> directory, the contents of which are used as the blog title instead of
> the real name of the directory.
> 
> For example, my blosxom/sound-juicer category would normally set "sound-
> juicer" as the HTML <title>, but blosxom/sound-juicer/.title contains
> "Sound Juicer" so the HTML <title> is set to that instead.
> 

section_title.py works without modification.

> section_body.py lets you have an entry called body.txt which is moved to
> be the first entry for specified flavours.

Would it not be simpler to use a magic filename like you did with 
section_title.py?  Then you won't need your loop to remove existing 
entries with a filename 'body'.

The only changes required in this plugin are:

  * In your comments you say that py["section_body_flavour_list"] is the 
key to be used in the config file.  The actual key checked for in the 
code is "section_body_allowed_flavour_list".
  * The FileEntry constructor should now have the request object passed 
as the first parameter, not the config object.

> 
> If anyone tries these, discovers they don't work with Pyblosxom 1.0 and
> fixes them, please mail me. :)

Can you register these plugins in the pyblosxom registry?  (It would be 
good if you could register the "fixed" version 1.0 section_body.py 
plugin).

You might also want to add some sort of disclaimer and/or license to 
these plugins (though IANAL so you should make up your own mind on what 
if anything you want to add).

The registry can be found on http://planetpyblosxom.org/


Robert

-- 
http://robwall.com/



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.