Changes between Version 1 and Version 2 of XmlBlog/IrcLogs
- Timestamp:
- Apr 28, 2006, 3:28:31 AM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
XmlBlog/IrcLogs
v1 v2 1 1 = XML Blog Stuff IRC Ramblings = 2 2 3 == The Beginning == 3 4 {{{ 4 5 <nlindblad> anyone using LightPress then? 5 6 <nlindblad> http://lightpress.org/ 6 7 <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 8 10 <nlindblad> sward: what CMS would you use then? 9 11 <sward> nlindblad: I don't :) 10 12 <nlindblad> sward: okey... 11 13 <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 13 17 <nlindblad> ah 14 18 <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 17 23 <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) 21 31 <nlindblad> :P 22 32 <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. 24 38 <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 26 41 <nlindblad> sward: TBH, Gentoo's XML policies are lovely 27 42 <nlindblad> sward: it's so easy to write content for their site … … 29 44 <nlindblad> sward: but the question is then 30 45 <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. 33 54 <nlindblad> yeah 34 55 <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. 38 62 <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 40 65 <nlindblad> <time> is probably crap 41 66 <nlindblad> sward: true … … 44 69 <sward> ISO 45 70 <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 :) 47 73 <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 51 80 <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 53 84 <sward> although I think nice names are better than some crap hash 54 85 <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 56 88 <nlindblad> so vim /postdirectory/somefile 57 89 <nlindblad> would create a new skeleton with empty tags 58 90 <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 60 96 <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 65 106 <nlindblad> sward: what tags would you use then? 66 107 <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 68 110 <sward> you'd probably do better generating an index 69 111 <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 75 123 <nlindblad> http://pastebin.com/683281 76 124 <nlindblad> yes, alot of tags 77 125 <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 81 133 <nlindblad> true 82 * h|barbobot rips the aristocrats83 134 <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 86 139 <nlindblad> yeah 87 140 <nlindblad> http://pastebin.com/683287 88 141 <nlindblad> now all data intended to be auto-added is in the <meta> tag 89 142 <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...) 92 148 <nlindblad> okey 93 149 <nlindblad> I will … … 95 151 <nlindblad> but I think http://pastebin.com/683304 is a good start 96 152 <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 98 155 <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 101 160 <nlindblad> sward: yeah 102 161 <sward> XSLT transform to blogger API XML-RPC... HTTP POST … … 104 163 <nlindblad> when the basic XML is completed and the parsing is also done 105 164 <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 107 167 <resiak> I'm sure that one exists 108 168 <sward> if not, the various XML libs are a good way there