ó ÿgdSc@sdZddlmZddlmZddlmZddlmZddl m Z ddl m Z ddl mZdd lmZdd lmZdd lmZdd lmZmZdd lmZmZddlmZdZdefd„ƒYZdS(sÁ sphinx.builders.texinfo ~~~~~~~~~~~~~~~~~~~~~~~ Texinfo builder. :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. iÿÿÿÿ(tpath(tnodes(t FileOutput(t new_document(t OptionParser(taddnodes(t_(tBuilder(tNoUri(tinline_all_toctrees(tSEPtcopyfile(tboldt darkgreen(t TexinfoWriters©# Makefile for Sphinx Texinfo output infodir ?= /usr/share/info MAKEINFO = makeinfo --no-split MAKEINFO_html = makeinfo --no-split --html MAKEINFO_plaintext = makeinfo --no-split --plaintext TEXI2PDF = texi2pdf --batch --expand INSTALL_INFO = install-info ALLDOCS = $(basename $(wildcard *.texi)) all: info info: $(addsuffix .info,$(ALLDOCS)) plaintext: $(addsuffix .txt,$(ALLDOCS)) html: $(addsuffix .html,$(ALLDOCS)) pdf: $(addsuffix .pdf,$(ALLDOCS)) install-info: info for f in *.info; do \ cp -t $(infodir) "$$f" && \ $(INSTALL_INFO) --info-dir=$(infodir) "$$f" ; \ done uninstall-info: info for f in *.info; do \ rm -f "$(infodir)/$$f" ; \ $(INSTALL_INFO) --delete --info-dir=$(infodir) "$$f" ; \ done %.info: %.texi $(MAKEINFO) -o '$@' '$<' %.txt: %.texi $(MAKEINFO_plaintext) -o '$@' '$<' %.html: %.texi $(MAKEINFO_html) -o '$@' '$<' %.pdf: %.texi -$(TEXI2PDF) '$<' -$(TEXI2PDF) '$<' -$(TEXI2PDF) '$<' clean: rm -f *.info *.pdf *.txt *.html rm -f *.log *.ind *.aux *.toc *.syn *.idx *.out *.ilg *.pla *.ky *.pg rm -f *.vr *.tp *.fn *.fns *.def *.defs *.cp *.cps *.ge *.ges *.mo .PHONY: all info plaintext html pdf install-info uninstall-info clean tTexinfoBuildercBsweZdZdZdZdddgZd„Zd„Zd d„Z d d„Z d „Z d „Z d „Z d „ZRS(s= Builds Texinfo output to create Info documentation. ttexinfos image/pngs image/jpegs image/gifcCsg|_g|_dS(N(tdocnamest document_data(tself((sA/usr/local/lib/python2.7/site-packages/sphinx/builders/texinfo.pytinit\s cCsdS(Ns all documents((R((sA/usr/local/lib/python2.7/site-packages/sphinx/builders/texinfo.pytget_outdated_docs`scCs$||jkrt‚nd|SdS(Nt%(RR(Rtdocnamettyp((sA/usr/local/lib/python2.7/site-packages/sphinx/builders/texinfo.pytget_target_urics cCs|j||ƒS(N(R(Rtfrom_ttoR((sA/usr/local/lib/python2.7/site-packages/sphinx/builders/texinfo.pytget_relative_uriiscCsÇtt|jjƒ}|s,|jdƒdSg|_x‹|D]ƒ}|d}||jjkru|jd|ƒq<n|jj |ƒ|j t dƒr¥|d }n|jj ||dfƒq<WdS(NsGno "texinfo_documents" config value found; no documents will be writtenis?"texinfo_documents" config value references unknown document %stindexiûÿÿÿi( tmaptlisttconfigttexinfo_documentstwarnttitlestenvtall_docsRtappendtendswithR (Rtpreliminary_document_datatentryR((sA/usr/local/lib/python2.7/site-packages/sphinx/builders/texinfo.pytinit_document_datams      cGsç|jƒxÖ|jD]Ë}|d \}}}}|d7}d}}} t|ƒdkrs|dd!\}}} nt} t|ƒdkr˜|d} ntdtj|j|ƒddƒ} |jd |d d d ƒ|j || d |j j põgƒ} |jdd d ƒ|j | ƒt |ƒ} td|jjd| fdtƒjƒ}||_||_|d d|_|j j|_|pŒd|_| p›d|_|pªd|_||_|| _| j| | ƒ|jdƒqWdS(Nis.texitiitdestination_pathtencodingsutf-8s processing s... tnonlit appendicess writing... tdefaultst componentstread_config_filesiûÿÿÿs.infotdone(R*RtlentFalseRRtjointoutdirtinfotassemble_doctreeR ttexinfo_appendicestpost_process_imagesRRR$tsettingstTruetget_default_valuestauthorttitlettexinfo_filenamettexinfo_elementsttexinfo_dir_entryttexinfo_dir_categoryttexinfo_dir_descriptionRtwrite(RtignoredR)Rt targetnameR@R?tdirentryt descriptiontcategoryt toctree_onlyt destinationtdoctreet docwriterR<((sA/usr/local/lib/python2.7/site-packages/sphinx/builders/texinfo.pyRF€sD            cCs$t|g|ƒ|_|jt|ƒdddƒ|jj|ƒ}||d<|r½tdƒ}tjƒ}|tj ddƒ7}||7}x$|j t j ƒD]}||7}q W|}nt ||j||tƒ}||dusresolving references...t refdocnamet refsectnames (in t)(tsetRR8R R$t get_doctreeRRtsectionR@ttraverseRttoctreeR R&tresolve_referencest pending_xreftemphasisR#t startswithtTextRt replace_self(Rt indexfileRLR/ttreetnew_treetnew_secttnodet largetreeRtappendixt pendingnodetsectnametnewnodestsubdirR@((sA/usr/local/lib/python2.7/site-packages/sphinx/builders/texinfo.pyR9¤sF               %cCsH|jr‘|jtdƒddƒx_|jjƒD]N\}}|jd|ddƒttj|j|ƒtj|j|ƒƒq2W|jƒn|jtdƒdt ƒtj|jdƒ}|j|ddƒy2t |dƒ}z|j t ƒWd|j ƒXWn0ttfk r6}|jd||fƒnX|jd ƒdS( Nscopying images...R.iRPs!copying Texinfo support files... tMakefiletwserror writing file %s: %ss done(timagesR8R t iteritemsR RR6tsrcdirR7R=topenRFtTEXINFO_MAKEFILEtclosetIOErrortOSErrorR"(Rtsrctdesttfntmkfileterr((sA/usr/local/lib/python2.7/site-packages/sphinx/builders/texinfo.pytfinishÎs$  N(t__name__t __module__t__doc__tnametformattsupported_image_typesRRtNoneRRR*RFR9Ry(((sA/usr/local/lib/python2.7/site-packages/sphinx/builders/texinfo.pyRSs       $ *N(R|tosRtdocutilsRt docutils.ioRtdocutils.utilsRtdocutils.frontendRtsphinxRt sphinx.localeRtsphinx.buildersRtsphinx.environmentRtsphinx.util.nodesR tsphinx.util.osutilR R tsphinx.util.consoleR R tsphinx.writers.texinfoRRpR(((sA/usr/local/lib/python2.7/site-packages/sphinx/builders/texinfo.pyt s6