Re: metaweblog again.

Kimbro Staken <[email protected]> Sun, 2 Nov 2003 21:01:34 -0700
Newsgroups gmane.comp.web.syncato.general
Message-ID <[email protected]>
I changed categories to just use title rather then id for all 
identification.

On Nov 2, 2003, at 8:47 PM, Kimbro Staken wrote:

> Ahh, right. I forgot about that. I had a note for that bug, but I'd 
> been looking at it and I couldn't remember exactly what I meant by 
> what I wrote. Now it makes sense. I'll try to fix it before I release 
> 0.6 so that categories will actually work right.
>
> On Nov 2, 2003, at 9:52 AM, darryl wrote:
>
>> hmm,
>>
>> what my script yields is something like this:
>>
>> <category dbxml:id="113" id="607">
>> <title>XML</title>
>> <description>Stuff about XML</description>
>> <pubDate seconds="1067754035.05">2003-11-02T00:20:35-07:00</pubDate>
>> </category>
>>
>>
>> The templates rely on the id attribute being set to something like
>> 'XML' rather than the autogenerated numerical one.
>>
>>
>> -darryl
>>
>>> That should work, that's all addCategory.py does anyway.
>>>
>>> On Nov 1, 2003, at 8:28 PM, darryl wrote:
>>>
>>>>>>
>>>>>
>>>> Just wondering if you can 'POST' categories (my terminology is not 
>>>> good)
>>>> like below:
>>>> --------------------------------------------------------------
>>>> import httplib
>>>> import libxml2
>>>> import sys
>>>> entry = """<category id="XML">
>>>>   <title>XML</title>
>>>>  <description>Stuff about XML</description>
>>>> </category>
>>>> """
>>>>
>>>> def runRequest(method,url,body=None):
>>>>    conn = httplib.HTTPConnection("localhost")
>>>>    headers = {"Content-type": "text/xml"}
>>>>    conn.request(method, url, body, headers)
>>>>
>>>>    result = conn.getresponse()
>>>>
>>>>    if (result.status == 401):
>>>>        token = "Basic " + encodestring(USERNAME + ":" + 
>>>> PASSWORD).strip()
>>>>        headers = {"Content-type": "text/xml", "Authorization": 
>>>> token}
>>>>        conn.close()
>>>>
>>>>        conn.request(method,url,body,headers)
>>>>
>>>>        result = conn.getresponse()
>>>>
>>>>    return result
>>>> baseURL = "htp://localhost/WK/blog/"
>>>> result = runRequest("POST",baseURL,entry)
>>>> print result.status, result.reason
>>>>
>>>> -------------------------------------------------------------
>>>
>>
>>
>>
>>
>> -------------------------------------------------------
>> This SF.net email is sponsored by: SF.net Giveback Program.
>> Does SourceForge.net help you be more productive?  Does it
>> help you create better code?   SHARE THE LOVE, and help us help
>> YOU!  Click Here: http://sourceforge.net/donate/
>> _______________________________________________
>> Syncato-general mailing list
>> Syncato-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>> https://lists.sourceforge.net/lists/listinfo/syncato-general
>>
>>
> Kimbro Staken
> Software, Consulting and Writing http://www.xmldatabases.org/
> Apache Xindice native XML database http://xml.apache.org/xindice
> XML:DB Initiative http://www.xmldb.org
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive?  Does it
> help you create better code?   SHARE THE LOVE, and help us help
> YOU!  Click Here: http://sourceforge.net/donate/
> _______________________________________________
> Syncato-general mailing list
> Syncato-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/syncato-general
>
>
Kimbro Staken
Software, Consulting and Writing http://www.xmldatabases.org/
Apache Xindice native XML database http://xml.apache.org/xindice
XML:DB Initiative http://www.xmldb.org



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/