403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.9/site-packages/sphinx/builders/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/sphinx/builders/__pycache__/epub3.cpython-39.opt-1.pyc
a

�ab�*�@s<dZddlZddlmZddlmZmZmZmZm	Z	m
Z
ddlmZddl
mZddlmZddlmZmZdd	lmZdd
lmZmZddlmZddlmZdd
lmZe�e �Z!Gdd�de�Z"ddd�Z#ddd�Z$ddd�Z%dZ&dZ'Gdd�dej(�Z)edd�dd�Z*eedd�d d!�Z+eee,efd�d"d#�Z-dS)$z�
    sphinx.builders.epub3
    ~~~~~~~~~~~~~~~~~~~~~

    Build epub3 files.
    Originally derived from epub.py.

    :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�path)�Any�Dict�List�
NamedTuple�Set�Tuple)�package_dir)�Sphinx)�
_epub_base)�ENUM�Config)�__)�logging�xmlname_checker)�copy_asset_file)�format_date)�
make_filenamec@s*eZdZUeed<eed<eeed<dS)�NavPoint�text�refuri�childrenN)�__name__�
__module__�__qualname__�str�__annotations__rr�rr�9/usr/lib/python3.9/site-packages/sphinx/builders/epub3.pyrs
rZltrZrtl)�
horizontal�verticalr rzvertical-rlz
horizontal-tb)r rz<!DOCTYPE html>zU<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">cs�eZdZdZdZed�ZdZe�	e
dd�ZeZ
eZdZdd	�d
d�Zed	��fdd
�Zeedd��fdd�Zeeeefeed�dd�Zeeed�dd�Zdd	�dd�Z�ZS)�Epub3Builderz�
    Builder that outputs epub3 files.

    It creates the metainfo files content.opf, nav.xhtml, toc.ncx, mimetype,
    and META-INF/container.xml. Afterwards, all necessary files are zipped to
    an epub file.
    �epubzThe ePub file is in %(outdir)s.FZ	templatesZepub3TN)�returncCs<|��|��|��|��|��|��|��dS)z/Create the metainfo files and finally the epub.N)Zget_tocZbuild_mimetypeZbuild_containerZ
build_content�build_navigation_docZ	build_tocZ
build_epub��selfrrr�
handle_finishLszEpub3Builder.handle_finishcs�|jj}t���}t�|jj�|d<t�|jj�|d<t�	|�|d<t
�	|�|d<t�td��|d<t�|jj�|d<|jj
|d<|S)	zaCreate a dictionary with all metadata for the content.opf
        file properly escaped.
        �descriptionZcontributorZpage_progression_directionZibook_scroll_axisz%Y-%m-%dT%H:%M:%SZ�date�version�epub_version)�config�epub_writing_mode�super�content_metadata�html�escape�epub_description�epub_contributor�PAGE_PROGRESSION_DIRECTIONS�get�IBOOK_SCROLL_AXISrr*r+)r&�writing_mode�metadata��	__class__rrr/Vs
zEpub3Builder.content_metadata)�docnamesr#csJt��|�|jj}t�|�|jd<|j|jd<|j|jd<d|jd<dS)NZtheme_writing_mode�html_tag�use_meta_charsetTZskip_ua_compatible)	r.�prepare_writingr,r-�THEME_WRITING_MODESr5Z
globalcontextr<r=)r&r;r7r9rrr>fszEpub3Builder.prepare_writing)�navnodesr#cCs6g}|�tddg��d}|D�]
}|ds.q|d�d�d}||jvrLq|d|jjkr^qt|d|dg�}|d|kr�|��|dj�|�|�|�q|d|dkr�|d7}|dj�|�|�|�q|d|k�r"|dt|�kr�|��q�|d}|dj�|�|�|�qt	d	��q|djS)
acCreate the toc navigation structure.

        This method is almost same as build_navpoints method in epub.py.
        This is because the logical navigation structure of epub3 is not
        different from one of epub2.

        The difference from build_navpoints method is templates which are used
        when generating navigation documents.
        �rrr�#�level����z+Should never reach here. It might be a bug.)
�appendr�splitZ
ignored_filesr,�
epub_tocdepth�popr�len�RuntimeError)r&r@ZnavstackrCZnode�fileZnavpointrrr�
build_navlistos8




zEpub3Builder.build_navlist)�navlistr#cCs6i}t�|jj�|d<t�|jd�|d<||d<|S)z_Create a dictionary with all metadata for the nav.xhtml file
        properly escaped.
        �langZtocZ
toc_localerN)r0r1r,�
epub_languageZguide_titles)r&rNr8rrr�navigation_doc_metadata�s
z$Epub3Builder.navigation_doc_metadatacCs�t�td��|jjdkrJ|jj|jj|ddd�}|�|g�}|�	|�n|j
}|�|�}tt
�|jd�|j|�|��d|jvr�|j�d�dS)z"Write the metainfo file nav.xhtml.zwriting nav.xhtml file...�defaultF)Zprune_toctreesZ
includehiddenznav.xhtml_tz	nav.xhtmlN)�logger�inforr,�
epub_tocscope�envZget_and_resolve_doctreeZroot_docZget_refnodesZ
toc_add_files�refnodesrMrr�join�template_dirZoutdirrQ�filesrF)r&ZdoctreerWrNrrrr$�s�
�
z!Epub3Builder.build_navigation_doc)rrr�__doc__�namer�epilogZsupported_remote_imagesrrXr	rY�DOCTYPEZdoctype�HTML_TAGr<r=r'rr/rrr>rrrrMrQr$�
__classcell__rrr9rr!:s
	 *
r!)�appr#cCs�|jjdkrdS|jjs&t�td��t��|jj	�sDt�td��|jj
sZt�td��|jjspt�td��|jjs�t�td��|jj
s�t�td��|jjs�t�td��|jjs�t�td	��|jjs�t�td
��|jjs�t�td��dS)Nr"zHconf value "epub_language" (or "language") should not be empty for EPUB3z2conf value "epub_uid" should be XML NAME for EPUB3zGconf value "epub_title" (or "html_title") should not be empty for EPUB3z6conf value "epub_author" should not be empty for EPUB3z;conf value "epub_contributor" should not be empty for EPUB3z;conf value "epub_description" should not be empty for EPUB3z9conf value "epub_publisher" should not be empty for EPUB3zIconf value "epub_copyright" (or "copyright")should not be empty for EPUB3z:conf value "epub_identifier" should not be empty for EPUB3z2conf value "version" should not be empty for EPUB3)Zbuilderr\r,rPrS�warningrr�match�epub_uid�
epub_title�epub_authorr3r2�epub_publisher�epub_copyright�epub_identifierr*�rarrr�validate_config_values�s,rk)rar,r#c	Csvg}|jD]`}t|t�r(|�|if�q
z|\}}|�||f�Wq
tyht�td�|�Yq
Yq
0q
||_dS)z?This converts string styled epub_css_files to tuple styled one.zinvalid css_file: %r, ignoredN)�epub_css_files�
isinstancerrF�	ExceptionrSrbr)rar,rl�entry�filename�attrsrrr�convert_epub_css_files�s

rrcCs�|�t�|�ddd�d�|�ddd�|�ddd�|�did�|�d	d
d�d�|�ddd�d�|�d
dd�d�|�ddd�d�|�ddd�d�|�ddd�|�ddd�|�ddd�|�ddd�|�ddd�|�dgd�|�dgd�|�ddd�d�|�dgd�|�d d!d�|�d"d#d�|�d$d%d�|�d&d'd�|�d(d)d�|�d*d+d�|�d,d-d�d�|�d.dd�|�d/dd�|�d0d1dtd1d2��|jd3td4d5�|�d6t�d7d#d#d8�S)9NZ
epub_basenamecSs
t|j�S�N)r�projectr%rrr�<lambda>��zsetup.<locals>.<lambda>r+g@r"Z
epub_themeZepub_theme_optionsrecSs|jSrs)rtr%rrrru�rvrfcSs|jSrs�Zauthorr%rrrru�rvrPcSs
|jpdS)N�en)�languager%rrrru�rvrgcSs|jSrsrwr%rrrru�rvrhcSs|jSrs)�	copyrightr%rrrru�rvri�unknownZepub_schemerdrVZ
epub_coverrZ
epub_guideZepub_pre_filesZepub_post_filesrlcSs|jSrs)Zhtml_css_files)r,rrrrurvZepub_exclude_filesrH�Zepub_tocdupTrUrRZepub_fix_imagesFZepub_max_image_widthrZepub_show_urlsZinlineZepub_use_indexcSs|jSrs)Zhtml_use_indexr%rrrru
rvr2r3r-rr z
config-initedi )�priorityzbuilder-initedZbuiltin)r*Zparallel_read_safeZparallel_write_safe)Zadd_builderr!Zadd_config_valuerZconnectrrrkrjrrr�setup�sJ

��r~).r[r0�osr�typingrrrrrrZsphinxr	Zsphinx.applicationr
Zsphinx.buildersrZ
sphinx.configrr
Z
sphinx.localerZsphinx.utilrrZsphinx.util.fileutilrZsphinx.util.i18nrZsphinx.util.osutilrZ	getLoggerrrSrr4r6r?r^r_ZEpubBuilderr!rkrrrr~rrrr�<module>s< 
	����'

Youez - 2016 - github.com/yon3zu
LinuXploit