File: //usr/share/inkscape/extensions/svg_and_media_zip_output.pyc
�
��Yc @ s� d Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l
Z
d d l Z d d l Z e
j
e
j d � e j � d e j f d � � YZ e d k r� e � Z e j � n d S( s�
svg_and_media_zip_output.py
An extention which collects all images to the documents directory and
creates a zip archive containing all images and the document
Copyright (C) 2005 Pim Snel, pim@lingewoud.com
Copyright (C) 2008 Aaron Spike, aaron@ekips.org
Copyright (C) 2011 Nicolas Dufour, nicoduf@yahoo.fr
* Fix for a bug related to special caracters in the path (LP #456248).
* Fix for Windows support (LP #391307 ).
* Font list and image directory features.
this is the first Python script ever created
its based on embedimage.py
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.
TODOs
- fix bug: not saving existing .zip after a Collect for Output is run
this bug occurs because after running an effect extention the inkscape:output_extension is reset to svg.inkscape
the file name is still xxx.zip. after saving again the file xxx.zip is written with a plain .svg which
looks like a corrupt zip
- maybe add better extention
- consider switching to lzma in order to allow cross platform compression with no encoding problem...
i����Nt t CompressedMediaOutputc B sP e Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z RS( c C s� t j j | � t j d k r+ d | _ n d | _ d d d d d g | _ | j j d d
d d d
d d d d d d �| j j d d
d d d d d d t d d �| j j d d
d d d
d d d d �d S( Nt ntt cp437s latin-1s! {http://www.w3.org/2000/svg}tspans {http://www.w3.org/2000/svg}texts$ {http://www.w3.org/2000/svg}flowRoots$ {http://www.w3.org/2000/svg}flowParas$ {http://www.w3.org/2000/svg}flowSpans --image_dirt actiont storet typet stringt destt image_dirt defaultR t helps Image directorys --font_listt inkboolt font_lists
Add font lists --tabt tabs'