index.py

For the impatient:
  Download index.py
  PyBlosxom home page
  PyBlosxom plugin registry

Updated 5/4/2007.

index.py is a PyBlosxom plugin that displays displays an alphabetical index of all entries. It’s similar to other index plugins, except that it indexes the entries by name, instead of by date.

There are number of config parameters available to customize index.py’s behavior, all optional. Here they are, along with their defaults:

py['index_trigger']            = '/site-index'
py['index_num_columns']        = 2
py['index_letters_first']      = True
py['index_title']              = 'index'
py['index_use_story_template'] = True

index.py is copyright 2006 Ryan Barrett, and is distributed under the GPL.

6 thoughts on “index.py

  1. Hi ryan,

    I was trying to set up index.py for my pyblosxom installation as I did for all the other plugins (pycalendar, pyarchives, comments, etc.).

    In all those cases, I for example had to put `$calendar’ into my flavour file (head.html) in this paritcular case which does look like

      “<div class=\”menu\”>
      <div class=\”menuhead\”>
      Calendar
      </div>
      <div class=\”menubody\”>
      $calendar
      </div>
      </div>”

    THE QUESTION:
    I wasn’t able to set up index.py for some reason I don’t know yet. Well, index.py is in place as pycalendar.py etc. is so I think thats all fine. What I don’t understand is this “index_trigger” thing and how do I integrate this into my flavour file? Can you maybe add this to the doc string of index.py?

    TIA Markus :)

  2. Well, I forgot …
    I usually hang out on #pyblosxom@irc.freenode.net – anybody who want’s to talk might visit us :)

    cya folks

  3. hi markus! currently, index.py produces a pyblosxom entry, rendered from scratch each time, as output. from pyblosxom’s point of view, the only difference between index.py and a normal blog post is that index.py generates its own content, while a blog post is read from disk.

    so, you can’t integrate index.py’s output into one of your flavour’s template files. instead, it’s available at a hard-coded path, which you specify in the index_trigger config variable. by default, it’s /site_index.

    the index for most sites will be pretty big, so it wouldn’t really make sense to include it in a template and render it on every page.

    you’re right, i could probably make this clearer in the docstring.

  4. Hi Ryan!
    Thanks for answering. You’re right, of course I had to go for the hard-coded path (this works fine now).

    I am quite happy with index.py but there is still something I wasn’t able to figure.

    PROBLEM:
    In “config.py” I have those entries

    pyindex

    py[‘index_trigger’]  = ‘/blog-index’
    py[‘index_num_columns’]  = 4
    py[‘index_letters_first’]  = True
    py[‘index_title’]  = ‘Index, alphabetically listing all posts.’
    py[‘index_use_story_template’] = True

    Everytime I change the columns (set to 4 right now) it takes effect. But the ‘index_title’ does not … how come?

    To get a notion how my setup looks like corresponding to the code above I have made a Screenshot so you can see I get 4 columns but no change in the title.

    Copy paste it to your webbrowser
    http://img95.imageshack.us/img95/2203/mywebsitecf2.png

    Ciao,
    Markus

  5. Great! I’ve downloaded v0.2. All works fine now! The index_title issue is gone.

    Thank you and keep up your great work! :)

Leave a Reply

Your email address will not be published.