403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.60
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/inkscape/extensions/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/inkscape/extensions/__pycache__/tar_layers.cpython-310.pyc
o

0�a�
�@s|dZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
Gdd�de
j�Ze
dkr<e���dSdS)z�
An extension to export multiple svg files from a single svg file containing layers.

Each defs is duplicated for each svg outputted.
�)�unicode_literalsNc@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�	TarLayersz Entry point to our layers exportcCs2t�|j�}|�|�D]\}}|���|�q|S)zGReturns the current document as a new empty document with the same defs)�copy�deepcopy�document�layers�	getparent�remove)�self�newdoc�name�layer�r�,/usr/share/inkscape/extensions/tar_layers.py�
make_template&szTarLayers.make_templateccs6�|����D]}t|tj�r|jr|j|fVqdS)N)�getroot�iterchildren�
isinstance�inkex�Layer�label)r
r�noderrrr-s���zTarLayers.layerscCsRt��}|�|�tj|dd�}t�t���|_	|�
�|_|�d�t
||d�S)Nz.svg)rr)�tarinfo�fileobj)�io�BytesIO�write�tarfile�TarInfo�calendar�timegm�time�gmtime�mtime�tell�size�seek�dict)r
r�doc�string�inforrr�io_document2s


zTarLayers.io_documentc	Cs�tj|dd�}tjdkrddl}|�tj��tj	�|�
�}d}|�|j�D]+\}}t
�|�}|dkr<|���||�n|���|�|}|jdi|�||���q&dS)zSave the tar file outputzw|)r�mode�win32rNr)r�open�sys�platform�msvcrt�setmode�stdout�fileno�os�O_BINARYrrrrrr�replace�append�addfiler+)	r
�stream�tarr1�template�previousr�_layerr
rrr�save;s

�zTarLayers.saveN)�__name__�
__module__�__qualname__�__doc__rrr+r?rrrrr$s	r�__main__)rC�
__future__rr5r/rrrrr!r�OutputExtensionrr@�runrrrr�<module>s.�

Youez - 2016 - github.com/yon3zu
LinuXploit