gdSc@sdZddlZddlZddlZddlZddlZddlZddlmZyddl m Z Wn!e k rddl m Z nXddl m Z ddlmZmZddlmZddlmZdd lmZdd lmZdd lmZmZdd lmZmZdd l m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'ddl(m)Z)ddl*m+Z+m,Z,ddl-m.Z.m/Z/ddl0m1Z1ddl2m3Z3ddl4m5Z5ddl6m7Z7ddl8m9Z9ddl:m;Z;ddl<m=Z=ddl>m?Z?m@Z@mAZAddlBmCZCmDZDmEZEdZFdZGdZHde9fdYZIdeIfd YZJd!eIfd"YZKd#eIfd$YZLd%eLfd&YZMeMZNd'eLfd(YZOdS()s sphinx.builders.html ~~~~~~~~~~~~~~~~~~~~ Several HTML builders. :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. iN(tpath(tmd5(tnodes(t DocTreeInputt StringOutput(t Publisher(t new_document(t OptionParser(tReader(t package_dirt __version__(tjsonimpltcopy_static_entry(tSEPtos_patht relative_urit ensuredirtmovefilet ustrftimetcopyfile(tinline_all_toctrees(tpatmatchtcompile_matchers(tanytb(t SphinxError(t_(tjs_index(tTheme(tBuilder(tENV_PICKLE_FILENAME(tPygmentsBridge(tboldt darkgreentbrown(t HTMLWritertHTMLTranslatortSmartyPantsHTMLTranslators objects.invt last_buildcCsrt|tr%tt|jSt|ttfrStd|D}ntt|j dj S(s Return a stable hash for a Python data structure. We can't just use the md5 of str(obj) since for example dictionary items are enumerated in unpredictable order due to hash randomization in newer Pythons. css|]}t|VqdS(N(tget_stable_hash(t.0to((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pys Astutf8( t isinstancetdictR'tlisttitemsttupletsortedRtunicodetencodet hexdigest(tobj((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR'8s tStandaloneHTMLBuildercBseZdZdZdZeZeZdZdZ e Z eZ ddddgZ dZeZeZdd d gZgZd d d dgZd0ZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'd Z(d!Z)d"Z*d#Z+d$Z,d%Z-d&Z.ed'Z/d(Z0d)Z1d0d*Z2d+d0d0d,Z3d-Z4d.Z5d/Z6RS(1s& Builds standalone HTML docs. thtmls.htmls image/svg+xmls image/pngs image/gifs image/jpegssearchindex.jss_static/jquery.jss_static/underscore.jss_static/doctools.jss localtoc.htmlsrelations.htmlssourcelink.htmlssearchbox.htmlcCsd|_d|_i|_d|_|j|j|j|jj dk rf|jj |_ n|jj dk r|jj |_ n |j |_ |jj dk r|jr|jjdqndS(Nts_static/translations.js(t config_hasht tags_hasht secnumberstNonetcurrent_docnametinit_templatestinit_highlightertinit_translator_classtconfigthtml_file_suffixt out_suffixthtml_link_suffixt link_suffixtlanguaget_get_translations_jst script_filestappend(tself((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pytinitcs         cCstjtd|jjddtjtjd|jjdgg|jjD]$}tj||jjdd^qL}x!|D]}tj|r~|Sq~WdS(Ntlocalet LC_MESSAGESs sphinx.jssshare/sphinx/locale( RtjoinR R@REtsystprefixt locale_dirstisfileR;(RItdirt candidatestjsfile((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyRF{s 5 cCs|jj|jjfS(N(R@t html_themethtml_theme_options(RI((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pytget_theme_configscCsvtj|j|jjd|j|j\}}t||_|j|_ |j |j j ||jdS(Ntwarn( Rt init_themestconfdirR@thtml_theme_pathRXRWtthemetcopyt theme_optionstcreate_template_bridget templatesRJ(RIt themenamet themeoptions((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR=s  cCsj|jjdk r!|jj}n*|jrE|jjddd}nd}td||jj|_dS(NR\tpygments_styletnonetsphinxR6(R@RcR;R\t get_confstrRttrim_doctest_flagst highlighter(RItstyle((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR>s  cCsR|jjr-|jj|jjd|_n!|jjrEt|_n t|_dS(Nshtml_translator_class setting(R@thtml_translator_classtappt import_objectttranslator_classthtml_use_smartypantsR%R$(RI((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR?s     c #stfdjjjD}t|_ttj_d}}yt t j j d}z|j }|jdkrtn|j |j jjd\}}|dkrtn|j jjd\}}|dkrtnWd|jXWnAtk rZjdt j j dntk rjnX|jks|jkrxjjD] }|VqWdSjrjj} nd } xjjD]}|jjkr|Vqnj|} yt j| } Wntk r5d } nXy<tt jjj|| } | | krq|VnWqtk rqXqWdS( Nc3s8|].\}}|ddkr|j|fVqdS(iR6N(R@(R(tnametdesc(RI(s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pys s R7s .buildinfos# Sphinx build info version 1s: R@ttagss1unsupported build info format in %r, building alli(R,R@tvaluest iteritemsR'R8R0RqR9topenRRMtoutdirtreadlinetrstript ValueErrortstriptsplittcloseRXt Exceptiontenvt found_docsR`tnewest_template_mtimetall_docstget_outfilenametgetmtimetmaxtdoc2pathtEnvironmentError( RItcfgdicttold_config_hasht old_tags_hashtfptversiontcfgttagtdocnamettemplate_mtimet targetnamet targetmtimetsrcmtime((RIs>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pytget_outdated_docss`    !  !             cCs|d kridd6Sttd}|j||jd krvtdtdt|_|jjdddn|j}t |_ t ||_ |j d id d 6d |j|d |jd d |j|j jS( s$Utility: Render a lone doctree node.R7tfragmentst source_classtdestination_classt standalonetrestructuredtextt pseudoxmlR1toutput_encodingN(R;RRRHt _publisherRRRtset_componentst DoctreeReadertreaderR#twritertprocess_programmatic_settingst set_sourcetset_destinationtpublishtparts(RItnodetdoctpub((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pytrender_partials&         c1Csddlm}m}|jjp+|jj}| sA||krJd}n||j||jj|jj|_ |j |t ||_ t d|jjd|j fdtj|_t|jj|j_g|_|jj}|rx|jjjD]}x|jD]}d|j|jf}t|trS||krSqqSn|dkrr|jj rrqn||j\} } | r|jj||| | fqqWqWn|jj } | dk rt"| pt#d |_$n d|_$|jj%rt&j'|jj%pd } |jj(rAt&j'|jj(pDd } | ryt)j&j*| d d kry|j+d nt|jj,t-s|j+dn|jj.|_/g}|j0ddr|jdt#ddt#dfnxH|jD]=\}}} } |j1r|j||j2d |j1fqqW|jj3dk r\|jj3}n'|j4r}|j4j5dd}nd}t6d|j7d|jj8d|jj9d|jj:d|j$d|jj;d|jj<d|jj,d |jj=d!|jj>d"|jj?d#|jj@d$|jjAd%|jjBd&|jCd'|jDd(|jEd)tFd*|d+|d,|jd-gd.| d/| |_G|j4r|jGjHd0|j4jI|jJjKDn|jGjH|jjLdS(1Ni(t IndexBuildert languagestentdefaultst componentstread_config_filess%s-%ss py-modindexs %b %d, %YR7is.icos html_favicon is not an .ico files5html_use_opensearch config value must now be a stringt use_indexR6tgenindexs General IndextItindexR\t stylesheets default.csstembeddedtprojecttreleaseRt last_updatedt copyrightt master_doctuse_opensearcht docstitlet shorttitletshow_copyrightt show_sphinxt has_sourcet show_sourcet file_suffixRGt css_filestsphinx_versionRitrellinkstbuildertparentstlogotfaviconcss%|]\}}d||fVqdS(ttheme_N((R(tkeytval((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pys `s(Mt sphinx.searchRRR@thtml_search_languageRER}thtml_search_optionsthtml_search_scorertindexert load_indexerR#t docwriterRtsettingstTruetget_default_valuest docsettingstboolthtml_compact_listst compact_liststdomain_indicesthtml_domain_indicestdomainst itervaluestindicesRoR+R-thtml_use_modindextgenerateRHthtml_last_updated_fmtR;RRRt html_logoRtbasenamet html_favicontostsplitextRXthtml_use_opensearcht basestringtcollect_relationst relationstget_builder_configt shortnamet localnamet html_styleR\RfR,RRRRRRt html_titlethtml_short_titlethtml_show_copyrightthtml_show_sphinxthtml_copy_sourcethtml_show_sourcelinkRBRGRR t globalcontexttupdatet get_optionsR^Rst html_context(RItdocnamesRRtlangtindices_configtdomaintindexclst indexnametcontenttcollapsetlufmtRRRt stylename((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pytprepare_writings             !     "(                       #cCsd}}g}|jd}|jj|}|jj} |r|drydi|j||dd6|j| |ddd6}|j|d|ddt dfWqt k rd}qXn|r^|dr^ydi|j||dd6|j| |ddd6}|j|d|ddt d fWq^t k rZd}q^Xnx|r|d ryD|ji|j||d d6|j| |d dd6Wnt k rnX|jj|d }qaW|r|j n|j |jj j|} | r.|j| dp1d } |jjrJ|d pMd } |jjj|} |jj||} |j| d }td|d|d|d| d| d|d|d|d| d|d|jj|dk S(s1Collect items for the template context of a page.RitlinkttitletNtnextitPtpreviousiR7s.txtRRtprevtmetatbodytmetatagst sourcenamettoct display_tocN(R;RRtgetR}ttitlestget_relative_uriRRHRtKeyErrortpoptreverset longtitlesR@Rtmetadatat get_toc_forR,ttoc_num_entries(RIRR R R RRRtrelatedRRR R tself_tocR((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pytget_doc_contextdsd  +  +  $   cCstdd}|j|_|jjj|i|_t|j|d|_ t|j|d|_ ||_ |j j |||j j|j jd}|j j}|j|||}|j||d|dS(Ntencodingsutf-8t_imagest _downloadsRt event_arg(RRRR}ttoc_secnumbersRR:Rtget_target_uritimgpathtdlpathR<Rtwritetassemble_partsRt clean_metaRt handle_page(RIRtdoctreet destinationR R tctx((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyt write_docs    cCsst|j|d|_|j||jjj|}|rV|j|dpYd}|j|||dS(NRRR7( RR"R#tpost_process_imagesR}RRRt index_page(RIRR)R((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pytwrite_doc_serializeds  cCs|jtdddxG|jjdD]3}x*|D]"\}}}|j|||q9Wq,W|jddr|jn|j|jdkr|jddd|jd id nxJ|j j j D]6\}}|jd |dd|j|i|qW|j j rs|jdkrs|jd ddt j|jd d}|jdidd|n|j|j|j|j|j|j|jdS(Nswriting additional files...tnonlishtml-collect-pagesRR6thtmlhelps searchtsearchs search.htmlt s opensearcht_staticsopensearch.xmlt opensearcht outfilename(tinfoR RktemitR(Rtwrite_genindextwrite_domain_indicesRoR@thtml_additional_pagesR.RRRMRutcopy_image_filestcopy_download_filestcopy_static_filestcopy_extra_filestwrite_buildinfot handle_finish(RItpagelisttpagenametcontextttemplatetfn((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pytfinishs0        c Cs+|jj|}g}x1|D])\}}|jtd|DqWtd|d|d|jj}|jddd|jjr|jd|d |jd |d xrt ||D]K\\}}}i|d 6|d 6|d6|d6}|jd||dqWn|jd|d dS(Ncss+|]!\}\}}dt|VqdS(iN(tlen(R(Rtsubitems((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pys stgenindexentriestgenindexcountst split_indexs genindexR0iRsgenindex-split.htmls genindex-alls genindex.htmlRtentriestcounts genindex-sgenindex-single.html( R}t create_indexRHtsumR,R@thtml_split_indexR7R(tzip( RIRt indexcountsRRMtgenindexcontextRRNR+((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR9s*   " cCslxe|jD]Z\}}}}td|jd|d|}|jd|dd|j||dq WdS(Nt indextitleRtcollapse_indexR3R0isdomainindex.html(RR,RR7R((RIRRRRt indexcontext((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR:s  cCs|jrttj|jdx|j|jdtt|jD]}|j|}y2ttj|j |tj|jd|WqGt k r}|j dtj|j ||fqGXqGWndS(NRscopying images... scannot copy image file %r: %s( timagesRRRMRutstatus_iteratorR"RHRtsrcdirR|RX(RItsrctdestterr((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR<s   cCs|jjrttj|jdx|j|jjdtt|jjD]}|jj|d}y2t tj|j |tj|jd|WqPt k r}|j dtj|j ||fqPXqPWndS(NRscopying downloadable files... is$cannot copy downloadable file %r: %s( R}tdlfilesRRRMRuRYR"RHRRZR|RX(RIR[R\R]((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR=s  cCs|jtddtttj|jdttj|jddd}|j|j j |j |j j dk r|j}|rt|tj|jddqn|jj}|j|jj|jr[g|jjdddD]}tj|d^q}x3|D](}t|tj|jd||q,Wng|j jD]}tj|j|^qh}t|j jg|j jD]} d | ^q} x\|D]T}tj|s|jd |qnt|tj|jd||d | qW|j j rtj!|j j } tj|jd| } tj"tj|j|j j s|jd |j j qtj"| sttj|j|j j | qn|j j#rwtj!|j j#} tj|jd| }tj"tj|j|j j#s@|jd |j j#qwtj"|swttj|j|j j#|qwn|jddS(Nscopying static files... R0R4s pygments.csstwstranslations.jsitstatics**/s(html_static_path entry %r does not existtexclude_matchersslogo file %r does not existsfavicon file %r does not existtdone($R7R RRRRMRuRtR%Rhtget_stylesheetR{R@RER;RFRRR]RRtcontext_for_searchtoolR\t get_dirchainR thtml_static_pathRZRtexclude_patternstexclude_dirnamestexistsRXRRRQR(RItfRTR+t themepatht themeentriestentrytspatht staticentriestdtmatcherstlogobaset logotargetticonbaset icontarget((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR>-s\!   8 + '  $  $ cCs|jtddtg|jjD]}tj|j|^q&}xG|D]?}tj|sz|j d|qNnt ||j |qNW|jddS(Nscopying extra files... R0s'html_extra_path entry %r does not existRb( R7R RR@thtml_extra_pathRRMRZRiRXR Ru(RItepatht extraentriesRm((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR?gs+ cCsQttj|jdd}z!|jd|j|jfWd|jXdS(Ns .buildinfoR_s# Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. config: %s tags: %s (RtRRMRuR%R8R9R{(RIR((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR@ss  cCs|jr|jjndS(N(R\tcleanup(RI((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyRys cstj||x|jtjD]d }tfd|D s#tjtjrgq#nd}tjdddt }||j krt j |j |j ||d/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pys sturiR7tinternaltrefuriN(Rzswidthsheight(RR-ttraverseRtimageRR+tparentt referenceRRXt posixpathRMR#t replace_selfRH(RIR)t scale_keysR}R((Rs>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR-s    cCst|jjt|}ywtj|j|j}|jr[tj |ddd}nt |d}z|j j ||j Wd|j XWn0tttfk r|r|jdqnX|j j|dS(NtrRsutf-8trbscsearch index couldn't be loaded, but not all documents will be built: the index will be incomplete.(tsetR}RRRMRutsearchindex_filenametindexer_dumps_unicodetcodecsRtRtloadtindexer_formatR{tIOErrortOSErrorRxRXtprune(RIRtkeept searchindexfnRj((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyRs cCs2|jdk r.|r.|jj|||ndS(N(RR;tfeed(RIRCR)R((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR.scKs?d|krt|d/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyt_get_local_toctrees  cCs tj|jt||jS(N(RRMRuRRB(RIRC((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyRsc Csd}d}d}d}x|jjjD]n\}}t||r.|r||r||r.|jd|||fq.q.qn|}|}q.q.W|dkrnt|tr|}d}n||d<||d/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pys ss*?[(R(R((Rs>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyt has_wildcardss8page %s matches two patterns in html_sidebars: %r and %rtsidebarst customsidebar(R;R@t html_sidebarsRsRRXR+R( RIRCR+RRtmatchedRRt patsidebars((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyt add_sidebarss*         cCs ||jS(N(RD(RIRttyp((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR"ss page.htmlcsCjj}|d<|d<j}|jddd}t|fd}||d<fd|d <jd krjj|d <} nj|d <} fd |d <j ||j |j j d|||yj j||} Wn#tk r<jddSX|sUj}nttj|y;tj|d| d} z| j| Wd| jXWn0ttfk r} jd|| fnXjr?|jdr?tjjdt|d} ttj| t j!j"| ndS(NRCtcurrent_page_namet#iicsG|rd|kr|S|s.j|}nt||p@d}|S(Ns://R(R"R(totheruritresourcetbaseuriR}(RI(s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pytpathtos Rcs|jjkS(N(R}R(Ro(RI(s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pytsthasdocR1Rcsj|S(N(R(tkw(RCRI(s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyRsttoctreeshtml-page-contextsa Unicode error occurred when rendering the page %s. Please make sure all config values that contain non-ASCII content are Unicode strings.R_txmlcharrefreplaceserror writing file %s: %sR t_sources(#RR]R"trsplitRRoR@thtml_output_encodingRRRRkR8R`trendert UnicodeErrorRXRRRtdirnameRRtR%R{RRt copysourceRRMRuRRR}R(RIRCtaddctxt templatenameR6R R+tdefault_baseuriRRtoutputRjR]t source_name((RCRIs>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR(sH     cCs|j|jdS(N(tdump_search_indextdump_inventory(RI((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyRAs c Cs||jtddtttj|jtd}z&|jd|j j |j j fj dt jd}x|jjjD]\}}x|jD]\}}}}} } | j|r| t| d} n|j|d| } ||kr d }n|j|jd |||| | |fj dqWqW|j|jWd|jX|jd dS( Nsdumping object inventory... R0twbup# Sphinx inventory version 2 # Project: %s # Version: %s # The remainder of this file is compressed using zlib. sutf-8i t$Ru-u%s %s:%s %s %s %s Rb(R7R RRtRRMRutINVENTORY_FILENAMER%R@RRR2tzlibt compressobjR}RRst get_objectstendswithRHR"tcompresstflushR{( RIRjt compressort domainnameRRotdispnamettypeRtanchortprioR}((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyRs,  "     cCs|jtddt|jj|jjtj|j |j }|j rot j |dddd}nt |dd}z|jj||jWd|jXt|d||jddS( Nsdumping search index... R0s.tmpR_Rsutf-8RRb(R7R RRRR}RRRMRuRRRRttdumpRR{R(RIRRj((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR;s  N(7t__name__t __module__t__doc__RotformatRRtallow_parallelRBRDRRRtsupported_image_typesRtadd_permalinksRRRGRtdefault_sidebarsR;RRJRFRWR=R>R?RRRRR,R/RGR9R:R<R=R>R?R@RyR-RR.RRRR"R(RARR(((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR5Esj      7  k E   )    :       9  tDirectoryHTMLBuildercBs2eZdZdZddZdZdZRS(s A StandaloneHTMLBuilder that creates all HTML pages as "index.html" in a directory given by their pagename, so that generated URLs don't have ``.html`` in them. tdirhtmlcCs3|dkrdS|jtdr+|d S|tS(NRR7i(RR (RIRR((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR"Us  cCsm|dks|jtdrDtj|jt||j}n%tj|jt|d|j}|S(NR(RR RRMRuRRB(RIRCR6((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR\s cCs!tj||t|jd/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyRfsN(RRRRoR;R"RR(((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyRMs   tSingleFileHTMLBuildercBsheZdZdZeZdZd dZd dZ dZ dZ dZ dZ d ZRS( sb A StandaloneHTMLBuilder subclass that puts the whole document tree on one HTML page. t singlehtmlcCsdS(Ns all documents((RI((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyRsscCs:||jjkr+|jj|jd|S||jSdS(Ns #document-(R}RR@RRB(RIRR((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR"vscCs|j||S(N(R"(RItfrom_ttoR((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyRscCs|jj|j}x|jtjD]z}d|kr>q&n|d}|jd}|dkriq&n|jd|d}|dkr&||||d/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyt fix_refuriss    cCsj|jj}|jj|}t|t||t}||d<|jj||||j||S(NR( R@RR}t get_doctreeRRR!tresolve_referencesR(RItmasterR((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pytassemble_doctrees   cCs|jj|jj|t}|rM|j||j|d}t}n d}t}tdgddddddd|jj ddd |d |d gd dd |d| S(NRR7RR RRRR R R RR RR( R}RR@RRRRRR,R;R(RIRR R RR((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyRs(   cGs|jj}|jtddt|j||jd|jtddt|j}|j|jtddt|j|jj ||j |jj ||jddS(Nspreparing documents... R0Rbsassembling single document... s writing... ( R}RR7R RRRR/R@RR,(RItignoredRR)((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR%s     cCs|jtdddxJ|jjjD]6\}}|jd|dd|j|i|q,W|jjr|jdddtj|j dd}|jdidd |n|j|j |j |j |j |j|jdS( Nswriting additional files...R0iR3s opensearchR4sopensearch.xmlR5R6(R7R R@R;R.R(RRRMRuR<R=R>R?R@R(RIRCRERF((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyRGs       N(RRRRoRRRR;R"RRRRR%RG(((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyRks     tSerializingHTMLBuildercBsqeZdZd ZeZd Zd ZddddgZ dZ d dZ dZ dd d d Z d ZRS( sA An abstract builder that serializes the generated HTML. s image/svg+xmls image/pngs image/gifs image/jpegcCs<d|_d|_d|_d|_|j|jdS(NR7(R8R9R;R\R`R?R>(RI((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyRJs      cCs3|dkrdS|jtdr+|d S|tS(NRR7i(RR (RIRR((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR"s  cCsb|jr$tj|ddd}nt|d}z|jj|||jWd|jXdS(NR_Rsutf-8R(timplementation_dumps_unicodeRRttimplementationRtadditional_dump_argsR{(RIRDtfilenameRj((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyt dump_contexts  s page.htmlcCs||d<|j|||sEtj|jt||j}n|jjd||||ttj ||j |||j drtj|jdt|d}ttj |t |j j||ndS(NRshtml-page-contextR R(RRRMRuRRBRkR8RRRRRR}R(RIRCR+RR6R R((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR(s   cCstj|j|j}|j|j|tj|ttj|j t tj|jt t tj|jt dj dS(NR_(RRMRutglobalcontext_filenameRRR5RARt doctreedirRRttLAST_BUILD_FILENAMER{(RIR6((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyRAs  N((RRRR;RRRRRRRJR"RR(RA(((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyRs    tPickleHTMLBuildercBsJeZdZeZeZejfZeZ eZ dZ dZ dZ dZRS(sD A Builder that dumps the generated HTML into pickle files. tpickles.fpicklesglobalcontext.picklessearchindex.pickle(RRRRRRRtHIGHEST_PROTOCOLRRRRoRBRR(((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyR/s tJSONHTMLBuildercBsGeZdZeZeZeZeZdZ dZ dZ dZ dZ RS(sB A builder that dumps the generated HTML into JSON files. tjsons.fjsonsglobalcontext.jsonssearchindex.jsoncCs/tjdkrtdntj|dS(NsmThe module simplejson (or json in Python >= 2.6) is not available. The JSONHTMLBuilder builder will not work.(R RR;RRRJ(RI((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyRJNs (RRRR RRRRRRoRBRRRJ(((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyRAs(PRRRNRRRtcPickleRRthashlibRt ImportErrortdocutilsRt docutils.ioRRt docutils.coreRtdocutils.utilsRtdocutils.frontendRtdocutils.readers.doctreeRRReR R t sphinx.utilR R tsphinx.util.osutilR RRRRRRtsphinx.util.nodesRtsphinx.util.matchingRRtsphinx.util.pycompatRRt sphinx.errorsRt sphinx.localeRRRtsphinx.themingRtsphinx.buildersRtsphinx.applicationRtsphinx.highlightingRtsphinx.util.consoleR R!R"tsphinx.writers.htmlR#R$R%RRR'R5RRRRtWebHTMLBuilderR(((s>/usr/local/lib/python2.7/site-packages/sphinx/builders/html.pyt sZ       4  pT