File: //usr/share/inkscape/extensions/extractimage.pyo
�
��Yc @ si d Z d d l Z d d l Z d d l Z d e j f d � � YZ e d k re e � Z e j � n d S( s�
Copyright (C) 2005 Aaron Spike, aaron@ekips.org
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����Nt MyEffectc B s e Z d � Z d � Z RS( c C sR t j j | � | j j d � | j j d d d d d d d d d d
d �d S( Ns --descs
--filepatht actiont storet typet stringt destt filepatht defaultt helpt ( t inkext Effectt __init__t OptionParsert
add_optiont None( t self( ( s. /usr/share/inkscape/extensions/extractimage.pyR s c C s4 i d d 6d d 6d d 6d d 6d d 6d
d 6} | j j } | d k r0| j j r0x�| j j � D]�\ } } | j t j d
d � k rd | j t j d d � � } | d d k r&| j d � } | d k rd } | j d � } | d k r�x� | j
� D]� } | | d | !j � k r� | | } | | } t j
j | � s�t j d k rrt j
j t j d | � } q�t j
j t j
j d � | � } n t j t d � | � Pq� q� Wn t j | | � }
t | d � j |
� | j t j d d � t j
j | � � n t j t d � � Pq&qd qd Wq0n d S( Ns .pngt pngs .bmpt bmps .jpgt jpegt jpgs .icot icons .gift gifR t imaget svgt hreft xlinki t datat ,i t ;i t ntt USERPROFILEt ~s Image extracted to: %st wbs Unable to find image data.( t optionsR t idst selectedt iteritemst tagR
t addNSt gett findt keyst lowert ost patht isabst namet joint environt
expandusert errormsgt _t base64t decodestringt opent writet sett realpath( R t
mimesubextR- t idt nodeR t commat fileextt semicolont subR ( ( s. /usr/share/inkscape/extensions/extractimage.pyt effect! sD
$+( t __name__t
__module__R RB ( ( ( s. /usr/share/inkscape/extensions/extractimage.pyR s t __main__( t __doc__R5 R, R
R R RC t et affect( ( ( s. /usr/share/inkscape/extensions/extractimage.pyt <module> s 3