GoZip GoZip.py,1.1.1.1,1.2 GoZipFolder.py,1.1.1.1,1.2 INSTALL.txt,1.1.1.1,1.2 README.txt,1.1.1.1,1.2 __init__.py,1.2,1.3 version.txt,1.1.1.1,1.2
Jens Klein <[email protected]>
| Newsgroups | gmane.comp.web.zope.eduplone.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/eduplone/GoZip In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27759 Modified Files: GoZip.py GoZipFolder.py INSTALL.txt README.txt __init__.py version.txt Log Message: better install, use ATCT, docu updated, extensions handling improved. Index: GoZipFolder.py =================================================================== RCS file: /cvsroot/eduplone/GoZip/GoZipFolder.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** GoZipFolder.py 16 Dec 2003 01:05:01 -0000 1.1.1.1 --- GoZipFolder.py 13 Jun 2004 13:34:35 -0000 1.2 *************** *** 1,40 **** #----------------------------------------------------------------------------- ! # Name: GoZip.py # Purpose: folderish Archetype supporting export of it's contents as .zip file # ! # Author: [email protected] ! # [email protected] # # Created: 2003/25/08 # RCS-ID: $Id$ ! # Copyright: (c) 2002 # Licence: GPL #----------------------------------------------------------------------------- - # generated by ArchGenXML Fri Aug 22 13:06:02 2003 - from AccessControl import ClassSecurityInfo from Products.Archetypes.public import * from Products.GoZip.GoZip import * ! class GoZipFolder(BaseFolder,GoZip): security = ClassSecurityInfo() - portal_type = meta_type = 'GoZip Folder' - archetype_name = 'Folder (GoZip)' #this name appears in the 'add' box - schema=BaseSchema + Schema(( - )) ! # uncommant lines below when you need ! factory_type_information={ ! #'allowed_content_types':('Image','Topic','Link','Folder') , ! #'content_icon':'GoZip.gif', ! 'immediate_view':'base_view', ! #'global_allow':0, ! #'filter_content_types':0, ! } ! ! actions=GoZip.actions ! registerType(GoZipFolder)# end class GoZip --- 1,28 ---- #----------------------------------------------------------------------------- ! # Name: GoZipFolder.py # Purpose: folderish Archetype supporting export of it's contents as .zip file # ! # Author: Georg Bernhard <[email protected]> ! # Jens Klein <[email protected]> # # Created: 2003/25/08 # RCS-ID: $Id$ ! # Copyright: (c) 2002-2004 # Licence: GPL #----------------------------------------------------------------------------- from AccessControl import ClassSecurityInfo from Products.Archetypes.public import * + from Products.ATContentTypes.types.ATFolder import ATFolder from Products.GoZip.GoZip import * ! class GoZipFolder(ATFolder,GoZip): ! """ A zipable folderish ATCT """ security = ClassSecurityInfo() ! portal_type = meta_type = 'Folder GoZip' ! archetype_name = 'Folder (GoZip)' #this name appears in the 'add' box ! immediate_view = 'base_view' registerType(GoZipFolder)# end class GoZip Index: version.txt =================================================================== RCS file: /cvsroot/eduplone/GoZip/version.txt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** version.txt 16 Dec 2003 01:05:01 -0000 1.1.1.1 --- version.txt 13 Jun 2004 13:34:35 -0000 1.2 *************** *** 1 **** ! 0.1.2 --- 1 ---- ! 0.1.3 CVS Index: __init__.py =================================================================== RCS file: /cvsroot/eduplone/GoZip/__init__.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** __init__.py 19 Dec 2003 10:28:22 -0000 1.2 --- __init__.py 13 Jun 2004 13:34:35 -0000 1.3 *************** *** 4,14 **** import os, os.path ! ADD_CONTENT_PERMISSION = 'Add GoZip content' ! PROJECTNAME = "GoZip" ! ! product_globals=globals() ! DirectoryView.registerDirectory('skins', product_globals) ! DirectoryView.registerDirectory('skins/GoZip', product_globals) def initialize(context): --- 4,11 ---- import os, os.path ! from config import * ! DirectoryView.registerDirectory('skins', GLOBALS) ! DirectoryView.registerDirectory('skins/GoZip', GLOBALS) def initialize(context): Index: GoZip.py =================================================================== RCS file: /cvsroot/eduplone/GoZip/GoZip.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** GoZip.py 16 Dec 2003 01:05:01 -0000 1.1.1.1 --- GoZip.py 13 Jun 2004 13:34:35 -0000 1.2 *************** *** 12,19 **** #----------------------------------------------------------------------------- ! import sys ! import os ! import tempfile ! import zipfile from types import StringType from StringIO import StringIO --- 12,16 ---- #----------------------------------------------------------------------------- ! import sys, os, tempfile, zipfile from types import StringType from StringIO import StringIO *************** *** 26,30 **** from Products.Archetypes.public import * - from Products.Archetypes.public import * from Products.CMFCore import CMFCorePermissions from Products.CMFCore.utils import getToolByName --- 23,26 ---- *************** *** 117,125 **** # set extension only if mimetypes_registry got somethin otherwise use # default if mimeobj: extension='.'+mimeobj.extensions[0] # build filename ! filename = item.getId() + extension # build path+filename --- 113,125 ---- # set extension only if mimetypes_registry got somethin otherwise use # default + filename = item.getId() if mimeobj: extension='.'+mimeobj.extensions[0] + for ext in mimeobj.extensions: + if filename.endswith(ext): + extension = '' # build filename ! filename += extension # build path+filename *************** *** 176,182 **** self._save_itemlist(zipf,item.objectValues(),subpath,pathdict) ! # store item itself in a special way: append '_fields' to the # name ! self._store(item, zipf, path+'_fields.', pathdict) else: # store non-folderish object --- 176,182 ---- self._save_itemlist(zipf,item.objectValues(),subpath,pathdict) ! # store item itself in a special way: append '_content' to the # name ! self._store(item, zipf, path+'_content.', pathdict) else: # store non-folderish object *************** *** 230,234 **** security.declareProtected(CMFCorePermissions.ModifyPortalContent, 'zip_import') def zip_import(self,file): ! """ This method is not complete implemented """ # steps to do --- 230,234 ---- security.declareProtected(CMFCorePermissions.ModifyPortalContent, 'zip_import') def zip_import(self,file): ! """ This method is not implemented """ # steps to do Index: INSTALL.txt =================================================================== RCS file: /cvsroot/eduplone/GoZip/INSTALL.txt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** INSTALL.txt 16 Dec 2003 01:05:01 -0000 1.1.1.1 --- INSTALL.txt 13 Jun 2004 13:34:35 -0000 1.2 *************** *** 1,33 **** ! Installing GoZip (Folder supporting ZIP im/-export) ! ! Zip-import is currently not implemented. ! ! To install GoZip, uncompress the product into ! your zope/Products directory or link it there, e.g.:: ! ! ln -s /path/to/installation /path/to/zope/Products ! ! In the root of your Plone site (within the ZMI): ! ! 1. Add an external method to the root of the Plone site. ! ! 2. Use the following configuration values for the external ! method: ! ! o id: install_gozip ! ! o title: Install GoZip *optional* ! ! o module name: GoZip.Install ! ! o function name: install ! ! 3. Go to the management screen for the newly added external ! method and click the 'Test' tab. ! ! _or_ (recommend) ! just use CMFQuickInstaller-Tool to add it to your Plone instance. ! The manager should now be able to instantiate a GoZipFolder from ! within Plone. --- 1,16 ---- ! Installing GoZip ! After downloading and unpacking the tarball into you Products ! directory, use the quickinstaller tool or plone control panel to ! install within a portal. ! When you install GoZip (currently) it will automatically ! install the required Products (if available). This is great ! for development, but really a bad idea for production sites. ! Why? Well, all of the other Products get associated with the ! GoZip install, so if you try to uninstall GoZip, it ! will remove all of the skins of the other Products, effectively ! hosing your Plone. So, the recommended workaround for this is ! to install each of the required Products individually, THEN ! install GoZip solo. For example, install Archetypes, then ! ATContentTypes, then install GoZip. Index: README.txt =================================================================== RCS file: /cvsroot/eduplone/GoZip/README.txt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** README.txt 16 Dec 2003 01:05:01 -0000 1.1.1.1 --- README.txt 13 Jun 2004 13:34:35 -0000 1.2 *************** *** 1,22 **** ! GoZip - archetypes based zip export folder for CMF/Plone ! -------------------------------------------------------- ! GoZip is a class you can mix-in your archetype. It support methods for zip export. Import is planned. ! GoZipFolder is the reference implementaion of such an ! archetype. It can be used as an fully functional portal-type. ! GoZip depends on Archetypes 1.0.1 or newer ! contact: ! Jens Klein <[email protected]> ! Georg Bernhard <[email protected]> ! website: ! http://sf.net/projects/eduplone/ ! http://www.eduplone.net/ - license: - GNU General Public License Vesion 2 or newer, see at - http://www.gnu.org/licenses/gpl.html --- 1,42 ---- ! GoZip - archetypes based zip export folder for Plone ! GoZip is a class you can mix-in your archetype. It support methods for zip export. Import is planned. ! GoZipFolder is an ATFolder (from ATContentTypes) extended by the ! zip-export feature. ! Dependencies: ! GoZip depends on ATContentTypes and its dependencies. ! Contact: ! ! * "Jens Klein":mailto:[email protected] ! ! * "Georg Bernhard":mailto:[email protected] ! ! Website: ! ! * "eduplone on sourceforge":http://sf.net/projects/eduplone/ ! ! * "eduplone EEIG and community":http://www.eduplone.net/ ! ! License: ! ! GNU General Public License Vesion 2 or newer, see at ! "http://www.gnu.org/licenses/gpl.html":http://www.gnu.org/licenses/gpl.html ! 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504