Re: [Zope] add folder from the filesystem

2006-01-25 Thread Peter Bengtsson
On 1/25/06, George [EMAIL PROTECTED] wrote:
 Is there a way to add a folder with its contents from the filesystem into
 Zope using an external method?

What do you mean? Do you have a folder in /home/someone/stuff filled
with files that you want to upload?
If you download the CVS version of the IssueTrackerProduct you'll find
code that does exactly this (recursively).



 thx in [EMAIL PROTECTED]
 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )





--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] add folder from the filesystem

2006-01-25 Thread Jonathan



Sure...

you need to have your external method access the 
file system 'folder/directory' and then read each file in the folder to get the 
contents of the files.

Some zope methods that may be of use (check the 
zope book):

To create a folder within the zodb:
 manage_addFolder

To add objects to the folder (you need to determine 
which objects you want to add):
 manage_addFile
 manage_addImage
 manage_addDocument
 
manage_addDTMLMethod


hth

Jonathan


  - Original Message - 
  From: 
  George 
  To: zope@zope.org 
  Sent: Wednesday, January 25, 2006 7:17 
  AM
  Subject: [Zope] add folder from the 
  filesystem
  Is there a way to add a folder with its contents from the 
  filesystem into Zope using an external method?thx in [EMAIL PROTECTED] 
  
  

  ___Zope maillist 
  - Zope@zope.orghttp://mail.zope.org/mailman/listinfo/zope** 
  No cross posts or HTML encoding! **(Related lists - 
  http://mail.zope.org/mailman/listinfo/zope-announcehttp://mail.zope.org/mailman/listinfo/zope-dev 
  )
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] add folder from the filesystem

2006-01-25 Thread Igor Stroh
George wrote:
 Is there a way to add a folder with its contents from the filesystem
 into Zope using an external method?

There's a script in zope's bin directory called load_site.py, it does
exactly what you're looking for:

$ cd /usr/lib/zope2.8/bin
$ python -c 'import load_site;print load_site.__doc__'
Load a Zope site from a collection of files or directories

HTH,
Igor
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )