Posts tagged Development

new jQuery stuff!

Check it out: http://nefaria.com/project_index/jqueryfilebrowser/

Enjoy!

jqueryFileTree connector script for python cgi

If you use jquery and haven’t messed with the jqueryFileTree plugin, I’d highly recommend you do so. It’s pretty neat, and there are connector scripts already written in various languages for use with this plugin. However, there wasn’t one for python cgi (there was one for django however). So, I wrote my own! Try it out:

#!/usr/bin/python

# jqueryFileTree connector script for python cgi
# Version: 1.0 / 10 August 2010
# Author: Charles Hamilton / musashi@nefaria.com
# Released under the GNU GPLv3
# Modifications and improvements are welcome

import os, cgi, cgitb, urllib, re
cgitb.enable()
form = cgi.FieldStorage()

print ’Content-Type: text/html\n\n
print ’<ul class="jqueryFileTree" style="display: none;">

path = urllib.unquote(form['dir'].value)

dirs = []
files = []

filelist = sorted(os.listdir(path))

for object in filelist:
    if os.path.isfile(path + ‘/‘ + object):
        ext = os.path.splitext(object)
        files.append(‘<li class="file ext_‘ + re.sub(‘\.‘, ”, ext[1]) + ‘"><a href="#" rel="‘+ path + object + ‘">‘+ object + ‘</a></li>‘)
    elif os.path.isdir(path + ‘/‘ + object):
        dirs.append(‘<li class="directory collapsed"><a href="#" rel="‘+ path + object +’/">‘ + object + ‘</a></li>‘)

for d in dirs:
    print d

for f in files:
    print f

print ’</ul>

Autoresponse on HowToForge

Autoresponse now has a tutorial on HowToForge! Be sure to check it out. I also suggest signing up because there is a wealth of information on there, and with a paid subscription you can download any tutorial as a PDF (other formats are available as well) without the ads, graphics, and other unrelated items… it’s well worth it.

Autoresponse 1.6.2 (bugfix) released!

This version of autoresponse addresses a minor bug that could cause any text in the message body that resembles a “To” header to be replaced with something other than what the user intended. There was a fairly small chance that this would happen, but it’s an improvement nonetheless. You can find the new version on the projects page.

Autoresponse 1.6.1 (bugfix) released!

Well the first round of bugs have been discovered (and fixed). The major issue resolved by this release is that a rogue user with a forged from header could set an autoresponse message for someone else. We now require SASL authentication which addresses this. This is a highly recommended update; you can find it under the “projects” link in the upper-right corner.

Go to Top