Changes between Version 1 and Version 2 of XmlBlog/IrcLogs


Ignore:
Timestamp:
Apr 28, 2006, 3:28:31 AM (19 years ago)
Author:
simon
Comment:

Reformatted

Legend:

Unmodified
Added
Removed
Modified
  • XmlBlog/IrcLogs

    v1 v2  
    11= XML Blog Stuff IRC Ramblings =
    22
     3== The Beginning ==
    34{{{
    45<nlindblad> anyone using LightPress then?
    56<nlindblad> http://lightpress.org/
    67<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<sward> nlindblad: It's PHP (nevermind a plugin for another PHP app), I
     9        lost any interest I may have had in it
    810<nlindblad> sward: what CMS would you use then?
    911<sward> nlindblad: I don't :)
    1012<nlindblad> sward: okey...
    1113<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
     14<sward> nlindblad: I wouldn't, I'm not a big fan of CMSes, at least not
     15        in the "dynamic page generation from static content in a data
     16        store which only looks dynamic because it's updated often" sense
    1317<nlindblad> ah
    1418<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
     19<nlindblad> sward: I'm really after something I can update without
     20            having to use vim all the time
     21<sward> nlindblad: and vim's a problem because?  I find it better than a
     22        textarea
    1723<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)
     24<h|barbobot> vim is no problem.
     25<nlindblad> sward: I'll just do a neat page then and use vim and shut
     26            up, etc.
     27<sward> nlindblad: Not that I have a website to manage.. I mean, the one
     28        page I have up hasn't changed for 3 years, except for updates to
     29        my CV and text ever so slightly modified to be past tense (I am
     30        studying.. -.  I studied, blah)
    2131<nlindblad> :P
    2232<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.
     33<sward> nlindblad: For anything more complex, I'd probably look into an
     34        XML-based system, but the resulting pages are generated by me
     35        (or automagically as I add content) (probably XSL
     36        transformations), rather than having the content pulled from a
     37        DB and generating pages dynamically.
    2438<Dave2> XML!
    25 <sward> nlindblad: Even with caching, dynamic generation in that way seems a bad method
     39<sward> nlindblad: Even with caching, dynamic generation in that way
     40        seems a bad method
    2641<nlindblad> sward: TBH, Gentoo's XML policies are lovely
    2742<nlindblad> sward: it's so easy to write content for their site
     
    2944<nlindblad> sward: but the question is then
    3045<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.
     46<nlindblad> sward: my idea is to make separate XML-documents for each
     47            "post" then merge them into a static page using Python in
     48            chronological order after their <date> tags
     49<sward> nlindblad: For journal type stuff, yeah, possibly.  You may not
     50        even need XML documents for each post, just plain text which
     51        gets included into XML, though that doesn't help with how you
     52        get the date.  I don't think file modification times are
     53        sufficient.
    3354<nlindblad> yeah
    3455<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.
     56<sward> Heh, just had a thought.. changelog format is essentially the
     57        same as a journal, and vim has nice macros to manipulate
     58        changelogs
     59<h|barbobot> vim uber alles!
     60<sward> nlindblad: In your example post, too much crap.  You want it
     61        simple.
    3862<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
     63<sward> nlindblad: It can be an XML fragment, rather than a complete XML
     64        document, so you can probably leave out the header crap
    4065<nlindblad> <time> is probably crap
    4166<nlindblad> sward: true
     
    4469<sward> ISO
    4570<nlindblad> yeah
    46 <sward> nlindblad: If you want to separate them, it's designed to be easy to process, so... process it :)
     71<sward> nlindblad: If you want to separate them, it's designed to be
     72        easy to process, so... process it :)
    4773<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
     74<nlindblad> the point of having <title> is for automatically generating
     75            the navigation
     76<nlindblad> and to have a real title that is a bit bigger than the
     77            content
     78<nlindblad> sward: the idea is that you shouldn't have to care about
     79            what you name the files
    5180<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
     81<nlindblad> sward: as long as you put all the posts in a pre-defined
     82            directory the Python-script should look at the date and
     83            properly generate
    5384<sward> although I think nice names are better than some crap hash
    5485<nlindblad> yeah
    55 <nlindblad> the ideal thing would be to have a vim-skeleton defined for the post directory
     86<nlindblad> the ideal thing would be to have a vim-skeleton defined for
     87            the post directory
    5688<nlindblad> so vim /postdirectory/somefile
    5789<nlindblad> would create a new skeleton with empty tags
    5890<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
     91<sward> also, if your blog links to "full" versions of posts where you
     92        can add comments and such, then the server should serve it as
     93        http://host.domain.tld/blog/nice_name instead of crap like
     94        http://host.domain.tld/blog/2006/04/21/<number-assigned-to-the-current-phase-of-the-moons-of-jupiter>/$(cat
     95        /dev/urandom | base64encoder)/shit_name
    6096<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
     97<sward> date, long title, author.. all meta-data rather than URI
     98        material, though that does bring the "how do you ensure each
     99        name is unique?" question
     100<nlindblad> sward: I don't intend to keep the directory with posts in
     101            the htdocs
     102<nlindblad> sward: so what you're saying makes perfect sense, generate
     103            standalone pages and make nice URIs
     104<sward> I wouldn't, but you want to be able to generate reasonable
     105        output files
    65106<nlindblad> sward: what tags would you use then?
    66107<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
     108<sward> not sure.. within the confines of XML, you've about minimised
     109        the amount of faff you need to put in as much as you can
    68110<sward> you'd probably do better generating an index
    69111<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
     112<sward> then you can setup something to "add a post", and it'll fill in
     113        the date for you, so you can get rid of that
     114<nlindblad> sward: yeah, preferably a small Python-script simply taking
     115            input
     116<sward> once the post is in the index file.. it won't be overwritten
     117        (unless you tell "add a post" to), so existing dates won't get
     118        changed to the current date
     119<nlindblad> sward: but somewhere along the road I think I should be a
     120            bit different to other traditional blogs
     121<sward> I know someone who did a set of XML templates for his site at
     122        one point, maybe I'll steal from him
    75123<nlindblad> http://pastebin.com/683281
    76124<nlindblad> yes, alot of tags
    77125<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
     126<sward> it might be useful to separate metadata from the content.. most
     127        of that I'd want to auto generate
     128<nlindblad> sward: you mean to put "easy to generate" stuff in a
     129            <metadata> tag?
     130<sward> for example, if I wanted to create an id (reference) for a
     131        post.. I'd process the title into some canonical form which is
     132        valid for ids
    81133<nlindblad> true
    82 * h|barbobot rips the aristocrats
    83134<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
     135<sward> name can be obtained from your user name, e.g. like mutt fills
     136        in 'Simon Edward Ward' in my From: address
     137<nlindblad> I must settle for a DTD before I can continue doing real
     138            code
    86139<nlindblad> yeah
    87140<nlindblad> http://pastebin.com/683287
    88141<nlindblad> now all data intended to be auto-added is in the <meta> tag
    89142<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...)
     143<sward> nlindblad: I'll start putting stuff up at
     144        http://projects.bleah.co.uk/misc/wiki/XmlBlog .. I'm actually
     145        interested in seeing this work
     146<sward> nlindblad: Feel free to edit the page and add new sub-pages
     147        (assuming I let anonymous do that...)
    92148<nlindblad> okey
    93149<nlindblad> I will
     
    95151<nlindblad> but I think http://pastebin.com/683304 is a good start
    96152<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
     153<sward> balls, the person who I thought did a pure XML-based template
     154        system didn't.. he used Smarty
    98155<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
     156<nlindblad> sward: but that is all the DTD required to syntax-check a
     157            post
     158<sward> It should be easy enough, given this XML system, to write stuff
     159        to post using the blogger API too
    101160<nlindblad> sward: yeah
    102161<sward> XSLT transform to blogger API XML-RPC... HTTP POST
     
    104163<nlindblad> when the basic XML is completed and the parsing is also done
    105164<nlindblad> extending will be very easy
    106 * nlindblad wonders whether a XML-validator in Python would require hours and hours of work
     165* nlindblad wonders whether a XML-validator in Python would require
     166   hours and hours of work
    107167<resiak> I'm sure that one exists
    108168<sward> if not, the various XML libs are a good way there