Sphinx, Pygments and the logrotate format.
Yesterday, I have just noted there is logrotate lexer for Pygments. I just developed this one for you.
If you want to contribute, please a simple Pull Request on the page of the project.
Here is the repository of the project: git://github.com/matrixise/pylogrotate.git
You are invited to contribute to this project ;-)
git clone git://github.com/matrixise/pylogrotate.git virtualenv ~/.virtualenvs/pylogrotate source ~/.virtualenvs/pylogrotate cd pylogrotate python setup develop
If you want to use it with pygmentize, just download it and install it in a VirtualEnv, see the "Installation" section.
pygmentize -l logrotate -O full -f /tmp/test.html logrotate.conf
In order to use it with Sphinx, just install it and define in your conf.py file a setup function as defined in the below example.
def setup(app): from pylogrotate.lexer import LogrotateLexer app.add_lexer('logrotate', LogrotateLexer())