ó ÿgdSc@sdZddlmZddlmZddlmZddlmZddl m Z m Z dej ej fd„ƒYZd ejej fd „ƒYZd e fd „ƒYZd „Zde fd„ƒYZd„Zd„Zd„Zd„Zd„ZdS(sž sphinx.ext.todo ~~~~~~~~~~~~~~~ Allow todos to be inserted into your documentation. Inclusion of todos can be switched of by a configuration variable. The todolist directive collects all todos of your project and lists them along with a backlink to the original location. :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. iÿÿÿÿ(tnodes(t_(tNoUri(tset_source_info(t Directivetmake_admonitiont todo_nodecBseZRS((t__name__t __module__(((s9/usr/local/lib/python2.7/site-packages/sphinx/ext/todo.pyRsttodolistcBseZRS((RR(((s9/usr/local/lib/python2.7/site-packages/sphinx/ext/todo.pyR stTodocBs5eZdZeZdZdZeZiZ d„Z RS(sO A todo entry, displayed (if configured) in the form of an admonition. ic Cs¤|jjjj}d|jdƒ}tjddd|gƒ}tt|j t dƒg|j |j |j |j|j|j|jƒ }t||dƒ|g|S(Nsindex-%stindexttidsR i(tstatetdocumenttsettingstenvt new_serialnoRttargetRRtnameRtoptionstcontenttlinenotcontent_offsett block_textt state_machineR(tselfRttargetidt targetnodetad((s9/usr/local/lib/python2.7/site-packages/sphinx/ext/todo.pytrun%s( RRt__doc__tTruet has_contenttrequired_argumentstoptional_argumentstFalsetfinal_argument_whitespacet option_specR(((s9/usr/local/lib/python2.7/site-packages/sphinx/ext/todo.pyR scCsü|jj}t|dƒs'g|_nxÎ|jtƒD]½}y<|j|jj|ƒd}t|t j ƒsxt ‚nWnt k r’d}nX|j ƒ}|d=|jji|jd6|jpÔ|j|jƒd6|jd6|d6|d6ƒq7WdS( Nttodo_all_todosiR tdocnametsourceRttodoR(tbuilderRthasattrR(ttraverseRtparentR t isinstanceRRt IndexErrortNonetdeepcopytappendR)R*tdoc2pathtline(tapptdoctreeRtnodeRtnewnode((s9/usr/local/lib/python2.7/site-packages/sphinx/ext/todo.pyt process_todos1s$         tTodoListcBs5eZdZeZdZdZeZiZd„Z RS(s% A list of all todo entries. icCs tdƒgS(NR (R (R((s9/usr/local/lib/python2.7/site-packages/sphinx/ext/todo.pyRUs( RRR R%R"R#R$R&R'R(((s9/usr/local/lib/python2.7/site-packages/sphinx/ext/todo.pyR<JscCs+|jds:x*|jtƒD]}|jj|ƒqWn|jj}t|dƒsag|_nxÃ|jt ƒD]²}|jds—|j gƒqqng}xv|jD]k}t j ddgƒ}t dƒ|d|df}||jdƒ } ||jd ƒd } |t j| | ƒ7}t jd d d tƒ} t jt d ƒt d ƒƒ} y=|jj||dƒ| d<| dcd|dd7> is located in %s, line %d.)R*Rs<>iR tinternalsoriginal entryR)trefurit#RtrefidR+(tconfigR.RR/tremoveR,RR-R(R t replace_selfRt paragraphRtfindtTextt referenceR!temphasistget_relative_uriRR4tresolve_references(R7R8t fromdocnameR9RRt todo_infotparat descriptiontdesc1tdesc2R:t innernodet todo_entry((s9/usr/local/lib/python2.7/site-packages/sphinx/ext/todo.pytprocess_todo_nodes[sF              cCsFt|dƒsdSg|jD]}|d|kr|^q|_dS(NR(R)(R-R((R7RR)R+((s9/usr/local/lib/python2.7/site-packages/sphinx/ext/todo.pyt purge_todos‘scCs|j|ƒdS(N(tvisit_admonition(RR9((s9/usr/local/lib/python2.7/site-packages/sphinx/ext/todo.pytvisit_todo_node˜scCs|j|ƒdS(N(tdepart_admonition(RR9((s9/usr/local/lib/python2.7/site-packages/sphinx/ext/todo.pytdepart_todo_node›sc Cs½|jdtdƒ|jtƒ|jtdttfdttfdttfdttfdttfƒ|jdtƒ|jdt ƒ|j d t ƒ|j d t ƒ|j d t ƒdS( NR=thtmltlatexttexttmanttexinfoR+R s doctree-readsdoctree-resolveds env-purge-doc(tadd_config_valueR%tadd_nodeR RRXRZt add_directiveR R<tconnectR;RURV(R7((s9/usr/local/lib/python2.7/site-packages/sphinx/ext/todo.pytsetupžs       N(R tdocutilsRt sphinx.localeRtsphinx.environmentRtsphinx.util.nodesRtsphinx.util.compatRRt AdmonitiontElementRtGeneralR R R;R<RURVRXRZRd(((s9/usr/local/lib/python2.7/site-packages/sphinx/ext/todo.pyt s  6