![]() | Ned Batchelder : Blog | Code | Text | Site Xuff, px, bx, etc. » Home : Site |
Created 28 November 2005, last updated 16 January 2008 As of January 2008, half of this page is out-of-date. The input files are the same, but the process for turning them into HTML is completely different. See Permalinks, Gravatars, and Django for details. I create this site with custom tools. They've grown organically over time. The end result is idiosyncratic, and I wouldn't recommend them to anyone, but they work for me. Briefly, my requirements were:
I've used and grown these tools over the last four years. Things I like about them:
Things I don't like about them:
Input files: px, bx, etcMy input files are all XML, in a handful of custom dialects. Pages start life as .px files; they look like this: <?xml version='1.0' encoding='utf-8'?> The dialect borrows liberally from XHTML, since that is a natural tagset to use when creating pages. For semantic constructs (such as the edit history of the page), I created my own tags. Each .px file eventually becomes a .html page on the site. Blog entries are created in .bx files. Here's a complete file: <?xml version='1.0' encoding='utf-8'?> The .bx files are converted into .px files in various ways to become pages on the site. Processing: XuffThe conversion of files is done with XSLT transforms, run by a tool called Xuff. It's an XML script engine. It knows how to perform tasks such as copying trees of files, collecting together a number of files into one XML file, running XSLT transforms over sets of files, splitting an XML file into a number of files, uploading files via FTP, and so on. For example, here is a shortened snippet of all.xuff: <treefile out='temp/all-blog.xml'> This code:
Whenever I change a file comprising my site, I run a Xuff file to create the entire site as HTML files and upload the changed files to my host. There's no attempt to generate only part of the site. This isn't fast (it takes about two minutes on my computer), but it is simple. DownloadIf you'd like to take a look at the tools or try them out, you can download a snapshot of a subset of my site. To use it:
If you use "python xuff.py tch.xuff" instead, it builds the files for the real site and uploads them to my host (except it won't upload because it's been neutered). The snapshot zip file only includes a small subset of the blog entries (you'll notice they all start with 'a'), and some other large files are omitted, but the site should basically work. See also | |
Comments
hello. Im regarding your page. Thankyou for the comments.
Add a comment: