Elektrubadur

Personal web page of Björn Lindström

Converting Sources of This Blog to Org format

In Programming about WWW, Markdown, Org, Hugo, Python and Emacs — 

It looks a bit bad that the last entry here was three years ago and was about how the site generation works, and here is another one on the same topic. However, it's in the interest of making it more enjoyable for me to write more that I've switched from Zola to Hugo in order to be able to keep the sources in Org format.

Here I'll just share the script I made to do the format conversion, in case it's useful for anyone else. Actually, half the reason I'm even writing this entry is that I will need to later on repeat this process for another page I manage, and this way I have the script and some notes for then.

How This Blog Works

In Software about WWW, HCoop, Git and Automation — 

This blog is created using the Zola static site engine. I use a combination of GitLab CI and cron to automatically upload it to my web server whenever I merge a change to the Git master branch of the home page.

The elektrubadur.se source code is kept here in GitLab [Update 2023-06-07: elektrubadur.se sourcecode moved to Sourcehut]. While writing a post I just run zola serve on my computer and can look at a dynamically updated website on a local web server.

Vimwiki + Nextcloud Notes

In Programming about Vim, Vimwiki, Nextcloud and notes — 

I've been using Vimwiki for a while, which lets me keep interlinked plain text notes on my computer with minimal hassle.

For a while I've also kept these synced to my phone via the Nextcloud Notes application. I have a self-hosted Nextcloud instance, and simply point Vimwiki on my computer to the same directory in the directory that I have synchronized with Nextcloud.

The Nextcloud Notes app uses Markdown, so I have to configure Vimwiki to use that syntax, which is fine with me. One quirk of the Nextcloud Notes app is that rather than letting you name files independently, it will change filenames to whatever the first line of your note is. Until today that meant I had to keep making sure in Vimwiki to add those headers, but I've now finally automated that.

First Month with Fedora Silverblue

In Software about Linux, Fedora, Silverblue and containers — 

I decided during my midwinter vacation that I'd try out Fedora Silverblue on my desktop, and I liked it, so here I am still using it on my work laptop.

Silverblue is a version of Fedora using rpm-ostree to provide a minimal and immutable base OS, providing a platform for running applications in containers.

Previously I was using Ubuntu with a lot of Ansible playbooks for installing things both globally and in my home directory. I used to keep those playbooks in the same directory as my dotfiles, but after the switch to Fedora I removed them. If anyone is curious about what that looked like, they are here.

Simple Nextcloud To-Do List Automation with Python and WebDAV

In Programming about Nextcloud and planning — 

I keep a task list in a todo.txt format in Nextcloud. They are simply kept as two text files, todo.txt and done.txt in the root of my Nextcloud user directory.

Some clients already have the option to move tasks from todo.txt to done.txt when you mark a task as done. However, I would prefer they stick around in the todo.txt for a while, in case I change my mind.

At first I thought I'd just write a script to run as a cronjob on the server hosting Nextcloud, but that won't work with syncrhonization, as it won't let Nextcloud know the files have changed. I then thought there must be an API to read/write files to Nextcloud, and then quickly realized that this API is WebDAV. So, I should be able to make a Python script to do this, using requests. A more full-featured WebDAV library would be overkill for this.

Suphan Buri

Buffalo.

In Photos — 

I went on a work outing to Suphan Buri a little while back, here comes some photos. Most of the pictures are from the buffalo themed resort where we stayed.

Traffic

Traffic

In Photos — 

Lower Parel, Mumbai.

Gecko on Window

Gecko on Window

In Photos — 

Gecko climbing outside of my window.

Cow

Cow

In Photos — 

Resort cow.

Frog

Frog

In Photos — 

Bathroom decoration on Koh Lanta.