Perhaps zope-dev isn't the best place to announce a Product, but what the heck, it's a ``beta'' and I don't want end-users end-using it ``en masse'' yet :-) It adds a <dtml-fortune> tag that is replaced by a random fortune cookie. You may also do <dtml-fortune linux linuxcookie> to select only cookies from these two files; inexistent filenames are ignored.
The Product is based on ZippyTag code. You have to have fortune files from the BSD fortune util hanging around; the standard location is /usr/share/games/fortunes because that's where the Linux FHS says it should be, if you want them elsewhere edit fortunesetup.py.
The inspiration for the Product comes from Squishdot.
Uh... it's optimized for speed, so it first randomizes on the file, then opens the file and randomizes on the cookie. Anyone objects to this? I figured delaying a lot of seconds while I open a ton of fortune files wouldn't be desireable.
[]s, |alo +---- -- I am Lalo of deB-org. You will be freed. Resistance is futile.
http://www.webcom.com/lalo mailto:lalo@webcom.com pgp key in the web page
Debian GNU/Linux -- http://www.debian.org
First bug found :-)
In __init__.py, look for "os.glob" and replace for "glob.glob". Ooops. (You will only see this bug in action if you try to use dtml-fortune with no arguments.)
[]s, |alo +---- -- I am Lalo of deB-org. You will be freed. Resistance is futile.
http://www.webcom.com/lalo mailto:lalo@webcom.com pgp key in the web page
Debian GNU/Linux -- http://www.debian.org