Qc@s dZdZddlZddlZddlZddlZddlmZmZmZddl m Z ddl m Z ddl mZejejjejdejjejjed Zd Zd e jfd YZd e jfdYZdS(s S5/HTML Slideshow Writer. treStructuredTextiN(tfrontendtnodestutils(t html4css1(t directives(tbtdummytthemescCsGtjjt|}tjj|sCtjd||fn|S(Ns(Theme directory not found: %r (path: %r)(tostpathtjointthemes_dir_pathtisdirtdocutilstApplicationError(tnameR ((sE/usr/lib/python2.7/site-packages/docutils/writers/s5_html/__init__.pyt find_themes tWritercBsleZejjddddgidd6dd6dd6fd d gid d6d d6fd dgidd6ejd6fddgidd6dd6fddgiddgd6dd6dd6fddgidd6ed6ejd6fdd gid!d6dd6fd"d#gidd6ejd6fd$d%gid&d6dd6ff fZid'd(6Zd)Z d-Z d,Z RS(.sS5 Slideshow Specific OptionssFor the S5/HTML writer, the --no-toc-backlinks option (defined in General Docutils Options above) is the default, and should not be changed.sBSpecify an installed S5 theme by name. Overrides --theme-url. The default theme name is "default". The theme files will be copied into a "ui/" directory, in the same directory as the destination file (output HTML). Note that existing theme files will not be overwritten (unless --overwrite-theme-files is used).s--themetdefaultstmetavart theme_urlt overridessSpecify an S5 theme URL. The destination file (output HTML) will link to this theme; nothing will be copied. Overrides --theme.s --theme-urlstthemes{Allow existing theme files in the ``ui/`` directory to be overwritten. The default is not to overwrite theme files.s--overwrite-theme-filest store_truetactiont validatorsfKeep existing theme files in the ``ui/`` directory; do not overwrite any. This is the default.s--keep-theme-filestoverwrite_theme_filestdestt store_falses@Set the initial view mode to "slideshow" [default] or "outline".s --view-modet slideshowtoutlinetchoicesssONormally hide the presentation controls in slideshow mode. This is the default.s--hidden-controlss^Always show the presentation controls in slideshow mode. The default is to hide the controls.s--visible-controlsthidden_controlssMEnable the current slide indicator ("1 / 15"). The default is to disable it.s--current-slides:Disable the current slide indicator. This is the default.s--no-current-slidet current_slideit toc_backlinksss5_html writertwritersshtml4css1 writercCstjj|t|_dS(N(RRt__init__tS5HTMLTranslatorttranslator_class(tself((sE/usr/lib/python2.7/site-packages/docutils/writers/s5_html/__init__.pyR%Ys(R$shtml4css1 writer( t__name__t __module__RRt settings_specRtvalidate_booleantTruetsettings_default_overridestconfig_sectiontconfig_section_dependenciesR%(((sE/usr/lib/python2.7/site-packages/docutils/writers/s5_html/__init__.pyR$sJ     R&cBseZdZdZdZdZdZdZdZeeZ dZ dZ dZ e jdZdZdZdZdZdZdZdZRS(s sA s
Rt__base__s slides.csss outline.csss print.csss opera.csss slides.jss s5-core.csss framing.csss pretty.csss blank.gifs iepngfix.htccGstjj||d|_|j|jjj}d|jjj }|j j |j i|jd6|d6|d6|jjj s|j j |jn|jdg|_g|_d|_d|_dS( NtvisiblethiddenR t view_modetcontrol_visibilitys) i(R2R3(RtHTMLTranslatorR%tNonettheme_file_patht setup_themetdocumenttsettingsR4R!t stylesheettappendts5_stylesheet_templateR"tdisable_current_slidetadd_metat s5_footert s5_headert section_countttheme_files_copied(R(targsR4R5((sE/usr/lib/python2.7/site-packages/docutils/writers/s5_html/__init__.pyR%s         cCsS|jjjr|jn3|jjjr@|jjj|_ntjddS(Ns&No theme specified for S5/HTML writer.(R:R;Rt copy_themeRR8RR(R(((sE/usr/lib/python2.7/site-packages/docutils/writers/s5_html/__init__.pyR9s  c Cs|jj}t|j}|g}i|_i}dd|jf|_|jrtjj tjj |jd|j}tjj |stj |qndSt }xO|rx]tj|D]L}||jkrqn|j|||r||jkrd||s

theaderttitletfooters
tslidetclassestslide0tidstdivs
ii(t head_prefixtextendtdoctypethead_prefix_templateR;t language_codet html_prologR=tmetatinsertt content_typetoutput_encodingtheadt math_headerR RBRAt html_titleRktlayout_templatetfragmenttbodyt body_prefixtstarttagRCt body_suffixt html_headt html_bodytbody_pre_docinfotdocinfo(R(tnodeRzR|R{tlayout((sE/usr/lib/python2.7/site-packages/docutils/writers/s5_html/__init__.pytdepart_documents2     '  cCsT|jj}|jjd|jj|j||jjd|j|3dS(Ns

s

(tcontexttpopRAR=RR(R(Rtstart((sE/usr/lib/python2.7/site-packages/docutils/writers/s5_html/__init__.pyt depart_footer7s cCsW|jj}dg}|j|j||jd|j|3|jj|dS(Ns (RRRRR=RB(R(RRRz((sE/usr/lib/python2.7/site-packages/docutils/writers/s5_html/__init__.pyt depart_header>s    cCs|js|jjdn|jd7_|jd7_|jdkrn|jj|j|dddn"|jj|j|ddddS(Ns iRtCLASStsectionR}(RCRR=t section_levelR(R(R((sE/usr/lib/python2.7/site-packages/docutils/writers/s5_html/__init__.pyt visit_sectionFs %cCst|jtjr~|j|jd}|dkr>d}nd|}|jj|j||d|j jd|nt j j ||dS(Niish%sRys ( t isinstancetparentRRRtinitial_header_levelRR=RRRR6tvisit_subtitle(R(Rtlevelttag((sE/usr/lib/python2.7/site-packages/docutils/writers/s5_html/__init__.pyRQs   cCstjj||dS(N(RR6t visit_title(R(R((sE/usr/lib/python2.7/site-packages/docutils/writers/s5_html/__init__.pyR\s(s slides.csss outline.csss print.csss opera.csss slides.js(s s5-core.csss framing.csss pretty.csss blank.gifs iepngfix.htc(R)R*R>R?RRVRNtdirect_theme_filestindirect_theme_filesRPR%R9RFtretcompileRdRORRRRRR(((sE/usr/lib/python2.7/site-packages/docutils/writers/s5_html/__init__.pyR&^s&    @ !    (t__doc__t __docformat__RpR RRRRRtdocutils.writersRtdocutils.parsers.rstRtdocutils._compatRt relative_pathR R tgetcwdRJt__file__R RRR6R&(((sE/usr/lib/python2.7/site-packages/docutils/writers/s5_html/__init__.pyts    $ :