EUCCI accessories

euc.cx offers simple XML-RPC services. These services, as used on the euc.cx site itself (running an old version of Zope 2) return a random value from a small database of EUCCI track titles and links.

From URL http://euc.cx/, one may call:

  • rsong() - random song (generates the random titles seen throughout the Industrie Toulouse blog)
  • hyprHYPR() - random link in a pre-generated HTML anchor tag.
  • hyprDLUX() - random link in a structure with elements sitename and link.
  • hyprSWNK() - returns a list of structures with elements sitename and link.

A Radio example:

s = ["xmlrpc://euc.cx/"].rsong();;
dialog.notify(s);

And AppleScript:

-- simple script to call hyprDLUX() from euc.cx
-- rsong returns a random EUCCI link as a structure
-- with names 'link' and 'title'.
set this_link to {}
tell application "http://euc.cx/"
	set this_link to call xmlrpc {method name:"hyprDLUX", parameters:{}}
end tell
 
display dialog "EUCCI.hyprDLUX(): " & sitename of this_link & ¬
	" lnk: " & link of this_link buttons {"OK"} default button 1

So why these services? They already exist as DTML Methods on the site. They would be Python Scripts, but the server is a really old version of Zope. So, by existing already, they are automatically callable via XML-RPC. That's what Zope does so well. I think during the coming week, I'll try to find out a way to use Zope's security with XML-RPC style API's (where the username and password are arguments to the procedure call. Which is still a stupid way to go about doing it, if you ask me).