diff options
author | Will Kahn-Greene <willg@bluesock.org> | 2011-05-03 12:07:01 -0400 |
---|---|---|
committer | Will Kahn-Greene <willg@bluesock.org> | 2011-05-03 12:08:09 -0400 |
commit | 9610848c298fff67da83abd495a44be86dd4eea3 (patch) | |
tree | 1a4d2f0fb840f62d0b1b56ee81c756af43c2da8f /docs/mgext/youcanhelp.py | |
parent | 8ac897c3b6834120eeaec6e8cd1646032b1b3739 (diff) | |
download | mediagoblin-9610848c298fff67da83abd495a44be86dd4eea3.tar.lz mediagoblin-9610848c298fff67da83abd495a44be86dd4eea3.tar.xz mediagoblin-9610848c298fff67da83abd495a44be86dd4eea3.zip |
Lots of documentation changes
* added a YouCanHelp directive to replace FIXMEs and encourage contributors
to help out
* moved some bits around between the hacking howto and the codebase documents
* expanded on the stub nature of the theming howto
* tweaked some other text
Diffstat (limited to 'docs/mgext/youcanhelp.py')
-rw-r--r-- | docs/mgext/youcanhelp.py | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/docs/mgext/youcanhelp.py b/docs/mgext/youcanhelp.py new file mode 100644 index 00000000..a99d0e4d --- /dev/null +++ b/docs/mgext/youcanhelp.py @@ -0,0 +1,44 @@ +from docutils import nodes + +from sphinx.util.compat import Directive, make_admonition + +class youcanhelp_node(nodes.Admonition, nodes.Element): + pass + +class YouCanHelp(Directive): + has_content = True + required_arguments = 0 + optional_arguments = 0 + final_argument_whitespace = False + option_spec = {} + + def run(self): + ad = make_admonition( + youcanhelp_node, + self.name, + ["You Can Help!"], + self.options, + self.content, + self.lineno, + self.content_offset, + self.block_text, + self.state, + self.state_machine) + ad[0].line = self.lineno + return ad + +def visit_youcanhelp_node(self, node): + self.visit_admonition(node) + +def depart_youcanhelp_node(self, node): + self.depart_admonition(node) + +def setup(app): + app.add_node( + youcanhelp_node, + html=(visit_youcanhelp_node, depart_youcanhelp_node), + latex=(visit_youcanhelp_node, depart_youcanhelp_node), + text=(visit_youcanhelp_node, depart_youcanhelp_node) + ) + + app.add_directive('youcanhelp', YouCanHelp) |