excess.org

Ian Ward

Software
CKAN contributor/tech lead
Urwid author
PyRF contributor
Speedometer author

Presentations
Contributing to Open Source
IASA E-Summit, 2014-05-16
Urwid Applications
2012-11-14
Urwid Intro
2012-01-22
Unfortunate Python
2011-12-19
Django 1.1
2009-05-16

Writing
Moving to Python 3
2011-02-17
Article Tags

Home

Ian Ward's email:
first name at this domain

wardi on OFTC, freenode and github

Locations of visitors to this page

Sphinx Presentation at OPAG

Sphinx logo
Posted on 2010-08-29.

I will be giving a talk at the September meeting of the Ottawa Python Authors Group covering some documentation work I have done recently using Sphinx domains and a custom Pygments lexer.

I am working on an embedded device for a client that includes a proprietary text command language. Sphinx supports documenting many common languages like C, Python and Ruby, but with the 1.0 release it now allows adding "domains" for new languages. I have used this feature to create a domain for this command language.

Sphinx uses Pygments to provide syntax hilighting for source code examples. None of the available options fit this command language so I also created a custom lexer for this command language in just a few lines of code.

My talk will cover creating these extensions for Sphinx and Pygments.

Tags: Ottawa Software Python OPAG