Welcome to Squishdot Websites Squishdot How-To Newbies
 about
 search
 post article
 Documentation
 Mailing Lists
 Bug Tracking
 Development
 Installation
 Upgrading
 Download
 admin
 rdf

 main


A python script to interate through articles
How-To Posted by David Benko on Wednesday January 29, 11:23AM, 2003
from the dept.
I'm trying to write a python script that simply interates through all the articles in a squishdot site and just prints the fields out. Help!

I realise this appears to be useless, but I'm trying to learn python, how the zodb works and how squish works in one fell swoop. I figure if I can do this then I can programmatically access the data and then send it elsewhere, ie a relational database.

My problem is I don't appear to be getting anywhere, can anyone help. The absence of a script to do this suggests I'm possibly barking up the wrong tree or approaching it from the wrong angle. Please help!

<  |  >

 

Related Links
  • Articles on How-To
  • Also by David Benko
  • Contact author
  • The Fine Print: The following comments are owned by whoever posted them.
    ( Reply )

    Try this...
    by Chris Withers on Thursday February 13, 03:04PM, 2003
    for brain in context.you_squish_site():
    posting = brain.getObject()
    print posting.title
    print posting.body
    # ..etc..
    return printed
    [ Reply to this ]
    • Re: Brilliant
      by David Benko on Thursday February 13, 03:54PM, 2003
      Thanks Chris, works great! I clearly need to go and learn python then zope plumming!!
      [ Reply to this ]

     
    The Fine Print: The following comments are owned by whoever posted them.
    ( Reply )

    Powered by Zope  Squishdot Powered
      "Any system that depends on reliability is unreliable." -- Nogg's Postulate
    All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©1999 Butch Landingin, ©2000-2002 Chris Withers.