While browsing my Email inbox 5:00 a.m. I made the half conscious decision to click on an article from the "Pycoder's weekly" newsletter. The click linked to an IEEE Spectrum blogpost with the title "Top Programming Languages 2021: Python dominates as the de facto platform for new technologies" and I read a bit deeper, because of the first sentence ("Learn Python") and because: who does not love to get ones own prejudices confirmed by external sources? I do!
After my friend Dennis showed me his video about "merging" images, I discovered this excellent blog-post 'Concatenate images with Python, Pillow' of note.nkmk.me and decided to create my own tools with python, pillow and PySimpleGUI:
A simple Image macro tool to generate Internet Memes or greeting card photos, consisting of a GUI that allows to concatenate several images together into one big merged image and optionally add a text message to it.
While I was always aware of the fact that regular expressions (regex) are a very powerful search-and-replace tool, I hardly ever used them in practice. For my humble needs, the built-in search-and-replace tool of my favorite text editor Geany is more than sufficient. From time to time, when I run into complex cases, I usually write a small Python script.
This morning, while converting old Dokuwiki-shownotes pages from my podcast into markdown format, I finally gave in: I wanted to solve a task using regular expressions.
The task was already solved inside a larger hand-written python script of mine, but I thought it would be nice to have a singular regex string that I can copy/paste into the search-replace dialog of Geany.
The task is this one:
convert a hyperlink from dokuwiki's format into markdown format.
source: (dokuwiki format)
[[https://geany.org|Geany text editor]]
desired result (markdown format):
[Geany text editor](https://geany.org)
While i liked the concept of nikola, the clear-written, good looking documentation (written -of course- with nikola) and the apparently active community behind it, i struggled to fully understand the concept of how to make a bi-lingual (or multi-lingual) homepage with it.
In the end i managed it more by luck and intuition than by understanding, so I provide my findings with the hope others may struggle less long than I did to get their desired ouput.
use case: homepage with blog
I wanted a homepage with one main language (German) and some (but not all) pages translated into English. I also wanted a blog where some postings are in German, some are in English, and some -but not all- postings are translated in both languages.
in the end, my 'pages' folder