Hi,

#Warning: First post!#

I've been documenting a fabfile and generating docs using Sphinx
autodoc. I want nice HTML docs and I want to play nicely with fabfile
-l and -d.

Here's an example:

    def jsmin(directory="media/js"):
        """
        directory=media/js

        Minify the JavaScript files in the directory specified.

        Files that have already been minified (``*.min.js``) are ignored.

        **Example:**
        ::
            # minify the JavaScript in the media/js (default) directory
            fab jsmin
            # minify the JavaScript in the javascript directory
            fab jsmin:javascript
        """

As you can see the first line of the func.__doc__ is (almost) a mirror
of the function argspec.  So when I run fabfile -l I get:

    jsmin        directory=media/js

I don't mind the reStructured text appearing when I run fabfile -d
jsmin but it's not ideal.

So I'm wondering what do people think is the best approach here? All I
can think of is to not use autodoc and to write the documentation by
hand for Sphinx. The problems here are that it might go stale, and
there will be some duplication with the fabric sympathetic __doc__
I'll have to write anyway.

Thanks for any advice,
-John

twitter: http://twitter.com/jkeyes
web: http://keyes.ie

_______________________________________________
Fab-user mailing list
Fab-user@nongnu.org
http://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to