UP | HOME
The personal website of
Ali Mohamed Ali

Navigation:
Atom/RSS feed link
art (1)|doodle (1)|first (1)|image (1)|meta (1)|tech (1)|test (2)

The first few images!
<2026-05-12T16:29:00+03:00> :test:art:doodle:image:

Hello again! I'm trying out how images look within the blog, so here are a couple of doodles I have drawn today.

Nothing out of the ordinary.

The mandatory image in the start to capture attention has been placed, now we can show some of the source code behind it.

#!/bin/bash

sed -i -Ee \
    's;\[\[https:\/\/drive.google.com\/file\/d\/(.{,35})\/view\?.*\]\];@@html:<center><img src=\"https://lh3.googleusercontent.com/d/\1\"></center>@@;g' $1;
sed -i -Ee \
    's;\/view\?usp=drive_link;;g' $1

Based on this other blog post here, I constructed a fragile little script that does the job to convert straight-up Org mode links to drive resources on drive.google.com to embedded html img tags somewhere where the resources are being kept.

I don't exactly know if it'll change any time in the future. From that linked post, one can tell that Google does change their drive url argument syntax — in shell terminology — but I haven't seen a change in the Google Drive image storage domain/URL scheming. This is probably for longevity, since I can imagine holding the world's images on your shoulders does incur the responsibility that you don't handle them lightly.

Besides that, I also must comment that this is lazy, since I didn't make any elisp code to get Org mode to do this kind of thing for me during export, but I've done similar tricks to format the text before it even enters any processing and so long as one ensures the changes aren't compounding, it'll never be a disadvantage. I like to justify this as being annoyed with the inconvenience of the existing language that I make a macro layer that lets me write in my own language. One could also comment that using shell scripts and using elisp are just two ways of achieving the same goal functionally. It annoys me often to even have a feeling that I might just be using the wrong programming language for the job.

People have done this macro language thing with all lisps (in fact, it's well known for its macro capabilities), and in an ugly way with the systems language C (someone made C look like Fortran, but I forgot where the link was). Now exiting that tangent of ours,

Why am I linking to these from my google drive? Because there is a stark lack of mature, rights-respecting, license-respecting image hosting services. I can't keep good images on github, so I use this for the moment, as I also cannot host my images alone. If I could, I would, lol.

How are the doodles?

Let's see if the script I set up to make these image links work works?

PS: It does!

More info...

Author: Ali Mohamed Ali <someguyshutup5@gmail.com>
Date: 2026-05-12 Tue 23:53
Emacs 30.1 (Org mode 9.7.11)
License: CC-BY-SA 4.0
Validate