DrPetter's homepage



SPCMS



This is the content management system I used for making this site. It was written in a few days as a kind of reaction to a course on web programming that I started taking earlier this year. The CMS:s presented seemed very complex and over-engineered for the kind of site I had in mind, but I liked the general idea of centralized design/templates and not having to manually upload every new file produced.
So I just figured I could try making something of my own that was tailored to what I'd need.

The whole application is about 1200 lines of C code (with the usual bits of loose ++ thrown in for good measure, i.e. I can't be bothered to stay within strict C syntax). It compiles into a 24 kB command-line application that is used to process a collection of "content pages" which take the form of text files with various kinds of special tags and macros in them. The output is a bunch of regular html files that make up the actual site. Images, thumbnails and files are stored in separate directories and all relevant files are monitored for changes so that new and modified files can be automatically uploaded through sftp on demand.

Adding a new page to the site is a matter of preparing any images involved and then writing the content (with a few macro tags in it), followed by hitting 'g' in the app to generate html, and lastly 'u' to upload.

Here's a shot of what this very page looks like, excluding the body text:



I provide a download for the adventurous who want to try using it or just pour over the code a bit for some mild thrills (I'd probably advise against it).




spcms.zip (110 kB)
Beware.



Back to all projects


Page updated on March 25   2010