Creating Documentation from Python Source Files with Doxygen and doxypy

I was recently generating some documentation from the Entertainer source code and decided to share how I managed to do it.
I’m assuming python 2.4 is installed on your system.
First install doxygen and graphviz
sudo apt-get install doxygen graphviz
Download the latest version of doxypy from http://code.foosel.org/doxypy and extract to a suitable location.
I used doxypy-0.3rc2.tar.gz
Now we need to generate a configuration file, to do this run the following from your project root folder
doxygen -g config.dox
Edit the file and set the following tags:
PROJECT_NAME = #Your Project Name would go here
PROJECT_NUMBER = #Your version/revision number goes here
OUTPUT_DIRECTORY = #Where you want the documentation going
FILE_PATTERNS = *.py
RECURSIVE = YES
INPUT_FILTER = "python /path/to/doxypy.py" #set this to where you extracted doxypy
FILTER_SOURCE_FILES = YES
INPUT = #where the source files are
If you want graphs also edit the following:
HIDE_UNDOC_RELATIONS = NO
HAVE_DOT = YES
CALL_GRAPH = YES
CALLER_GRAPH = YES
Run the following:
whereis dot
and enter the output into the following config tag:
DOT_PATH = /usr/bin/dot
Next ones are optional:
MULTILINE_CPP_IS_BRIEF = YES
DETAILS_AT_TOP = YES
EXTRACT_ALL = YES
EXTRACT_STATIC = YES
SHOW_DIRECTORIES = YES
SOURCE_BROWSER = YES
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 8
TOC_EXPAND = YES
DISABLE_INDEX = YES
GENERATE_TREEVIEW = YES
GENERATE_LATEX =YES
All set up now…
All we need to do now whenever you want to generate/regenerate the documentation is to run the following from the project root folder:
doxygen config.dox
Thanks to internetducttape.com as I used this blog entry as a starting point.
Recent Comments
Thanks, I thought I'd seen it somewhere before :)...
This one is really funny :) But Gentili should specify th...
Congratulations Joshua ! I'm very happy for you. Cheer...
Hey, many thanks, this is great... Johan, Belgium...
COOL! As we know, Entertainer has some way to go before it m...