[microformats-discuss] STRUM, REST, and DETH

Kevin Marks kmarks at technorati.com
Tue Oct 11 16:37:06 PDT 2005


Ernie, did you look at xoxo.py yet?


On Oct 11, 2005, at 4:33 PM, Dr. Ernie Prabhakar wrote:

> 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/
>
>
> _______________________________________________
> microformats-discuss mailing list
> microformats-discuss at microformats.org
> http://microformats.org/mailman/listinfo/microformats-discuss



More information about the microformats-discuss mailing list