By Phillip Pearson
Tuesday, June 25, 2002
CityDesk, by Fog Creek Software, isn't exactly a blogging tool, but I've seen a few blogs now that use it. And, of course, I had to include it here because I'm using it to edit the site ;-)
CityDesk uses an Access (Jet) database to store its data. If you rename the .cty file that stores your website to .mdb, you can open it in Access. Joel Spolsky mentions this in his "Inside CityDesk" article. The database format isn't fixed, but you can expect to see certain things staying reasonably constant.
This suggests two possible ways we can exchange data with CityDesk:
Direct access to data
The use of a common data format (on Windows, at least) means we can just open up the database and pull out the data. Putting data back in might be a little hazardous, as we don't know what other things CityDesk does when it publishes an article. It wouldn't be hard to break something.
The useful tables seem to be:
- tblStructure: This stores the tree structure of the files in a CityDesk site.
- tblArticle: This stores the text of all the articles in a site.
- tblFiles: All non-"article" files.
- tblTemplate: Templates.
- tblVariables: Site-specific parameters like the site name and the sub-heading.
Some information that may be useful in developing a reader:
- Getting database schema using ADO.net [dotnetextreme]
As with the standard methods of moving data into and out of Movable Type and Blogger, you can get your data out of CityDesk by writing an XML template with a script that will suck out all of your posts and present them in some easily understood form.
Some standard export formats to start with:
- Movable Type import format
- Radio UserLand XML import format
- Note from Joel on how to generate an RSS (XML summary) feed from a site