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

 main


XML-RPC & Python
Squishdot Posted by Fabian on Saturday May 12, 12:21AM, 2001
from the dept.
I recently started playing with Squishdot, and had an idea. If posting and viewing an article could be done via XML-RPC, then a remote client could be used. Such a client could check for new articles and alert the user (system tray flashing in Windows), or provide for easy posting. Is it possible to view or post something from a python script?

<  |  >

 

Related Links
  • Articles on Squishdot
  • Also by Fabian
  • Contact author
  • The Fine Print: The following comments are owned by whoever posted them.
    ( Reply )

    Of course it is :-)
    by Chris Withers (for Julius ;-) on Sunday May 13, 09:45PM, 2001

    You just have to poke the addPosting method of SquishSites and articles with the right parameters.

    For example:

    your_squish_site.addPosting(xxx)
    your_squish_site['989623316'].appPosting(xxx)
    

    Exact details can be found by reading the source ;-)

    As for notification, you can just call your notification script from the mail_html method. You can get this to always fire by checking the correct boxes on the Options tab.

    cheers,

    Chris

    [ Reply to this ]
    Re: XML-RPC & Python
    by Fabian on Monday May 14, 12:11AM, 2001
    Ahh! Now that I'm looking at the source things are looking much better, thanks! I'm able to get post info eaisly enough, but I'm still having problems with addPosting though.
    I'm pretty familiar with Python, though not very familiar with Zope.


    myRequest= {'title': "title "test", 'author': 'Fabian', 'body': 'body', 'email':'somewhere@someplace.com','summary': 'summary','subject': 'misc-subject','dept': 'utoh dept', 'notify': '0' }
    self.addPosting('', myRequest, None)

    When I try this, it gives me a big error message:
    Error Type: TypeError
    Error Value: read-only character buffer, dictionary
    lots of trace back info with the end being:
    File /usr/local/Zope-2.1.6-src/lib/python/Products/Squishdot/Squishdot.py, line 883, in addPosting (Object: ElementWithAttributes) TypeError: read-only character buffer, dictionary

    I'm using zopesite.com, and it doesn't match the source version I'm looking at. I'm assuming it's a silly problem.

    Thanks much!!,

    Fabian
    Click to download attachment
    0KB (0 bytes)

    [ Reply to this ]
    • Re: XML-RPC & Python
      by Chris Withers on Friday May 18, 04:05PM, 2001
      Hurm... without knowing what version of Squishdot they run on ZopeSite.com, I can't really help...

      cheers,

      Chris
      [ 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.