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/docutils/transforms/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/docutils/transforms/__pycache__/parts.cpython-39.pyc
a

OԼaP�@sndZdZddlZddlZddlmZmZddlmZm	Z	Gdd�de	�Z
Gdd	�d	e	�ZGd
d�dej�Z
dS)z'
Transforms related to document parts.
ZreStructuredText�N)�nodes�utils)�TransformError�	Transformc@s&eZdZdZdZdd�Zd
dd�Zd	S)�SectNumaS
    Automatically assigns numbers to the titles of document sections.

    It is possible to limit the maximum section level for which the numbers
    are added.  For those sections that are auto-numbered, the "autonum"
    attribute is set, informing the contents table generator that a different
    form of the TOC should be used.
    i�cCs�|jj�dd�|_|jj�dd�|_|jj�dd�|_|jj�dd�|_|jj�|j�|j	j
jr�|jdurttj
|_|�|j	�n0|j|j	j
_|j|j	j
_|j|j	j
_|j|j	j
_dS)N�depth�start��prefix��suffix)�	startnode�details�get�maxdepth�
startvaluer
r�parent�remove�document�settingsZ
sectnum_xform�sys�maxsize�update_section_numbersZ
sectnum_depthZ
sectnum_startZsectnum_prefixZsectnum_suffix��self�r�=/usr/lib/python3.9/site-packages/docutils/transforms/parts.py�apply s

z
SectNum.applyrrc	Cs�|d7}|rd}n|j}|D]�}t|tj�r|t|�f}|d}tjd|jd�|�|jddgd�}|�	d|�d|d<||j
kr�|�|||�|d7}qdS)	Nr	rr�.u   �sectnum)�classes�auto)r�
isinstancer�section�str�	generatedr
�joinr�insertrr)	r�noder
rr�childZnumbers�titler%rrrr0s&��
zSectNum.update_section_numbersN)rr)�__name__�
__module__�__qualname__�__doc__�default_priorityrrrrrrrs	rc@s.eZdZdZdZdd�Zddd�Zdd	�Zd
S)�Contentsa�
    This transform generates a table of contents from the entire document tree
    or from a single branch.  It locates "section" elements and builds them
    into a nested bullet list, which is placed within a "topic" created by the
    contents directive.  A title is either explicitly specified, taken from
    the appropriate language module, or omitted (local table of contents).
    The depth may be specified.  Two-way references between the table of
    contents and section titles are generated (requires Writer support).

    This transform requires a startnode, which contains generation
    options and provides the location for the generated table of contents (the
    startnode is replaced by the table of contents "topic").
    i�cCs�t|jjdd�}|jj}d|vrL|jjj}t|tj�sRt|tj�sR|j}q*n|j}|jjdd|_	d|vrx|d|_
n|jjj|_
|r�|jjj�
|�|jj�|j�n4|�|�}t|�r�|j�|�n|jjj�|jj�dS)NZ
use_latex_tocF�local�idsr�	backlinks)�getattrrrr
rrr"rr#�toc_idr3Z
toc_backlinksZ
attributes�updater�build_contents�lenZreplace_self)rZ
toc_by_writerrr
�contentsrrrrXs(

�

zContents.applyrcCsB|d7}dd�|D�}g}d}|jj�dtj�}|D]�}|d}|�d�}	|�|�}
tjddg|
�Rd|d	di�}|jj	|d
d�}t�
dd|�}
t�d|
�}|jdvr�|�
tj�dur�|jd
kr�||d<n|jdkr�|j|d<||kr�|�||�}||7}|�|�q4|�r:tjdg|�R�}|	�r6|d�d�|SgSdS)Nr	cSsg|]}t|tj�r|�qSr)r"rr#)�.0Zsectrrr�
<listcomp>v�z+Contents.build_contents.<locals>.<listcomp>rrr!rZrefidr2z	toc-entry)Zsuggested_prefix)�entry�topr=r>r zauto-toc)r
rrrr�copy_and_filterr�	referencerZset_idZ	paragraphZ	list_itemr3Z	next_noder5r7�appendZbullet_list)rr(�levelZsections�entriesZautonumrr#r*r!Z	entrytextr@Zref_idr=�itemZsubsectsr9rrrr7tsD


��
�



zContents.build_contentscCst|j�}|�|�|��S)z@Return a copy of a title, with references, images, etc. removed.)�ContentsFilterrZ	walkabout�get_entry_text)rr(Zvisitorrrrr?�s

zContents.copy_and_filterN)r)r+r,r-r.r/rr7r?rrrrr0Fs

"r0c@s@eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZeZeZ	eZ
dS)rEcCs
|��jS�N)Z
get_tree_copyZchildrenrrrrrF�szContentsFilter.get_entry_textcCs
tj�dSrG�r�SkipNode�rr(rrr�visit_citation_reference�sz'ContentsFilter.visit_citation_referencecCs
tj�dSrGrHrJrrr�visit_footnote_reference�sz'ContentsFilter.visit_footnote_referencecCs*|�d�r |j�t�|d��tj�dS)NZalt)�hasattrrrAr�TextrIrJrrr�visit_image�s
zContentsFilter.visit_imagecCs
tj�dSrG)rZ
SkipDeparturerJrrr� ignore_node_but_process_children�sz/ContentsFilter.ignore_node_but_process_childrenN)r+r,r-rFrKrLrOrPZvisit_problematicZvisit_referenceZvisit_targetrrrrrE�srE)r.Z
__docformat__�rerZdocutilsrrZdocutils.transformsrrrr0ZTreeCopyVisitorrErrrr�<module>s4W

Youez - 2016 - github.com/yon3zu
LinuXploit