Go to content Go to menu

Django Microformats

19 April 2009

I’ve just created a new Django application that makes it easier to integrate and use Microformats in your web-application. I’m hosting it on GitHub:

http://github.com/ntoll/microformats/tree/master

All you need to do is run the following command from within your own Django project:


git clone git://github.com/ntoll/microformats.git

... and remember to add it to the INSTALLED_APPS section of your settings.py file.

Microformats are a means of adding semantic information that is both human and machine readable to a web-site. In order to work with Microformats you need to use a toolkit such as Oomph or the Operator Add-on for Firefox (that supports more types of microformat).

The following YouTube video from the Oomph team pretty much explains the basics:

By using the Django microformats application you get the following:

  • Models relating to the geo, hCard, adr, hCalendar and XFN microformats.
  • Simplified forms for the geo, hCard, adr, org, email, tel and hCalendar microformats and fragments.
  • The bare minimum admin functionality.
  • Template filters for the geo, hCard, adr, hCalendar and XFN microformats.

To use the template filters you need to register the application and add:


{% load microformat_extras %}

to the top of the template you’re using.

For an example of this in use check out the end of the following test file:


microformats/unit_tests/test_templatetags.py

Running the unit tests (./manage.py test microformats) will result in an example file demonstrating the HTML markup produced by the template filters:


microformats/unit_tests/html_test/microformat_test.html

I’ve included the Oomph javascript library so you can play with the microformats if you open the file in your browser. If you’re using Firefox try it with the Operator add-on. IE8 supports Microformats natively.

This is a first shot at integrating Microformats into Django. There are missing microformats and I’m pretty sure some of the models could be improved as could the template filters. Inevitably the code needs to be cleaned up too. I’ll be using this library in a new web-application so expect this code to change as I find flaws and gremlins through using it “in anger”.

Feedback would be most welcome.


Read the full article...

Whither AIMLBot 3.0?

7 March 2008

The short answer: There isn’t going to be an AIMLBot 3.0.

However…


Read the full article...

I have some time on my hands in the evenings at the moment so I hope to do some extensive re-factoring and development on the AIMLBot project.

The primary objective is the release of version 3.0 of the library. This article lists the aims and objectives required for this work and provides an update on a couple of my other projects.


Read the full article...

TalentTool and Technology

8 February 2007

Since releasing the open-source version of Program# I have been planning and developing the commercial version, writing a web-based expert system and working on the TalentTool project.

This post is a summary of my vision of how TalentTool works, how various emerging technologies are incorporated into the application to support this vision and the progress made so far.


Read the full article...

A Web-Based Expert System

6 November 2006

An expert system is a program that uses a set of rules to analyse information about a specific subject with a view to solving problems or giving advice. It emulates a human expert’s problem solving ability by performing relevant tasks as well as, or better than, the expert. Often, the expert system will explain and justify its output and provide a measure of certainty in the appropriateness of the output. Furthermore, the output given by an expert system is, as is the case with humans, heuristic (a rule of thumb) rather than algorithmic (guaranteed to succeed).

Expert systems are incredibly useful tools. Traditional tasks have included:

  • Data interpretation – such as responding to business “intelligence” like key performance indicators.
  • Problem diagnosis – such as advising on equipment failure or human diseases.
  • Configuration of complex systems – such as guiding the set-up of computer software.
  • Planning actions – such as advising on business strategy or suggesting robotic manoeuvres.

This article briefly explains the capabilities of yet another project I am currently developing: an easy-to-use web-based expert system that acts as a marketplace for sharing and disseminating knowledge and expertise.


Read the full article...