HEX
Server: Apache
System: Linux opal14.opalstack.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User: curbgloabal_opal (1234)
PHP: 8.1.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/share/inkscape/extensions/jessyInk_export.pyc
�
��Yc@s�ddlZejjd�ejjd�ejjd�ddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
d�Zd�Zd�Z
dejfd	��YZe�Zej�dS(
i����Ns/usr/share/inkscape/extensionss8/Applications/Inkscape.app/Contents/Resources/extensionss*C:\Program Files\Inkscape\share\extensionscCsfi}xY|jd�D]H}|jd�}t|�dkr|dj�||dj�<qqW|S(Nt;t:iii(tsplittlentstrip(tinStrtdictiotproptvalues((s1/usr/share/inkscape/extensions/jessyInk_export.pyt
propStrToDict"s%cCsCd}x2|j�D]$}|d|d||d7}qW|dS(Ntt RRi(tkeys(Rtstrtkey((s1/usr/share/inkscape/extensions/jessyInk_export.pyt
dictToPropStr-s"cCsTi}|jjd�r0t|jd��}n|||<|jdt|��dS(Ntstyle(tattribthas_keyR	tgettsetR(tnodetpropKeyt	propValuetprops((s1/usr/share/inkscape/extensions/jessyInk_export.pytsetStyle5s

tMyEffectcBsJeZdZdZd�Zd�Zd�Zd�Zd�Z	d�Z
RS(c
Cs�tjj|�|jjddddddd�|jjdddddddd	d
�|jjdddddddd	d
�d
tjd<|j�|_|jdkr�tj	t
d��tjd�ndS(Ns--tabtactiontstorettypetstringtdesttwhats--typetdefaultR
s--resolutiont
resolutionuhttps://launchpad.net/jessyinkujessyinks!Could not find Inkscape command.
i(
tinkextEffectt__init__tOptionParsert
add_optiontNSStfindInkscapeCommandtinkscapeCommandtNoneterrormsgt_tsystexit(tself((s1/usr/share/inkscape/extensions/jessyInk_export.pyR%Bs"((
cCsdS(N((R0((s1/usr/share/inkscape/extensions/jessyInk_export.pytoutputSsc
Cs�|j�|jjddtj�}t|�dkrMtjtd��ntj	dddd�\}}t
j|d	d
t
j�}|jjddtj�}t|�dkr�t
jjd
�nx|D]}t|dd�q�Wxd|D]\}t|dd�t|dd�|j||jdtjdd�t|dd�q�W|j�t|d�}t
jdkr�ddl}ddl}	|	jt
jj�|j�nt
jj|j��t
jj�|j�|j�dS(Ns//svg:script[@jessyink:version]t
namespacesis�The JessyInk script is not installed in this SVG file or has a different version than the JessyInk extensions. Please select "install/update..." from the "JessyInk" sub-menu of the "Extensions" menu to install or update the JessyInk script.

tsuffixs.ziptprefixt
jessyInk__twtcompressions$//svg:g[@inkscape:groupmode='layer']isNo layers found.tdisplaytnonetinherittopacityt1t{tinkscapes}labeltrbtwin32i����(tremoveJessyInkFilesInTempDirtdocumenttxpathR#R(RR,R-ttempfiletmkstemptzipfiletZipFilet
ZIP_STOREDR.tstderrtwriteRttakeSnapshotRtclosetopentplatformtostmsvcrttsetmodetstdouttfilenotO_BINARYtread(
R0tscriptNodestzipFileDesctzpFileR1texportNodesRtoutRORP((s1/usr/share/inkscape/extensions/jessyInk_export.pyteffectVs2


&


cCs�tjdddd�\}}|jjtj|d��t|jj�j	�}tjdd|dd�\}}t
j|jd|dt|jj
�d	|d
|gdtdt
jd
t
j�}|j�\}	}
|j||d|�dS(NR3s.svgR4R5twbt.s --file=s --without-gui --export-dpi=s
 --export-t=tshellRRRI(RDRERBRJROtfdopenR
toptionsRtlowert
subprocesstPopenR*R"tTruetPIPEtcommunicate(R0R1tfileNametsvgFileDesctsvgFiletexttoutFileDesctoutFiletproctstdout_valuetstderr_value((s1/usr/share/inkscape/extensions/jessyInk_export.pyRK�s"YcCsNxGtjtjjtj�d��D]!}ytj|�Wq%q%Xq%WdS(NsjessyInk__*(tglobROtpathtjoinRDt
gettempdirtremove(R0tinfile((s1/usr/share/inkscape/extensions/jessyInk_export.pyRA�s
+c	Cs�g}|jd�|jd�|jd�xa|D]Y}tj|dgdtdtjdtj�}|j�\}}|jdkr4|Sq4WdS(	NR>s&C:\Program Files\Inkscape\inkscape.exes:/Applications/Inkscape.app/Contents/Resources/bin/inkscapes --without-gui --versionR_RRRIi(tappendRcRdReRfRgt
returncodeR+(R0tcommandstcommandRnRoRp((s1/usr/share/inkscape/extensions/jessyInk_export.pyR)�s



.N(t__name__t
__module__R+R*tzipFileR%R1R[RKRAR)(((s1/usr/share/inkscape/extensions/jessyInk_export.pyR>s			/		(R.RrRwR#tos.pathRORcRDRFRqtreR	RRR$Rtetaffect(((s1/usr/share/inkscape/extensions/jessyInk_export.pyt<module>s 				n