Changes between Initial Version and Version 1 of XmlBlog/IrcLogs


Ignore:
Timestamp:
Apr 26, 2006, 10:46:32 PM (19 years ago)
Author:
simon
Comment:

initial chat

Legend:

Unmodified
Added
Removed
Modified
  • XmlBlog/IrcLogs

    v1 v1  
     1= XML Blog Stuff IRC Ramblings =
     2
     3{{{
     4<nlindblad> anyone using LightPress then?
     5<nlindblad> http://lightpress.org/
     6<nlindblad> looks interesting
     7<sward> nlindblad: It's PHP (nevermind a plugin for another PHP app), I lost any interest I may have had in it
     8<nlindblad> sward: what CMS would you use then?
     9<sward> nlindblad: I don't :)
     10<nlindblad> sward: okey...
     11<nlindblad> sward: what would you recommend then
     12<sward> nlindblad: I wouldn't, I'm not a big fan of CMSes, at least not in the "dynamic page generation from static content in a data store which only looks dynamic because it's updated often" sense
     13<nlindblad> ah
     14<nlindblad> sward: true
     15<nlindblad> sward: I'm really after something I can update without having to use vim all the time
     16<sward> nlindblad: and vim's a problem because?  I find it better than a textarea
     17<nlindblad> sward: hmm
     18<h|barbobot!n=h@pdpc/supporter/sustaining/h-barbobot> vim is no problem.
     19<nlindblad> sward: I'll just do a neat page then and use vim and shut up, etc.
     20<sward> nlindblad: Not that I have a website to manage.. I mean, the one page I have up hasn't changed for 3 years, except for updates to my CV and text ever so slightly modified to be past tense (I am studying.. -. I studied, blah)
     21<nlindblad> :P
     22<StarScream> i really should make a website for my self some day
     23<sward> nlindblad: For anything more complex, I'd probably look into an XML-based system, but the resulting pages are generated by me (or automagically as I add content) (probably XSL transformations), rather than having the content pulled from a DB and generating pages dynamically.
     24<Dave2> XML!
     25<sward> nlindblad: Even with caching, dynamic generation in that way seems a bad method
     26<nlindblad> sward: TBH, Gentoo's XML policies are lovely
     27<nlindblad> sward: it's so easy to write content for their site
     28<nlindblad> sward: XML is neat
     29<nlindblad> sward: but the question is then
     30<nlindblad> sward: how would one go on about doing it properly
     31<nlindblad> sward: my idea is to make separate XML-documents for each "post" then merge them into a static page using Python in chronological order after their <date> tags
     32<sward> nlindblad: For journal type stuff, yeah, possibly.  You may not even need XML documents for each post, just plain text which gets included into XML, though that doesn't help with how you get the date.  I don't think file modification times are sufficient.
     33<nlindblad> yeah
     34<nlindblad> http://pastebin.com/683246
     35<sward> Heh, just had a thought.. changelog format is essentially the same as a journal, and vim has nice macros to manipulate changelogs
     36<h|barbobot!n=h@pdpc/supporter/sustaining/h-barbobot> vim uber alles!
     37<sward> nlindblad: In your example post, too much crap.  You want it simple.
     38<nlindblad> well
     39<sward> nlindblad: It can be an XML fragment, rather than a complete XML document, so you can probably leave out the header crap
     40<nlindblad> <time> is probably crap
     41<nlindblad> sward: true
     42<nlindblad> http://pastebin.com/683252
     43<sward> nlindblad: Yeah, make date + time = <date>, and in ISP format
     44<sward> ISO
     45<nlindblad> yeah
     46<sward> nlindblad: If you want to separate them, it's designed to be easy to process, so... process it :)
     47<nlindblad> http://pastebin.com/683255 then
     48<nlindblad> the point of having <title> is for automatically generating the navigation
     49<nlindblad> and to have a real title that is a bit bigger than the content
     50<nlindblad> sward: the idea is that you shouldn't have to care about what you name the files
     51<sward> Agreed
     52<nlindblad> sward: as long as you put all the posts in a pre-defined directory the Python-script should look at the date and properly generate
     53<sward> although I think nice names are better than some crap hash
     54<nlindblad> yeah
     55<nlindblad> the ideal thing would be to have a vim-skeleton defined for the post directory
     56<nlindblad> so vim /postdirectory/somefile
     57<nlindblad> would create a new skeleton with empty tags
     58<nlindblad> (if somefile doesn't exist)
     59<sward> also, if your blog links to "full" versions of posts where you can add comments and such, then the server should serve it as http://host.domain.tld/blog/nice_name instead of crap like http://host.domain.tld/blog/2006/04/21/<number-assigned-to-the-current-phase-of-the-moons-of-jupiter>/$(cat /dev/urandom | base64encoder)/shit_name
     60<nlindblad> sward: hmm
     61<sward> date, long title, author.. all meta-data rather than URI material, though that does bring the "how do you ensure each name is unique?" question
     62<nlindblad> sward: I don't intend to keep the directory with posts in the htdocs
     63<nlindblad> sward: so what you're saying makes perfect sense, generate standalone pages and make nice URIs
     64<sward> I wouldn't, but you want to be able to generate reasonable output files
     65<nlindblad> sward: what tags would you use then?
     66<nlindblad> to be exact
     67<sward> not sure.. within the confines of XML, you've about minimised the amount of faff you need to put in as much as you can
     68<sward> you'd probably do better generating an index
     69<astopy> putting the date in the URI is a good idea
     70<sward> then you can setup something to "add a post", and it'll fill in the date for you, so you can get rid of that
     71<nlindblad> sward: yeah, preferably a small Python-script simply taking input
     72<sward> once the post is in the index file.. it won't be overwritten (unless you tell "add a post" to), so existing dates won't get changed to the current date
     73<nlindblad> sward: but somewhere along the road I think I should be a bit different to other traditional blogs
     74<sward> I know someone who did a set of XML templates for his site at one point, maybe I'll steal from him
     75<nlindblad> http://pastebin.com/683281
     76<nlindblad> yes, alot of tags
     77<nlindblad> but the metadata helps you create some cool stuff out of it
     78<sward> it might be useful to separate metadata from the content.. most of that I'd want to auto generate
     79<nlindblad> sward: you mean to put "easy to generate" stuff in a <metadata> tag?
     80<sward> for example, if I wanted to create an id (reference) for a post.. I'd process the title into some canonical form which is valid for ids
     81<nlindblad> true
     82* h|barbobot rips the aristocrats
     83<nlindblad> the thing is
     84<sward> name can be obtained from your user name, e.g. like mutt fills in 'Simon Edward Ward' in my From: address
     85<nlindblad> I must settle for a DTD before I can continue doing real code
     86<nlindblad> yeah
     87<nlindblad> http://pastebin.com/683287
     88<nlindblad> now all data intended to be auto-added is in the <meta> tag
     89<nlindblad> *are
     90<sward> nlindblad: I'll start putting stuff up at http://projects.bleah.co.uk/misc/wiki/XmlBlog .. I'm actually interested in seeing this work
     91<sward> nlindblad: Feel free to edit the page and add new sub-pages (assuming I let anonymous do that...)
     92<nlindblad> okey
     93<nlindblad> I will
     94<nlindblad> I'll dig through my XML books later on
     95<nlindblad> but I think http://pastebin.com/683304 is a good start
     96<nlindblad> if I've understood DTD a bit
     97<sward> balls, the person who I thought did a pure XML-based template system didn't.. he used Smarty
     98<nlindblad> :(
     99<nlindblad> sward: but that is all the DTD required to syntax-check a post
     100<sward> It should be easy enough, given this XML system, to write stuff to post using the blogger API too
     101<nlindblad> sward: yeah
     102<sward> XSLT transform to blogger API XML-RPC... HTTP POST
     103<sward> well, probably not that simple, but it was an idea :)
     104<nlindblad> when the basic XML is completed and the parsing is also done
     105<nlindblad> extending will be very easy
     106* nlindblad wonders whether a XML-validator in Python would require hours and hours of work
     107<resiak> I'm sure that one exists
     108<sward> if not, the various XML libs are a good way there
     109<nlindblad> I've done some simple thing with SAX
     110* sward -> pub -> home
     111<nlindblad> http://pastebin.com/683364
     112<nlindblad> where to go on from here?
     113<nlindblad> the idea is to make the parsed data ready for output
     114}}}