[microformats-discuss] STRUM, REST, and DETH

Dr. Ernie Prabhakar drernie at opendarwin.org
Tue Oct 11 16:33:53 PDT 2005


Hi all,

On Oct 11, 2005, at 3:15 PM, Dr. Ernie Prabhakar wrote:
> I've stripped the idea down further to something I call DETH: like  
> REST, but more so. :-)
>
> 	DETH = Dictionaries Encoding/Transmitting HTML.

I've created a more robust example, including a hypothetical mapping  
onto Python dictionaries:

http://www.opendarwin.org/~drernie/deth_example2.html

The idea is that as a client I could do something like:
=====
import deth

dict=deth.getDict("http://somesite.com/users/")
dict["firstname"]="Ernie"
dict["lastname"]="Prabhakar"

nextDict=deth.postDict(dict, "http://somesite.com/users/")
=====

And hopefully something just as simple on the server.  It would be  
nice to have a cgi or something that would turn the url-encoded key- 
value pairs into a XOXO 'dl' entry, and simply pass that XHTML  
document over stdin.  My server could then just do:

=====
import deth
import sys
doc=""
for line in sys.stdin:
   doc=doc+line
   if "</html>" in line:
     dict=deth.HTMLtoDict(doc)
     result=processDict(dict) # whatever
     outDoc=deth.dicttoHTML(result)
    sys.stdout.write(outDoc)
    doc=""
=====

Does that perhaps make more sense?

-- Ernie P.

------------
Ernest N. Prabhakar, Ph.D. <drernie at opendarwin.org>
Ex-Physicist, Marketing Weenie, and Dilettante Hacker
Probe-Hacker blog: http://www.opendarwin.org/~drernie/




More information about the microformats-discuss mailing list