How I create a blog post

To publish a blog I need 2 things, a web server and a machine for me to type the blog. The web server (Apache web server running on a TonidoPlug with external hard disk) is run locally from my house, making it easier to publish content, and to manage it. I use an ordinary laptop which is wired to the LAN, that way I can work on files anywhere on my network using SSHFS as if the file was stored locally on the laptop (running Gentoo).

Creating the blog post

I open a console window and type gg cnb &. This opens an empty gedit document which is automatically timestamped and saved at ~/media/blog. I type the blog content in a customised version of Markdown (called Martile), and with a little help from a script that recognises that the 1st line is a heading and the last line contains a maximum of 5 tags.

When I'm finished spell checking the document and I've read it over, I will save the file.

Note: gg is the go green environment which makes it possible to use alias commands as if they were local to the machine. The cnb alias command is in essence gedit #{%q(~/media/blog/b%s.txt) % Time.now.strftime('%d%m%yT%H%M')}

Publishing the blog post

To publish the blog post I return to the console window and type gg ton acpb. This is a script which uses an SSH remote command to find the most recent file in the ~/media/blog directory. It then parses it using my jrmedia script and converts it to an HTML file and then saves it in the relevant web directory.

The script also publishes a microblog post (containing a link to the blog) to micro.rorbuilder.info/jrblog [rorbuilder.info] as well as my own website at www.jamesrobertson.eu/blog. There's still a few bugs but there is always bugs. I will publish all the code when it has matured enough or I will just publish it if I get around to taking out the hard coded paths and adding a config file.

Final note

I try to write as much of the things myself where I believe a solution should exist. This includes the following projects:

The list goes on including projects Dynarex, Dataisland, and all the other project dependencies which I've written myself. It has taken me over 4 years to have something to show for it yet there is still much to do.

Tags:
Source:
1829hrs.txt
Published:
17-08-2012 18:29