...now on my laptop...

Wednesday, 2003-5-21

TOC Code

I added the year to the month headings, and put my TOC code into my extras folder. Shortly, I will add the URL there. Later, I will add a short "how to use it" in case any of my reader might be interested.

Shortly: The URL is http://www.pycs.net/zia/updateTOC.py (python source).

Later (lifted from the comments): updateTOC.py maintains and updates a table of contents (TOC) for a bzero weblog. Put this source in /usr/local/lib/bzero/b0lib/updateTOC.py (or $BZERO_LIB/b0lib/updateTOC.py), and add these two lines into your index.py:

  • One, NEAR THE TOP (after the other "from b0lib import..." line):

    from b0lib.updateTOC import updateTOC

  • The other goes at the end of the RenderSinglePost function, just after the closing ")" that ends the ugly-long print statement:

    updateTOC( post )

That's all. Works for me ...

Comment on this post [ so far]