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-2.pyc
a

�ab�*�@s8ddlZddlmZddlmZmZmZmZmZm	Z	ddl
mZddlm
Z
ddlmZddlmZmZddlmZdd	lmZmZdd
lmZddlmZddlmZe�e�Z Gd
d�de�Z!ddd�Z"ddd�Z#ddd�Z$dZ%dZ&Gdd�dej'�Z(e
dd�dd�Z)e
edd�dd �Z*e
ee+efd�d!d"�Z,dS)#�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�eZdZdZed�ZdZe�e	dd�Z
eZe
ZdZdd�d	d
�Zed��fdd�Zeedd
��fdd�Zeeeefeed�dd�Zeeed�dd�Zdd�dd�Z�ZS)�Epub3Builder�epubzThe ePub file is in %(outdir)s.FZ	templatesZepub3TN)�returncCs<|��|��|��|��|��|��|��dS�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)	N�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__rrr0Vs
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_MODESr6Z
globalcontextr=r>)r'r<r8r:rrr?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)
N�rrr�#�level����z+Should never reach here. It might be a bug.)
�appendr�splitZ
ignored_filesr-�
epub_tocdepth�popr�len�RuntimeError)r'rAZnavstackrDZnode�fileZnavpointrrr�
build_navlistos8




zEpub3Builder.build_navlist)�navlistr#cCs6i}t�|jj�|d<t�|jd�|d<||d<|S)N�langZtocZ
toc_localerO)r1r2r-�
epub_languageZguide_titles)r'rOr9rrr�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)Nzwriting nav.xhtml file...�defaultF)Zprune_toctreesZ
includehiddenznav.xhtml_tz	nav.xhtml)�logger�inforr-�
epub_tocscope�envZget_and_resolve_doctreeZroot_docZget_refnodesZ
toc_add_files�refnodesrNrr�join�template_dirZoutdirrR�filesrG)r'ZdoctreerXrOrrrr%�s�
�
z!Epub3Builder.build_navigation_doc)rrr�namer�epilogZsupported_remote_imagesrrYr	rZ�DOCTYPEZdoctype�HTML_TAGr=r>r(rr0rrr?rrrrNrRr%�
__classcell__rrr:rr!: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-rQrT�warningrr�match�epub_uid�
epub_title�epub_authorr4r3�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)Nzinvalid css_file: %r, ignored)�epub_css_files�
isinstancerrG�	ExceptionrTrbr)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�Sr$)r�projectr&rrr�<lambda>��zsetup.<locals>.<lambda>r,g@r"Z
epub_themeZepub_theme_optionsrecSs|jSr$)rsr&rrrrt�rurfcSs|jSr$�Zauthorr&rrrrt�rurQcSs
|jpdS)N�en)�languager&rrrrt�rurgcSs|jSr$rvr&rrrrt�rurhcSs|jSr$)�	copyrightr&rrrrt�ruri�unknownZepub_schemerdrWZ
epub_coverrZ
epub_guideZepub_pre_filesZepub_post_filesrlcSs|jSr$)Zhtml_css_files)r-rrrrtruZepub_exclude_filesrI�Zepub_tocdupTrVrSZepub_fix_imagesFZepub_max_image_widthrZepub_show_urlsZinlineZepub_use_indexcSs|jSr$)Zhtml_use_indexr&rrrrt
rur3r4r.rr z
config-initedi )�priorityzbuilder-initedZbuiltin)r+Zparallel_read_safeZparallel_write_safe)Zadd_builderr!Zadd_config_valuerZconnectrrrkrjrrr�setup�sJ

��r})-r1�osr�typingrrrrrrZsphinxr	Zsphinx.applicationr
Zsphinx.buildersrZ
sphinx.configrr
Z
sphinx.localerZsphinx.utilrrZsphinx.util.fileutilrZsphinx.util.i18nrZsphinx.util.osutilrZ	getLoggerrrTrr5r7r@r^r_ZEpubBuilderr!rkrrrr}rrrr�<module>s: 
	����'

Youez - 2016 - github.com/yon3zu
LinuXploit