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.

Data Export

I'm still considering moving this site from being WordPress based over to a static site. My plan is to conduct a few experiments first to see how the process works and if the end result would work the way I want it to.

The first stage in this process has been to export all of the written content from the site to allow it to be converted. What has been a surprise is that despite having posts and comments going back to 2002 it only amounts to a 3.8MB XML file. Being XML there is plenty of data structure information in the file which will increase the file size. So ultimately the actual site data accumulated is even less! Graphics, images & other uploads are obviously not included but I still find it an interesting fact.

I Still Dislike KiCAD

I made another attempt today to use KiCAD 5.0.2. There was a schematic for an 8-bit computer I wanted to investigate. In addition to looking at the actual circuit I wanted to see how KiCAD handled the separate schematic sheets that made up the project.

The KiCAD interface has once again left me frustrated. Zooming in an out with the mouse scroll is a pain as it zooms too much for the slightest movement. I have other issues with the way pan and zoom differs from other CAD packages but I don’t see this ever changing.

I did like the way I could enter the high level overview and then enter the individual hierarchical blocks. However moving between blocks required me to leave and renter the sheets. I went looking for something that would allow me to switch between the sheets that made up the whole schematic. I found box that would open up and allow me to select the sheet I wanted. It would then immediately close again. Not great if you want to switch back and forth between sheets quickly. When using DipTrace I have been able to have tabs for each sheet along the bottom of the screen and can easily switch between them. I cannot see anything in KiCAD that allows the same functionality.

I’m sure there is a lot to like about KiCAD but there is so much I dislike about it I can find a reason to persevere with it. I would submit a bug report or two but I have found existing reports to the issues which the developers don’t intend to fix.

Aims for 2019

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 2018:

  • Lose weight – Fail, I have put weight on.
  • Continue work on STM32 development – Pass. I didn’t get around to using the development board I had planned to use. Instead I continued working with the STM32F103 boards I had. I managed to make my own Christmas lights with an LED strip and conducted some experiments with stepper motors.
  • Experiment with CPLD – Fail. Whilst I have the board available I have not yet had a cause to use it.
  • Clear out Garage – Pass. I cleared out all of the large items in the garage. There is more room but it still needs a good sort out and perhaps a workbench and some shelves.
  • Go 4k – Pass. I have a 4k computer monitor, it has been very useful for programming as I can get more readable code on the screen. The 4k TV was delayed due to cost.
  • Finish Back Yard – Fail. I still need to put the last step in.
  • Eat more healthily – Fail. This is probably related to my weight gain.
  • Perform more data backups – Fail. Not done as many backups as I would have liked to.
  • Read more books – Fail. I am still reading but progress has been slow.
  • Plan Free time – Pass. I have made time to do a few things when I have wanted to do them. There is always room for improvement.
  • Reduce Netflix use – Fail. I blame Netflix for having too much good content to watch.
  • Tackle the Rodent Problem – Fail. They are still there. I fear this is a battle I cannot win.

2018 was an OK year. But there is much room for improvement in 2019.

What I intend to do in 2019:

  • Lose Weight & Eat Healthily - Yes, it’s back on the list as a combined goal but it needs to be.
  • Continue STM32 Development – There are more projects I want to work on and I may yet create something useful.
  • Buy A 4k TV – Hopefully the expensive TV from 2018 will have dropped to a price that is within my budget.
  • Watch Less TV – An odd choice if I am planning on getting a new TV but a goal that will hopefully have me doing other things.
  • Read More books – My reading list is growing and I need to make some progress.
  • Work Less Overtime – Whilst working some overtime brings in extra cash I have probably been doing too much. I would end up with more free time as a result.
  • More Website Updates – I have not been updating the website as much I should. I am thinking of project documentation as possible content.
  • Increase Savings – Buying a car this year put a dent in my savings and they need building back up.
  • Contribute To An Open Source Project – There are lots of projects I benefit from. There should be something I can give back, even if it is as simple as providing information for a bug report.
  • Write Something In Python – I have spend a lot of time writing C++ for the STM32 and have neglected Python. I should write something to keep myself up to date.

For 2019 there is one must achieve goal and that is to lose weight. All the other goals would be nice extras. At the time of writing I am around 93kg. The first step in the weight loss program is to get under 90kg and stay there. Any improvement on that will be a big success.

Steam Play

I have been using a Linux Desktop machine as my primary computer for many years now. The applications I use day to day are mostly open source and run natively on Linux or through WINE.

Games though have always been an issue. In recent years more games are being released that run natively on Linux. I will now only buy games that run on Linux, no matter how much I might want to play them. But what about the games I already own?

In particular Galactic Civilizations 3. I paid (more than I would do normally) to be a founder for this game. I did so because I enjoyed the previous instalments that I played on Windows and this would entitle me to future expansions for the game at no extra cost. It sounded like a bargain, especially as at the time there was talk of Linux support. Alas the Linux version never materialised and I had to result to booting my old Windows machine in order to play.

I have played the game very little over recent years due to needing to move into a different room and boot another machine to play on a small monitor. Today I stumbled across a post in my news feed about https://www.protondb.com. Proton is a tool built into Steam to allow Windows games to run on Linux. Protondb.com contains a searchable database of users results of attempting to run Windows games on Linux. Galactic Civilisations 3 was in the list as having Gold level support. Digging into the user reports things get better. Over the past 3 months with Proton 3.7-8 users have rated support at the highest Platinum level and a few of the results were using the open source AMD drivers (which is what I use).

Time to give it a go. I followed the Steam instructions on how to enable Steam Play in the Steam Client. From there I was able to download and install the game.

Launching the game for the first time a launcher window appeared showing other games by the same developer. I was then able to launch into the game and found that it worked :).

Then I ran into a problem. Not with the game but with the launcher. To adjust the graphics settings in the game requires the game to be restarted. However the launcher turned into an invisible window. I could click on it. I could see its contents when I looked at the Gnome workspaces overview. I just couldn’t see it when it was maximised. This obviously makes launching the game a problem.

I found the solution in this post. Adding “/nolauncher” run option for the Advanced Startup options for the game inside the Steam Client. The game now starts without any issues.

The only way to know for sure that it works correctly will be to play a few games. I’m now off to “force” myself to play a few games for “research” purposes.

New Theme Experiment

I have had a little more time to play with the twentynineteen theme. I'm still not convinced by the new 'blocks' based layout at this stage.  Whilst I get the idea of being able to move the content blocks around when putting a page together the features I want are not yet there.

I have sections of content on this site that I have styled to look like a command line for use when posting command strings.  I would  like to be able to create a block with that style from within the editor and reuse it.  Currently I can only save a section of html and any changes to it will affect all of the other blocks of that type.

I can think of a way around the issue but it isn't that practical. After a little research I discover that I can probably create my own custom blocks or use a plug-in to do so.

This is inconvenient as I either have to trust a plugin going forward and hope that it is maintained or spend the time learning how to make my own blocks. Neither of these options are that desirable.

WordPress 5.0

I have been waiting for the release of WP 5.0 as I have been keen to try out the new Twenty Nineteen theme. Having looked at a preview of the theme I have mixed opinions.

The new editor that I can use to create posts is easy to use. At the same time it moves me away from the HTML/CSS editing that I normally tweak. The new theme makes use of more of the new blocks functionality. The downside for me is that I will have to spend some time trying to recreate some of the aspects of the site which I want to move across.

I have used some particular formatting styles for some of the pages of the site.  I'd like to continue to use the same style but I need to understand if the new block editor can help me do that.

I still plan on moving to the new theme eventually. I plan to upload some more of my notes on STM32 development.  This will be after I understand how to get the best out of the new theme.

STM32 Developments

Recently I have been a little quiet on the post front. Work has been busy and I've just not found the time to write anything. Behind the scenes I have been tinkering with an STM32F103 and connecting some WS2812B LEDs. Progress can be followed on GitHub.

Unexpected Changes

E-mail is one of those things that you take for granted. Once you have set-up an address and a client you can reliably receive mail for many years until something changes.

Over the past 2 months something changed and I almost didn’t notice. There are certain sites that mail me a few offers, I subscribe to a few mailing list items, github updates me on a few projects that I keep an eye on. I don’t get a huge amount of email but there is normally something being downloaded when I open the client. There were a couple of days when I didn’t get as much as I expected. Not a problem as perhaps there wasn’t anything being sent. When this persisted for a few days I began my investigations.

I was aware of my web host updating the mail-server back-end. I had received an email stating that this would be occurring and to expect a little downtime. But apart from that I wasn’t expecting any significant changes. Significant changes had happened.

Having a domain name had allowed me to use a catch-all email address. Any email that would be sent to the domain after being spam filtered would be received. This made it incredibly easy to create a new address on the fly when creating an account for a new service. I had a few actual mail box addresses in addition to the catch-all. What I had noticed was email only being received from actual mailboxes and not the catch-all addresses.

This was a problem as I had a few accounts where I really needed to be receiving correspondence. I needed to get a solution and quickly. I was able to contact my host and get the catch-all re-enabled. This workaround allowed me a little more time to arrange a permanent solution.

The permanent solution would be to create actual mailboxes rather than rely on a catch-all system. How many unique email addresses had I been using over the years? I stopped counting at 114. Creating mailboxes for all these would be too much effort since most wouldn’t see a large volume of traffic.

Looking through the long list of addresses I was quickly able to discard a large number of them. I had a few that I had used for stores and services that have since closed down. I shouldn’t be getting any future mail from these so I have just made a note of them in my spam filter and ignore them. To reduce the remaining addresses I decided it was best to create a single mailbox and then update various accounts to use it. I can then discard the original address. This was a long and time consuming task.

Currently I have reduced my 114+ addresses down to a more manageable 25. In an ideal world I would have been able to reduce it down even more. A stumbling block was not being able to change my email address on some accounts. For the ones that matter it was easier to create a mailbox, for the others it was easier to unsubscribe and resubscribe.

In future I am only going to use a more limited selection of addresses to hopefully reduce the 25 even more. Whilst this process has been an annoyance it has been necessary to tackle it. I think it has been about 5 years since I last tackled a big email change. All being well I shouldn’t have to do anything as significant for at least another 5.

Email Settings

I checked on the connection settings I am using to log into the mailboxes. Technical information from another email provider provides a good overview of the available settings.

RFC8314 (Jan 2018) outlines the current thinking over connection security for email.

Simply put implicit security using SSL/TLS is preferred as it encrypts the connection by default. STARTTLS is discouraged as it begins as a plain text connection which can upgraded to an encrypted connection. It is worth checking your settings with your own provider to ensure you are as secure as you can be.