Re: batch x-rst to html

"Jens W. Klein" <[email protected]>
Newsgroups gmane.comp.web.zope.german
Organization Klein & Partner KG, BlueDynamics Alliance
Message-ID <1294675642.1497.56.camel@minime>
Hi

Dein transform läuft ins leere:

Am Montag, den 10.01.2011, 16:00 +0000 schrieb Michael Graf:
> Ja schon klar, aber wahrscheinlich ist nur mein ansatz komplett falsch
> – aber auf jeden Fall bleibt im Editor der rest Text und kein HTML für
> TinyMCE
> 
> -----------
> 
> from Products.CMFCore.utils import getToolByName
> 
> #from string import split
> 
>  
> 
> portal_catalog = getToolByName(context, 'portal_catalog')
> 
> portal_transforms = getToolByName(context, 'portal_transforms')
> 
>  
> 
> results = portal_catalog.searchResults(portal_type='Document')
> 
>  
> 
> for result in results:
> 
>     if result.getObject is not None:
> 
> #      print context.run_convertall(oldid)
> 
        ob = result.getObject()
        tranformed = portal_transforms.convert('rest_to_html',
ob.getText()) 
        ob.setText(transforms, contenttype="text/html")     
	print "converted " + ob.absolute_url()
                

> return printed

bei setText bitte nachschaun ob contenttype oder content_type oder
ähnlich.

lg Jens

> -----------
> 
>  
> 
> lg
> michi
> 
>  
> 
>  
> 
> Von: [email protected] [mailto:[email protected]] Im Auftrag
> von Andreas Jung
> Gesendet: Montag, 10. Jänner 2011 10:43
> An: Deutschsprachige Zope-Benutzer-Liste
> Betreff: [dzug-zope] Re: batch x-rst to html
> 
>  
> 
> Wo ist das _genaue_ Problem? Iteration über die Objekt und für jedes
> die Transformation aufrufen!?
> 
>  
> 
> 
> -aj
> 
> Am 10. Januar 2011 10:42 schrieb Michael Graf
> <[email protected]>:
> 
> Guten Morgen,
> 
> ich versuche mich gerade intensiver mit PortalTransforms zu
> beschäftigen, und stoße schon zu Beginn auf eine kleine Hürde.
> 
> Gibt es eine Möglichkeit mehrere Objekte – automatisiert – umwandeln
> zu lassen.
> 
>  
> 
> In meinem Fall, x-rst to html, für ca. 50 Dokumente…
> 
>  
> 
> lg
> michi
> 
>  
> 
> Michael Graf
> 
> Webmaster
> 
>  
> 
> IMC Fachhochschule Krems
> 
> University of Applied Sciences Krems
> 
> Piaristengasse 1, A-3500 Krems, Austria, Europe
> 
>  
> 
> Office:
> 
> Am Campus Krems, Trakt G, Raum 4.08
> 
> T: +43-(0)2732-802- ext. 519
> 
> F: +43-(0)2732-802-4
> E: [email protected]
> I: http://www.fh-krems.ac.at
> 
>  
> 
> PBitte nur ausdrucken, wenn es wirklich nötig ist.
> 
>  
> 
>  
> 
> 
>  
> 
>                                    
> ______________________________________________________________________
> 
> Diese Nachricht erhalten Sie von einem IMC Mitarbeiter.
> Allfallige angehängte Dokumente sind vertraulich und nur für den/die
> Adressaten bestimmt. Sollten Sie nicht der beabsichtigte Adressat
> sein, ist jede Offenlegung, Weiterleitung oder sonstige Verwendung
> dieser Information nicht gestattet. In diesem Fall bitten wir, den
> Absender zu verstandigen und die Information zu vernichten. Für
> Übermittlungsfehler oder sonstige Irrtumer bei Übermittlung besteht
> keine Haftung.
> 
> This message is being transmitted by an IMC employee.
> Any attached files are confidential and intended solely for the
> addressee(s). Any publication, transmission or other use of the
> information by a person or entity other than the intended addressee is
> prohibited. If you receive this in error please contact the sender and
> delete the material. The sender does not accept liability for any
> errors or omissions as a result of the transmission.
> 
> Informationspflicht nach §14 UGB:
> 
> IMC Fachhochschule Krems GmbH
> Piaristengasse 1, A-3500 Krems
> Austria, Europe
> ATU: 37552304
> Firmenbuchnummer: 79297 p
> Firmenbuchgericht: Landesgericht Krems an der Donau
> DVR: 0798771
> Fachgruppe Unternehmensberatung
> 
> 
> 
> 
> 
> _______________________________________________
> zope mailing list
> [email protected]
> https://mail.dzug.org/mailman/listinfo/zope
> 
> 
>  
> 
> 
> 
> 
> ______________________________________________________________________
> 
> Diese Nachricht erhalten Sie von einem IMC Mitarbeiter.
> Allfallige angehängte Dokumente sind vertraulich und nur für den/die
> Adressaten bestimmt. Sollten Sie nicht der beabsichtigte Adressat
> sein, ist jede Offenlegung, Weiterleitung oder sonstige Verwendung
> dieser Information nicht gestattet. In diesem Fall bitten wir, den
> Absender zu verstandigen und die Information zu vernichten. Für
> Übermittlungsfehler oder sonstige Irrtumer bei Übermittlung besteht
> keine Haftung.
> 
> This message is being transmitted by an IMC employee.
> Any attached files are confidential and intended solely for the
> addressee(s). Any publication, transmission or other use of the
> information by a person or entity other than the intended addressee is
> prohibited. If you receive this in error please contact the sender and
> delete the material. The sender does not accept liability for any
> errors or omissions as a result of the transmission.
> 
> Informationspflicht nach §14 UGB:
> 
> IMC Fachhochschule Krems GmbH
> Piaristengasse 1, A-3500 Krems
> Austria, Europe
> ATU: 37552304
> Firmenbuchnummer: 79297 p
> Firmenbuchgericht: Landesgericht Krems an der Donau
> DVR: 0798771
> Fachgruppe Unternehmensberatung
> 
> _______________________________________________
> zope mailing list
> [email protected]
> https://mail.dzug.org/mailman/listinfo/zope




_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.