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__/universal.cpython-39.pyc
a

OԼa%.�@s�dZdZddlZddlZddlZddlmZmZddlm	Z	m
Z
ddlmZej
dkrZeZGdd	�d	e
�ZGd
d�de
�ZGdd
�d
e
�ZGdd�de
�ZGdd�de
�ZGdd�de
�ZGdd�de
�ZGdd�de
�ZdS)a�
Transforms needed by most or all documents:

- `Decorations`: Generate a document's header & footer.
- `ExposeInternals`: Expose internal attributes.
- `Messages`: Placement of system messages generated after parsing.
- `FilterMessages`: Remove system messages below verbosity threshold.
- `TestMessages`: Like `Messages`, used on test runs.
- `StripComments`: Remove comment elements from the document tree.
- `StripClassesAndElements`: Remove elements with classes
  in `self.document.settings.strip_elements_with_classes`
  and class values in `self.document.settings.strip_classes`.
- `SmartQuotes`: Replace ASCII quotation marks with typographic form.
�reStructuredText�N)�nodes�utils)�TransformError�	Transform)�smartquotes)�rc@s,eZdZdZdZdd�Zdd�Zdd�Zd	S)
�DecorationszD
    Populate a document's decoration element (header, footer).
    i4cCsT|��}|r(|j��}|��}|�|�|��}|rP|j��}|��}|�|�dS�N)�generate_header�documentZget_decorationZ
get_header�extend�generate_footerZ
get_footer)�selfZheader_nodesZ
decoration�headerZfooter_nodesZfooter�r�A/usr/lib/python3.9/site-packages/docutils/transforms/universal.py�apply,s


zDecorations.applycCsdSr
r)rrrrr8szDecorations.generate_headerc
Cs|jj}|js"|js"|js"|j�rg}|jr2|js8|jrv|jrF|j}nt�|j	|j�}|�
tjdd|d�t�
d�g�|jr�t�|jt���}|�t�
d|d��|jr�|�
t�
d�tjdddd�t�
d	�tjdd
dd�t�
d�g�tjddg|�R�gSdSdS)
N�zView document source)Zrefuriz.
zGenerated on: z
Generated by ZDocutilsz http://docutils.sourceforge.net/z from rz(http://docutils.sourceforge.net/rst.htmlz	 source.
)r�settings�	generator�	datestampZsource_linkZ
source_url�_sourcer�
relative_pathZ_destinationr
rZ	reference�Text�time�strftime�gmtime�appendZ	paragraph)rr�text�sourcerrrrr;sD�������zDecorations.generate_footerN)�__name__�
__module__�__qualname__�__doc__�default_priorityrrrrrrrr	$s
r	c@s$eZdZdZdZdd�Zdd�ZdS)�ExposeInternalszL
    Expose internal attributes if ``expose_internals`` setting is set.
    iHcCst|tj�Sr
)�
isinstancerr�r�noderrr�not_TextjszExposeInternals.not_TextcCsR|jjjrN|j�|j�D]4}|jjjD]$}t||d�}|dur&||d|<q&qdS)Nz	internal:)rrZexpose_internals�findallr*�getattr)rr)Zatt�valuerrrrms
zExposeInternals.applyN)r!r"r#r$r%r*rrrrrr&bsr&c@seZdZdZdZdd�ZdS)�Messageszi
    Place any system messages generated after parsing into a dedicated section
    of the document.
    i\cCs�|jj}|jjj}g}|D] }|d|kr|js|�|�q|r�tjdgd�}|t�dd�7}||7}g|jjdd�<|j|7_dS)N�levelzsystem-messages)�classesrzDocutils System Messages)	r�transform_messages�reporter�report_level�parentrr�section�title)rZ
unfilteredZ	threshold�messages�msgr5rrrrs
zMessages.applyN�r!r"r#r$r%rrrrrr.vsr.c@seZdZdZdZdd�ZdS)�FilterMessagesz;
    Remove system messages below verbosity threshold.
    ifcCs:t|j�tj��D]"}|d|jjjkr|j�|�qdS)Nr/)	�tuplerr+rZsystem_messager2r3r4�remover(rrrr�szFilterMessages.applyNr9rrrrr:�sr:c@seZdZdZdZdd�ZdS)�TestMessageszk
    Append all post-parse system messages to the end of the document.

    Used for testing purposes.
    ipcCs&|jjD]}|js|j|7_qdSr
)rr1r4)rr8rrrr�szTestMessages.applyNr9rrrrr=�sr=c@seZdZdZdZdd�ZdS)�
StripCommentszq
    Remove comment elements from the document tree (only if the
    ``strip_comments`` setting is enabled).
    i�cCs2|jjjr.t|j�tj��D]}|j�|�qdSr
)	rrZstrip_commentsr;r+rZcommentr4r<r(rrrr�s
zStripComments.applyNr9rrrrr>�sr>c@s$eZdZdZdZdd�Zdd�ZdS)�StripClassesAndElementsz�
    Remove from the document tree all elements with classes in
    `self.document.settings.strip_elements_with_classes` and all "classes"
    attribute values in `self.document.settings.strip_classes`.
    i�c
Cs�|jjjr>t|jjj�|_t|j�|j��D]}|j�	|�q,|jjj
sLdS|jjj
}|j�tj�D]4}|D]*}z|d�	|�Wqlt
y�Yql0qlqddS)Nr0)rrZstrip_elements_with_classes�set�strip_elementsr;r+�
check_classesr4r<�
strip_classesr�Element�
ValueError)rr)rC�class_valuerrrr�s
�

zStripClassesAndElements.applycCs:t|tj�sdS|ddd�D]}||jvr dSq dS)NFr0T)r'rrDrA)rr)rFrrrrB�s
z%StripClassesAndElements.check_classesN)r!r"r#r$r%rrBrrrrr?�sr?c@s\eZdZdZdZejejfZejejej	ej
ejejej
fZdZdd�Zdd�Zdd	�Zd
S)�SmartQuotesz�
    Replace ASCII quotation marks with typographic form.

    Also replace multiple dashes with em-dash/en-dash characters.
    iRZqDecCstj|||d�t�|_dS)N)�	startnode)r�__init__r@�unsupported_languages)rrrHrrrrI�szSmartQuotes.__init__ccsX|D]N}t|j|j�s&t|jj|j�r6dt|�fVqt�ddt|��}d|fVqdS)N�literalz(?<=)([-\'".`])z\\\1Zplain)r'r4�
literal_nodes�unicode�re�sub)r�txtnodesr)Ztxtrrr�
get_tokens�s�zSmartQuotes.get_tokenscCs�|jj�dd�}|sdSz|�d�}Wnty<d}Yn0|jjj}|jjj}|rhtjj	�
t|��|j�t
j�D]�}t||j�r�qvt|jt
j�r�qvdd�|�t
j�D�}|�|�}|r�d|vr�|�dd�}n|d7}t�|�D]}|tjj	vr�|}�q2q�||jv�r"|jjjd||d	�|j�|�d}tj|�|�|j|d
�}	t||	�D]\}
}|
j�|
t
�|���qTqvt�|_dS)N�smart_quotesFZaltcSsg|]}t|jtj�s|�qSr)r'r4r�
option_string)�.0�txtnoderrr�
<listcomp>&s��z%SmartQuotes.apply.<locals>.<listcomp>z
-x-altquotrz*No smart quotes defined for language "%s".)Z	base_node)�attr�language) rr�
setdefault�
startswith�AttributeErrorZ
language_codeZsmartquotes_localesrZ
smartcharsZquotes�update�dictr+rZTextElementr'�
nodes_to_skipr4rZget_language_code�replacerZnormalize_language_tagrJr2Zwarning�addZeducate_tokensrQ�smartquotes_action�zipr@)rrRZalternativeZdocument_languageZlc_smartquotesr)rP�lang�tagZteacherrUZnewtextrrrrsT
�




���zSmartQuotes.applyN)r!r"r#r$r%rZFixedTextElement�Specialr^ZimagerKZmath�rawZproblematicrLrarIrQrrrrrrG�s�
rG)r$Z
__docformat__rN�sysrZdocutilsrrZdocutils.transformsrrZdocutils.utilsr�version_info�strrMr	r&r.r:r=r>r?rGrrrr�<module>s"
>&

Youez - 2016 - github.com/yon3zu
LinuXploit