RE: [Zope-dev] About populate folders by external scripts.

2004-08-11 Thread Matt Shaw
Hi Christian,
If you are using Archetypes there is a useful tool in the Plone collective
called ATImportTool. This will allow you to import your content from a flat
file. It can create folders on the fly or use existing ones. It can also be
used to update content. It's only available through cvs checkout for now:

http://cvs.sourceforge.net/viewcvs.py/collective/ATImportTool/

hth,
Matt



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Cristian S. Rocha
Sent: Tuesday, August 10, 2004 6:16 PM
To: [EMAIL PROTECTED]
Subject: [Zope-dev] About populate folders by external scripts.


Hi,

I'm working in a Product (CMFBio) to store biological data as Plone
content. To begin the database I need to populate a Plone Folder with a
lot of these contents (> 1) in a batch way. That's the reason to
make a little script who load a big file and create the objects in a
folder. I was looking information about it, but was difficult to me
found something in the zope.org page. I make a form to upload a file,
but I would like do it in the command line.

Could you help me with some examples to do that?

Thanks,
Cristian.

--
Lic. Cristian S. Rocha <[EMAIL PROTECTED]>
Departamento de Computación,
Facultad de Ciencias Exactas y Naturales,
Universidad de Buenos Aires.

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



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


Re: [Zope-dev] KeyError in GlobalTranslationService.py

2004-08-11 Thread Florent Guillaume
Could you give an example of msgid that fails and gives the traceback
included ?

Florent

In article <[EMAIL PROTECTED]> you write:
> -=-=-=-=-=-
> -=-=-=-=-=-
> 
> I just submitted a patch for Plone 2.0.3
> http://plone.org/collector/3329
> that stops a KeyError from being triggered in 
> GlobalTranslationService.py when a msgid contains a "$"
> 
> I think that passing a translation key containing $ should not cause an 
> Error page.
> 
> So here's a patch for Zope that at least prevents the problem. 
> Translation Service dudes will probably pick big holes in it.
> 
> Oh, and traceback attached below. The msgid was Ca$hville, the title of 
> a doc.
> 
> --r.
> 
> diff GlobalTranslationService.py.orig GlobalTranslationService.py
> 28,31c28,35
> < def repl(m, mapping=mapping):
> < return ustr(mapping[m.group(m.lastindex)])
> < cre = re.compile(r'\$(?:(%s)|\{(%s)\})' % (NAME_RE, NAME_RE))
> < return cre.sub(repl, default or msgid)
> ---
>  > try:
>  >   def repl(m, mapping=mapping):
>  >   return ustr(mapping[m.group(m.lastindex)])
>  >   cre = re.compile(r'\$(?:(%s)|\{(%s)\})' % (NAME_RE, 
> NAME_RE))
>  >   return cre.sub(repl, default or msgid)
>  > except KeyError:
>  > return msgid
> 
> Traceback:
> 
> Site Error
> 
> An error was encountered while publishing this resource.
> 
> KeyError
> Sorry, a site error occurred.
> 
> Traceback (innermost last):
> 
> * Module ZPublisher.Publish, line 163, in publish_module_standard
> * Module ZPublisher.Publish, line 127, in publish
> * Module Zope.App.startup, line 203, in zpublisher_exception_hook
> * Module ZPublisher.Publish, line 100, in publish
> * Module ZPublisher.mapply, line 88, in mapply
> * Module ZPublisher.Publish, line 40, in call_object
> * Module Shared.DC.Scripts.Bindings, line 306, in __call__
> * Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
> * Module Products.CMFCore.FSPageTemplate, line 191, in _exec
> * Module Products.CMFCore.FSPageTemplate, line 124, in pt_render
> * Module Products.PageTemplates.PageTemplate, line 96, in pt_render
>    /testdollarproblem/foo>
> * Module TAL.TALInterpreter, line 189, in __call__
> * Module TAL.TALInterpreter, line 233, in interpret
> * Module TAL.TALInterpreter, line 663, in do_useMacro
> * Module TAL.TALInterpreter, line 233, in interpret
> * Module TAL.TALInterpreter, line 408, in do_optTag_tal
> * Module TAL.TALInterpreter, line 393, in do_optTag
> * Module TAL.TALInterpreter, line 388, in no_tag
> * Module TAL.TALInterpreter, line 233, in interpret
> * Module TAL.TALInterpreter, line 663, in do_useMacro
> * Module TAL.TALInterpreter, line 233, in interpret
> * Module TAL.TALInterpreter, line 605, in do_loop_tal
> * Module TAL.TALInterpreter, line 233, in interpret
> * Module TAL.TALInterpreter, line 408, in do_optTag_tal
> * Module TAL.TALInterpreter, line 393, in do_optTag
> * Module TAL.TALInterpreter, line 388, in no_tag
> * Module TAL.TALInterpreter, line 233, in interpret
> * Module TAL.TALInterpreter, line 629, in do_condition
> * Module TAL.TALInterpreter, line 233, in interpret
> * Module TAL.TALInterpreter, line 552, in do_insertTranslation
> * Module TAL.TALInterpreter, line 615, in translate
> * Module Products.PageTemplates.TALES, line 263, in translate
> * Module Products.PageTemplates.GlobalTranslationService, line 31, 
> in
> translate
> * Module Products.PageTemplates.GlobalTranslationService, line 29, 
> in repl
> 
> KeyError: 'hville' (Also, an error occurred while attempting to render 
> the
> standard error message.)
> 
> —
> Russ Ferriday
> Solution Workshops for Plone
> (+44) (0) 7789 338868
> http://www.solutionworkshops.com
> -=-=-=-=-=-
> [Alternative: text/enriched]
> -=-=-=-=-=-
> -=-=-=-=-=-
> 
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://mail.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope )
> 
> -=-=-=-=-=-


-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 71 59  http://nuxeo.com  mailto:[EMAIL PROTECTED]
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )