WordPress to Sphinx?

It has been a little while since I last posted something. So this post is a little bit of a progress update. I am still investigating moving away from WordPress to a static site using Sphinx. It turns out there is quite a bit to research and learn about. Whilst the transition of this website into a static form might still be some way off I am finding Sphinx very useful for my own notes and research.

Using Sphinx for notes is leading me to discover more of the tools I need for the migration. At the same time however I am wondering about using the right tool for the right job.

To make Sphinx output HTML is very easy. It is also simple to create a hierarchy of documents linked together. What requires more effort however is turning it into a blog style site with dated posts, tags categories etc. There is an extenstion ABlog which adds the required features but at the expense (or so it appears) of taking over the rest of the Sphinx installation. Other options are available but the communities behind them do not appear as active as I would like when planning a big site migration.

This has had me wondering about Pelican again. It is another static site generator geared towards the blog style and allows the importing of WP sites. But again do I risk loosing what I like about Sphinx just to have a blog like tool. I already have a blog like tool, it's called WordPress.

I have also been considering comments. A static site by default does not allow comments. Comments need to be added using an external plugin/service. This might come at an additional cost or loss of control over such comments. Neither option is ideal.

But what is it that I don't like about WordPress at the moment? A few things. I am not a fan of the new editor. I grew up hand coding html and css files. WordPress is good if you don't want to have such fine grained control over the look and feel of the site. I want to have the control to format the content the way I want and to keep it that way. I have not always been able to do this as I have changed WordPress templates over the years to benefit from the additional features that keep being added. Each new template has tweaked the layout in various ways that it has broken the flow/style of my content. For text heavy posts this isn't a problem. But I have tried to write guides and this has posed a problem. Having to go back and ensure that it still looks right is a pain.

The next thing I am not a fan of is the Gutenberg editor. I am not a fan of it. Just trying to type a long post like this I am finding little things that I don't like. It's better than it was but it still isn't as seamless to me as the old editor when it comes to structuring content that might include images, tables etc.

My current thoughts at time of writing is this. Why not have the best of both worlds? I can easily create static content and host it alongside WordPress. The static content I am more interesting in managing offline with Git. As I make changes to it I can push the changes up to the site without affecting the WordPress install.

Such a set up would allow me to still announce new content using WordPress and simply link over to the static portion of the site. At the same time this allows the static site to refer back to the WordPress site as a point where comments can be made. It solves the problem of how to have comments on a static site and still allows me full control over the comments themselves.

There is another hidden bonus in that by not having to export the current post archive to another platform I can save myself a great deal of time. There is still plenty more thinking to be done on this matter but I think I am getting near to a solution.


It's that time of year again when I look back over the goals I set myself over the previous year and decide on some new ones for the year ahead.

What I intended to do in 2015:
  • Contribute to some open source projects – I only contributed a single bug report. The only open-source projects I contributed to were my own. Needs more work. Failure.
  • Put more time into electronics projects (Raspberry Pi/Wireless Sensor System) - I have been working on my Wireless Rat Trap Notification System and experimenting with a small OLED display. A variable dummy load is waiting to be built. Success.
  • Tackle the rodent menace in the loft - All the insulation was removed, the holes plugged with wire wool and expanding foam. Re-insulated and as far as I know still rodent free. Success.
  • Clear out Garage – I did clear out the garage but filled it with bags of old loft insulation whilst tackling the rodent menace. Still need to get rid of the stuff. Partial Success.
  • Buy a new Android Tablet – I bought a Pixel C, a vast improvement. Success.
  • Write an android application for my tablet/phone – Didn't get around to to it. Failure.
  • Build a new PC – I am still waiting to find a new case I like and instead spent the money on a Tablet. Failure.
  • Repave Back Yard – Main paved area complete. Needs the edges finishing off and a step putting in. Partial Success.
  • Buy a new kitchen bin – Still got the old one. Failure.
  • Cook a good Lamb Pathia – Haven't had another attempt. Failure.

2015 was another mixed year. Plenty of successes, but too many failures. On the positive side the successes were in bigger/more important projects. The failures are things that can be addressed in the future.

What I aim to do in 2016:
  • Contribute to some open source projects – Other than my own this time.
  • Put more time into electronics projects – More experiments, more fun.
  • Clear out Garage – Time for another attempt.
  • Write an android application for my tablet/phone – I have an idea for something simple.
  • Build a new PC – Current systems are around 7 years old.
  • Do something useful with a virtual machine.
  • Finish Back Yard – A little bit of finishing off from 2015.
  • Buy a new kitchen bin – I still need one that matches.
  • Cook a good Lamb Pathia from scratch – I like a good curry.
  • Eat more fruit and veg – Might have long term benefits.
  • Perform more off-site data backups.
  • Read more books – Didn't get through many in 2015.

2016 has fewer big projects, so hopefully I will have more time to tackle my list. The three I need to get done are the Garage Clearout, Finishing the Back Yard and building a new PC. All should be achieveble and it will be a bad year indeed if I can't manage them.

New Projects

This month I have started a couple of new projects. It began as one but soon split. The primary project was to make use of a 128x64 I2C OLED display. It has been sitting on the side for a few months after an impulse purchase. It soon became apparent that I needed a way to generate static images for the screen. Although there were programs out there that would convert a bitmap image into the hex code I needed, many were for Windows. So I decided to have a go at converting it myself.

So new to my GitHub repo are:
DN2015-001 – An interface for the SSD1306 OLED Display Driver
DN2015-002 – A bitmap to hex converter for use wwith DN2015-001

Both projects are under development at the moment. How much they develop will depend on how my experimentation with the OLED display goes.

Damn You ISR!

I am sat here on a Sunday evening trying to debug embedded C/C++. For the most part all has been going well and the code has been behaving as expected. I have however run into one of my least favourite problems, the interrupt service routine (ISR). I have a couple of ISR's and they are presenting an unexpected start-up condition. The flow of the main body of the code is fine. I just can't understand why I am getting the current output.

All these problems take me back to a traffic light program I wrote at University. That worked fine for most of the sequence only to be tripped up by an ISR along the way and ending up in a stuck state. Not what you want from a set of traffic lights, especially if you find yourself stuck in the queue behind the red light.
Luckily there wasn't a green light & green man situation with the pedestrians finding themselves in the role of Frogger.

Only one solution for this situation; single malt.

Aims For 2015

Time for a look back at what I intended to do last year.

  • Contribute to some open source projects – Failed Completely.
  • Put more time into electronics projects (Raspberry Pi/Wireless Sensor System). - Work continues, some code committed to GitHub.
  • Get curtains for lounge – Done, it looks more like a home.
  • Clear out Garage (again) – Some progress but it keeps filling up.
  • Write an android application for my tablet/phone – Failed, never even thought about it.
  • Pay off student loan – Done, mortgage is the next big one.
  • Carpet master bedroom – Failed, sticking to laminate flooring.
  • Build a Gaming PC and/or Steam Box – Failed, didn't have the games to justify building.
  • Repave Back Yard – Failed, never even started.
  • Use a Linux desktop environment other than Gnome 3 for at least a month – Failed, LXQt was on the list but wasn't in the Fedora Repo. It is now.

So 2014 was mixed, some things achieved some not. Too many not unfortunately.
Time to see if I can complete some of last years goals in 2015.

  • Contribute to some open source projects
  • Put more time into electronics projects (Raspberry Pi/Wireless Sensor System)
  • Clear out Garage (This time I mean it)
  • Write an android application for my tablet/phone
  • Build a new PC – A couple are approaching 6 years old.
  • Buy a new Android Tablet – My Nexus 7 (2012) is starting to show its age.
  • Repave Back Yard – It would be nice to have a BBQ surface.
  • Tackle the rodent menace in the loft – They are back again 🙁
  • Buy a new kitchen bin – I need one that matches the rest of it.
  • Cook a good Lamb Pathia – Previous attempt needs significant improvement.

Another to do list, but as before it will be a good year if I can cross a few of them off.

New Theme Time

I have been using the same theme for this site for many years now. Over that time WordPress, which powers the site, has undergone many changes and improvements. In that time the way the WordPress code combines with the theme has changed. This has resulted in my aging theme containing legacy code whilst at the same time not supporting some newer features. I had in the past updated the theme adding in new changes where possible but I think now is the time for a radical change. I'm throwing away the old design and starting again with the twentyfourteen theme as a base. There are design elements which I had been working on with the old theme which I will port across. This approach will hopefully mean a more complete and stable theme for years to come. In the short term there will be things that need adjusting so it's likely to be a little while before the site takes on its final form.

Aims for 2014

Time for a look back at what I intended to do last year.

  • Read an ebook on my Kindle Paper-white. - I have managed to read several and it's in regular use.
  • Contribute to some open source projects. - Failed
  • Continue to develop my wireless sensor system. - Mostly failed, a little progress made but not much.
  • Buy a new soldering iron/station. - I have an ERSA Icon Nano
  • Decorate and carpet my lounge. - Success - It now looks lived in.Still needs curtains.
  • Document more of my projects on this website. - Mostly failed, a few notes were uploaded but not much else.
  • Use my Raspberry Pi for something interesting. - Barely looked at it.
  • Clear clutter out of my garage. - Cleared once then got full again.
  • Finish networking between lounge and bedroom. - Completed as part of decorating.
  • Write an android application for my tablet or phone. - I wrote a calculator script for use at work but it's in html rather than an app.

So 2013 was mixed, some things achieved some not.
Time to see if I can complete some of last years goals in 2014.

  • Contribute to some open source projects.
  • Put more time into electronics projects (Raspberry Pi/Wireless Sensor System).
  • Get curtains for lounge.
  • Clear out Garage (again).
  • Write an android application for my tablet/phone
  • Pay off student loan.
  • Carpet master bedroom.
  • Build a Gaming PC and/or Steam Box
  • Repave Back Yard
  • Use a Linux desktop environment other than Gnome 3 for at least a month

Another to do list, but as before it will be a good year if I can cross a few of them off.

Bang!, Jug Time

I awoke this morning not looking forward to the busy day that was waiting for me at work. Imagine how I felt when upon pushing the button to start the electric shower I was greeted with a Bang rather than the cascade of hot water. I was less than impressed at the lack of water, especially as I was already behind schedule. I grabbed the measuring jug from the kitchen and scooped water out of the sink and dumped it over my head whilst standing in the bath. I reached work less than ready to start the day.

Researching showers it became apparent that I might just be lucky on replacement options. So after stocking up on advice from my colleagues I ventured to a DIY store to part with some money. Trying to fit a shower in a small bathroom at the end of the hard day can hardly be called fun. I was driven on by the desire for a shower to ease my aches and pains. Two hours of drilling, cutting, wiring, sealing, compressing later I had a box on the wall with water and power going in and a hose coming out. The moment of truth, I flipped the breaker, it  stayed on. I pulled the isolation switch cord, it lit and so did the power indicator on the box. I turned the box to cold, cold water began to spring forth from the shower head. Turning the box to hot, a few seconds wait, warm water began to emerge. Success, my first plumbing job and it has worked. No leaks, no power tripping or electrocution.

It may have been a long day but just the knowledge that a hot shower awaits me in the morning means I can relax and have a restful nights sleep.

Fan Repair

Since moving into my house I have been suffering the noisy bathroom extractor fan. It has been on the to do list of DIY jobs but never seemed to reach the top. Yesterday however the sound of the fan changed slightly during spin down and I decided it was time to investigate. What you should do is turn off the mains power to make it safe before you start opening it up. I had the washing machine on at the time and not knowing which circuit it was on decided to take my chances. Upon removing the cover and getting covered in what can only be assumed to be 20 years worth of bathroom dust I noticed the problem. The centrifugal fan had far too much movement on its motor mount or rather the motor itself was loose on its mountings. Removing the fan from the ceiling and peering in through the non-return flaps I found the motor mounting screws. A good few turns to each screw indicated how loose the motor had shaken over time. Reassembling and activating I was greeted by less low frequency vibration/rumble and more of a quieter humming fan. It's not as quiet as a new fan unit would be but its much much better than it has been. I have probably saved myself about £40-50 on not having to buy a new fan just yet. Not getting an electric shock whilst repairing it I class as an added bonus.

Git Hub – Codecolorer

I have been using Git for version control on my own machine for a little while now. I've barely scratched the surface of what it can do but it is still useful to me. I have had an account on Git Hub for a while and have been meaning to either start or contribute to a project. I noticed that one of the syntax highlighting projects I use had not been updated in a while. So I forked the Codecolorer code and applied some updates. My intent is that these changes get pulled back into the main project. In the mean time my version of the codecolorer wordpress plugin is available here or by clicking on the link in the Git Hub widget (under Octocat).