This was cross-posted to the Code for South Africa blog: http://code4sa.org/2015/03/03/indigo-legislation-platform.html
Cape Town, 3 March 2015
By Greg Kempe
Together with AfricanLII and funding from the Indigo Trust, we're building an open-source legislation consolidation and publishng platform. Our goal is to help them provide free access to online legislation in Africa. We want to make it simpler to publish legislation in standardised formats that are easy to read, navigate, share and analyse.
In honour of our funding partner, we've called the project the Indigo Platform.
Writing, amending, consolidating, managing and publishing legislation is complicated and our budget is small. That's why we're focusing on only a few parts of the larger process -- consolidating and publishing -- and trying to keep it simple with an iterative development process and open standards.
It's still early in the project, but you can join us for the ride:
- Play with the platform: indigo.code4sa.org
- Check out our GitHub repo: Code4SA/indigo
- Read the documentation at: indigo.readthedocs.org
- Watch our progress on Pivotal Tracker
The Indigo platform relies heavily on Akoma Ntoso XML. This legislation standard is a huge step forward in the Free Access to Law movement, particularly in Africa. An open, widely-used, flexible format means we can treat legislation as data and not rely on presentation-focused formats such as MS Word documents or PDFs. We're not limited just to what published legislation looks like. Instead, we know where a chapter starts and ends, what a specific subsection actually says, and how to find a referenced Act. We can display, and cross-link, all this information in the way most suitable for the user.
While researching existing platforms and tools that we could use in this project, I was struck both by how few components are open source and how few are reusable (often because they're tightly integrated into an application).
I hope that we're building a platform that isn't just useful in its own right, but that also furthers the Free Access to Law Movement in just a small way. It's very hard to tell from the start which components of a platform like this will be reused. So we're maximising our chances of success by loosely coupling a handful of components:
- a simple Python library for interacting with Akoma Ntoso XML legislation files (more details soon)
- a public-facing REST API built with Django for vending Akoma Ntoso documents in XML and HTML
- an application API, also built with Django, to edit, consolidate and manage a legislation library
The components are documented at indigo.readthedocs.org and we'll be releasing the Python component as a standalone library soon.
No idea is truly original and we're leaning on a number of existing projects for inspiration, ideas and code:
- legislation.gov.uk is probably the most advanced free-access-to-legislation portal in the world
- NSESA is a Java/GWT toolkit for handling XML documents
- LIME is a web-based editor for Akoma Ntoso documents
- OER Pub is a web editor for open education resources
- Slaw is a Ruby library for parsing PDF into Akoma Ntoso and is used byopenbylaws.org.za. (Full disclosure: I'm the author of both Slaw and Open By-laws South Africa.)
Under the hood, we're using widely-used and well-documented technology to move quickly:
- Django and Django Rest Framework as server-side web frameworks
- Backbone for the client-side web application