Older blog entries for oubiwann (starting at number 4)

3 Mar 2005 (updated 6 Mar 2005 at 02:14 UTC) »
Twisted and Advogato

programming :: python

Here are some quick notes on accessing Advogato from twisted's xmlrpc:
>>> from twisted.web import xmlrpc
>>> from twisted.trial.util import deferredResult
>>> user = 'oubiwann'
>>> pass = 'xxxxxx'
>>> x = xmlrpc.Proxy("http://www.advogato.org/XMLRPC")
>>> deferred = x.callRemote('diary.len', user)
>>> count = deferredResult(deferred)
>>> for i in range(0,count):
...   deferred = x.callRemote('diary.get', user, i)
...   html = deferredResult(deferred)
...   print html
And this will print out the contents of the diary entries.

To make a a new diary entry, just do this:
>>> deferred = x.callRemote('authenticate', user, pass)
>>> cookie = deferredResult(deferred)
>>> deferred = x.callRemote('diary.set', cookie, -1, 'This is a test entry via XML-RPC')
>>> status = deferredResult(deferred)
3 Mar 2005 (updated 3 Mar 2005 at 06:47 UTC) »
Advogato has XML-RPC

software :: weblogs :: python

As Titus Brown was kind enough to inform, it turns out that Advogato has an XML-RPC interface. You can read about it here: http://www.advogato.org/xmlrpc.html. Thus, no need for mechanize (thank goodness... that would be been like swatting a fly with an engine block).

I still want to be able to make posts to my diary via email, so I will adopt my old MT/yarn-based script to Advogato's XML-RPC. Nightly exports could be done with either XML-RPC or with urllib... we shall see.

Titus also mentioned that he had more to say on the matter, and an update would be forth coming... I look forward to that :-)

2 Mar 2005 (updated 3 Mar 2005 at 06:36 UTC) »
It Worked!

software :: weblogs :: python

Well, now that it worked, I'm off and running. This will be the new ElectricDuncan weblog... perhaps I will do something with the old weblog data I still have, maybe some stuff from Google's cache, and I think I have some saved drafts somewhere on my laptop. When there's something setup for the archives and that data, I'll provide a link.

At any rate, this is a fresh start ;-) And the code to weave this into a powerful blogging system will be small and easy to write. I've got all kinds of ideas, including using something like a combination of yarn and mechanize to automatically post entries to Advogato. If anyone's interested in using this like I am, just let me know, and I'll give a link to the code. And, of course, I see a place for the most wonderful cElementTree here as well ;-)

2 Mar 2005 (updated 16 Mar 2005 at 01:41 UTC) »
Advogato as a Blogging System?

weblogs :: software

Well, I've been thinking about the diary from Advogato as a new place to blog. The primary motivation at this point is simplicity. I've thought about reinstalling MT and trying to get back some of my old posts, integrating a blog with the Zope/Plone-based corp extranet for AdytumSolutions, using blogger.com, etc. But none of these things are really cutting the mustard. I can't even begin to tell you how much I lost with my blog. Completely disheartening. I want to continue blogging, but I don't want to spend all the effort I had to do before... and I don't want to use someone's feature-rich system that does a billion more things than I need. As far as Advogato is concerned, the things holding me back are the following:
    * export/backups of diary entries
    * the ability to title entries
    * categorization of diary entires

That's not too bad, really... because here's what I'm thinking: every night I will run a script that pulls down the "Recent diary entries" RSS feed, eliminate overlap/redundancies, and save. Not only that, but I can build my own viewable archive in any system that lets me process XML data. So, I think I am convincing myself that I can make this work...

As for the titling and cateorization of things, I will have to think about... possibly HTML attributes, if Advogato doesn't strip those out; I'll have to test. Hm... I wonder how/if that would be preserved in the RSS feed? Looks like it's time to do some testing! I see possible adapations of Abe Fetig's yarn software here, kind of like what I did when writing that script to process emails as blog entries...

In the preview, the HTML attributes were preserved... let's see what this looks like after I post.

2 Mar 2005 (updated 16 Mar 2005 at 03:30 UTC) »

systems :: software

Well, one of my servers took a nose dive and it was the one that hosted my weblog. So, I've been exploring other options, and this may be one of them... it's been ages since I used advogato; perhaps it's time to get reacquainted :-)

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!