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/dm2svg.pyc
�
��Yc@s�dZddlZd�Zd�Zd�Zd�Zedkr�ddlZeej	�dkrweej	d	�q�ej
d
ej	dIJndS(s�
dm2svg.py - import a DHW file from ACECAD DigiMemo

Copyright (C) 2009 Kevin Lindsey, https://github.com/thelonious/DM2SVG
Copyright (C) 2011 Nikita Kitaev, https://github.com/nikitakit/DM2SVG
Copyright (C) 2011 Chris Morgan,  https://gist.github.com/1471691

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
i����Nc
Cs�yt|d�}Wn+tk
r@}tjd||fIJdSX|��t|�}d}d}d|}xltr�|jd�}|dkr�Pnt|�dkr�|d	kr�t|�td
�dt|jd��d}d}d|}q�|dkr |t|jd��d
7}q�t|�g}xOtr�|j	t
||��t|jd��dkrnPn|jdd�q3W|j	t
||��djd�|D��}	d|	|f}qmtjd|IJqmWdGHWdQXdS(NtrbsUnable to open %s: %stlayer1is&<g inkscape:groupmode="layer" id="%s">iti�s�s</g>slayer%ds�ii����t css'|]}djtt|��VqdS(t,N(tjointmaptstr(t.0te((s(/usr/share/inkscape/extensions/dm2svg.pys	<genexpr>Iss*<polyline points="%s" dm:timestamp="%s" />sUnsupported tag: %s
s
</svg>
(
topentIOErrortsyststderrtemit_headertTruetreadtordtemit_elementtappendt
read_pointtseekR(
tfilenametfR	theighttlayert	timestamptsvg_elementttagtcoordstpoints((s(/usr/share/inkscape/extensions/dm2svg.pytprocess_filesF
	


 
	cCsNtt|jd��\}}}}||d>B}||d>B}|||fS(Nii(RRR(Rtymaxtx1tx2ty1ty2txty((s(/usr/share/inkscape/extensions/dm2svg.pyRRs$cCs:tjd|jd��\}}}}}dt�GH|S(Ns
<32sBHHBxxi(s�
<svg viewBox="0 0 %(width)s %(height)s" fill="none" stroke="black" stroke-width="10" stroke-linecap="round" stroke-linejoin="round"
  xmlns="http://www.w3.org/2000/svg"
  xmlns:svg="http://www.w3.org/2000/svg"
  xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  xmlns:dm="http://github.com/nikitakit/DM2SVG">
    <metadata>
      <dm:page
        id="%(id)s"
        version="%(version)s"
        width="%(width)s"
        height="%(height)s"
        page_type="%(page_type)s">
      </dm:page>
    </metadata>
    <rect width="%(width)s" height="%(height)s" fill="aliceblue"/>
(tstructtunpackRtlocals(RtidtversiontwidthRt	page_type((s(/usr/share/inkscape/extensions/dm2svg.pyRZs*cCs|rd|GHndS(Ns%s
((tmessage((s(/usr/share/inkscape/extensions/dm2svg.pyRsst__main__iisUsage: %s <dhw-file>i(t__doc__R'RRRRt__name__RtlentargvR
(((s(/usr/share/inkscape/extensions/dm2svg.pyt<module>s	8