|
From: Wari W. <wa...@ho...> - 2003-02-06 16:41:26
|
Blake Winton wrote: >>Maybe it's because I'm poor at XML, but anyone else agree >> >> >>>on XML, or a pickle? >>> >>> >How are you poor at XML? Is it anything I can help with? > > Writing proper XML, I'm poor at that, until now I can't figure out how to write an XML file using DOM or SAX, you know writing proper XML files like RSS 2.0 without using regexp style escape, the most I got to do is a blosxom style rss dump, and that is not writing proper XML. Parsing XML, another story, looking at python's style of xml parsing from the examples I saw, I can't get to understand how it works, though I can modify code like Mark Pilgrim's rssparser.py to get some data I need, but when it comes to identicle tags like link in channels and link in channels->author (or something like that) I gave up :) I do know what XML is and can parse it by sight, not programmatically (who know I'll change that soon) >>We definitely get more bang for our buck with pickling. >> >> >Agreed, but I've got the developer-bucks to spend on this, >if it's the route we choose to go. > I guess I can learn something is we go XML route :) >>The advantage to using XML is that other non-Python >>processes can manipulate the data. I can't really >>think of other advantages--though it should be noted >>that this is somewhat of a big one. >> >> >Such as a vim process. This was my main reason for suggesting >XML, in fact. > That is the most compelling reason to use XML IMHO, hehe, you can dump the data, then edit the file (provided you keep to XML constraints like escapes and what nots) then get the 'driver' to load the data back. Cool, I like XML already :) >I wanted to go through my list of referrers, and >remove the ones that I really didn't want there, but since the >referrers are pickled, I couldn't easily edit the file (and I >didn't keep a backup, so I lost my referrer information twice. >No big loss, but slightly annoying). Being able to edit >comments with a text-editor is a big plus in my book. > Yeah, but isn't using XML as a native format for, say referer data, slow? I've tried marshal.xml before to store data, and it's painfully slow to load. >We could do this, or write a tool to convert between the >standard format and our format. (I mention this because of >Leslie Orchard's post at: >http://www.decafbad.com/news_archives/000410.phtml >where he specifically mentions the "MT-to-blosxom converter" >as one of the reasons he switched. Being able to switch >back and forth from our format to other people's format is >a huge win for getting users to convert. I've sent him >email asking for more details on his comments system, both >so that we can make it easy for him to convert, and so that >we can get another perspective on how to implement these >things. > It's a standard movabletype dump, here's what it looks like for my birthday entry in http://roughingit.subtlehints.net/ : -------- AUTHOR: wari TITLE: Happy birthday to me :) STATUS: Publish ALLOW COMMENTS: 1 CONVERT BREAKS: 1 ALLOW PINGS: 1 PRIMARY CATEGORY: Python CATEGORY: Python DATE: 02/02/2003 10:16:15 PM ----- BODY: So I'm 30, what do I do on my birthday? Release <a href="http://roughingit.subtlehints.net/pyblosxom">pyblosxom 0.6</a> :) ----- EXTENDED BODY: ----- EXCERPT: ----- KEYWORDS: ----- COMMENT: AUTHOR: Troy EMAIL: tad...@sp... IP: ipaddr URL: http://forestpirate.subtlehints.net DATE: 02/03/2003 01:10:55 AM Happy Birthday Wari. Hope you have a good one. (Or had a good one) ----- COMMENT: AUTHOR: nf0 EMAIL: nf...@10... IP: ipaddr URL: http://www.10500bc.org DATE: 02/03/2003 01:43:17 AM Happy Birthday! ----- COMMENT: AUTHOR: [rux] EMAIL: IP: ipaddr URL: DATE: 02/03/2003 08:19:47 PM happy birthday, dude ... ----- COMMENT: AUTHOR: wari EMAIL: IP: ipaddr URL: http://wari.per.sg/ DATE: 02/03/2003 10:48:53 PM Thanks guys :) ----- COMMENT: AUTHOR: Sam EMAIL: IP: ipaddr URL: http://www.deadman.org/ DATE: 02/04/2003 09:40:31 PM I'd forgotten that we have the same birthday. Happy birthday you old geezer! (I'm only 29!) ----- COMMENT: AUTHOR: dOh EMAIL: IP: ipaddr URL: DATE: 02/04/2003 11:43:59 PM Happy birthday to u... heh heh... congrats, the big 3-O, and a father soon. ----- COMMENT: AUTHOR: wari EMAIL: IP: ipaddr URL: http://wari.per.sg DATE: 02/06/2003 12:03:03 PM Hey Sam, I forgotten about your birthday too :) I'm not that old, 3 decades ain't old yet :) ----- -------- mt2blosxom.py only works on the entries, but not the comments. >Oh, yeah, while I'm here. >I'm subscribed to pyblosxom-devel, pyblosxom-users, and >even pyblosxom-checkins, so you don't need to copy me in >on messages that are going to those addresses, since I'll >get a copy of them if you just send them to the list. > > Sorry 'bout that. |