Re: glossary preformater
will <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 2 Mar 2003, Wari Wahab wrote:
> Lee Joramo wrote:
> > Question: in glossary.py, I use a full file spec for glossary.txt. Is
> > there a better way to do this? Where would be the best location to
> > store the glossary.txt file in pyblosxom's directory?
>
> In the future I might make a standard variable in config.py for plugins
> to either dump stuff or read from a particular directory if defined.
> Also reading the glossary file, if you find it slow on your system, you
> could increase the speed by making glossaries a python dict, or actually
> compile your glossary file into a pickle.
Why not use the datadir for this as well?
Additionally, instead of tossing it in another file, you could just put it
in a dict in the config file itself:
py["glossary"] = {
"{item1}": '<a href="blahblah">item1</a>',
"{item2}": '<a href="blahblah2">item2</a>'
}
Then it'll get compiled into python byte code and you don't have to load
and parse an additional data file.
/will
--
whatever it is, you can find it at http://www.bluesock.org/~willg/
except Will--you can only see him in real life.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf