Blogging without the Internet

June 27, 2023 0 By addshore

I planned on blogging being one of my relaxing hobbies while sailing around the Atlantic Ocean ⛵, and though we managed to keep a sailing blog up to date I found it extremely hard to write tech-related blogs while crossing oceans without a speedy or any internet connection.

The setting (of writing these blog posts) is rather beautiful, but to date, I have only written a single blog post when without a connection at all on this blog, now doubling that list to 2 with this post 🎉.

This was not because I didn’t have things that I wanted to write about, but rather that unless you are prepared well, there always seemed to be some element of my blog post writing process that would require access to something that is online and not on one of my local devices, or that only using local devices just ended up being a giant pain 🤦.

Anything from transferring a file between devices, quickly checking a reference to include a quote or opening an application to find it won’t be possible without a connection can really upset the flow of things.

A couple of concrete examples of the above …

Transferring files between devices

The internet has generally made this easy for smaller files, and that’s certainly something I have come to rely on generally. In fact, most of my workflows mostly rely on the internet being there, as realistically, on a day-to-day basis, it’s always up. And when it’s all broken, it’s time to make a cup of tea. 🫖

You have the more crude emailing of files to yourself, dropping them into something such as Google Drive, Dropbox, or another file-sharing utility, or uploading them immediately for use in a post to somewhere like YouTube or WordPress.

When without an internet connection, most of the off-the-shelf applications break down, and you find yourself trying to use Bluetooth or cables, all of which is more effort and seem to be terribly prone to failure. If you end up with devices in 2 separate ecosystems things don’t get easier, with “easy” solutions such as AirDrop for Apple devices, not working across other ecosystems, and likewise with the Android nearby share functionality (though apparently there is now a Windows app for this!!!).

One solution I found to work quite well across devices here was hosting a HTTP server on my phone using an app called HTTP file server, which all devices can then send to and get from directly using my phone’s WiFi hotspot.

Applications that just won’t open

Particularly VSCode, which can mean no development time for me. When using VSCode in WSL mode, it will download the Windows update while it is running, then installing the update when you close and reload VSCode. The problem here for users of WSL mode is there is another application running in Linux land that also needs to update. When the app tries to start it looks for the update online, can’t connect, and you’re no longer able to open VSCode in WSL until you next connect to the internet. Sure I can still use it in Windows land, but that’s beside the point.

Another example would be the Power Automate application by Windows, which I thought I might experiment with for a few hours on this crossing. Unfortunately upon loading the app, you are met by a screen that wants you to sign in. Why this is a requirement I’m not quite sure, as far as I know, this thing lets you also automate things entirely locally.

The solution? I guess maybe force close everything and re-load it one more time just before turning the internet off?

Or just use simpler applications? In the back of my head, I have a bunch of developers in a conference telling me to just use Vim instead…

The Internet as a reference

It’s no secret that many people in today’s world that can, do use the internet for a continual reference for things that don’t fit or won’t stay in their head. I am one of these people, especially when working on a wide variety of topics or in a large set of programming languages, or just on new topics.

While traveling before and with an existing but limited connection I decided to download some portions of the internet for reference. Once again I relied on Android apps here such as a Laravel Reference or PHP Reference.

Prior to sailing, I experimented with an offgrider application that I was going to create which would make syncing a bunch of online resources to a local device trivial, rather than having to find bespoke means for each resource.

In reality, I found that this could mostly be achieved with a collection of simple bash scripts, primarily using wget and other tools such as {{youtube-dl}}.

To have a reference of all of my blog posts, for example, you’d need something like this:

wget -P ./.offgrid/ --mirror --compression=auto --convert-links --adjust-extension --page-requisites --span-hosts --no-parent --reject-regex "/?share=|/wp-json|/feed" --restrict-file-names=windows --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36" --domains addshore.com,upload.wikimedia.org,imgur.com,i.imgur.com,gerrit.wikimedia.org https://addshore.comCode language: PHP (php)

Or to download a bunch of YouTube videos at their lowest quality you might consider this:

docker run --rm -it -u $UID:$PID -v "$PWD/.offgrid/videos:/data" vimagick/youtube-dl --format 'worst' --ignore-errors --retries 2 --no-overwrites --restrict-filenames --write-description --write-thumbnail https://www.youtube.com/playlist?list=PLAYLIST_CODECode language: PHP (php)

I recently also read that some folks are starting to buy physical encyclopedias again for use offline, just in case the whole world goes to pot. (I’ll try and cover some nice easy ways to get Wikipedia offline in a future post)

Where to write

My blog is currently online using a self-hosted WordPress install, so I can’t write into the site itself. This is where I am quite jealous of folks that have their blogs powered by git and written in markdown… Perhaps I should consider a change? Or perhaps some hybrid model?

I could use the Jetpack / WordPress android app of course, but currently, that would mean writing on my phone, which can work, but the smaller screen real estate can be hard, and pasting in code snippets as I did above starts leading us back toward the issue of transferring data between devices

For this post, I’m using a markdown note-taking app called Obsidian that I have been trying out, which allows me to do most things on my laptop with ease, such as image embedding and code blocks. However, I do find myself linking my text with some sort of fake link I need to replace when publishing such as {{link}} as links are hard without the nice WordPress linking tool

What to write

The topic pool becomes more limited, and really this is limited to things that are currently held entirely (or at least 98%) in your mind, which often ends up being things that are happening right now or have just happened.

For example, I was thinking about fixing a bug in my {{mwcli}} application, but couldn’t as VSCode wouldn’t load in WSL. I then moved on to see how Power Automate worked, but that required login. n8n doesn’t require a login, but apparently just won’t load at all right now.

And so, I find myself here venting into the void, but hopefully tying a few annoying issues together for at least a mildly entertaining read.

Why am I writing? We are currently on day 6? of a 10-day crossing from the Azores back to the UK, and there is only so much reading, relaxing, listening to podcasts, listening to music, napping, and cooking one can deal with in a short period of time. Especially while the engine is running.

Let’s hope for a fish… And some more blog post-writing capacity once I’m back online…