Series./blog.sh v1.122

./blog.sh 1.12

./blog.sh v1.12 — part 1 of 2

./blog.sh 1.12 is out — release on GitHub.

The translation release. ./blog.sh translate <slug> --lang <code> --auto hands a post to a translator you name in env.sh: a program of your own, OpenAI and everything that speaks its API, Anthropic, Gemini, DeepL or LibreTranslate. It leaves a draft for you to read and save, and saves nothing by itself. Before writing the file it compares the translation with the original in addresses, pictures, numbers and the count of headings and paragraphs, and says what differs. ./setup.sh --translator sets it up, and the Android and desktop apps have a button for it since 0.10.0. A first draft in the other language →

Beside that, a reader can reply to a toot from their own Mastodon server: one field under the comments, remembered in their browser, nothing of it sent to your site. Reply from your own server → And a post is announced once its page is live, not three minutes before. A deploy that fails leaves the toot owed for the next one, and doctor names it. A hashtag keeps a tag's words together, so blog.sh is #blog_sh, not #blog. The toot comes after the page →

Read more

A first draft in the other language

./blog.sh v1.12 — part 2 of 2

Since 1.9 a post can have a text in a second language, and every one of those texts was written by hand. Pavel asked for a machine to write the first one (#68) and sent a script that did it (#69). 1.12 makes that a command of the engine:

./blog.sh translate my-post --lang de --auto

The question it answers is not "can a machine translate my post". It can, more or less. The question is whether it can do so without anything reaching the site that nobody has read. That is what most of this release is about.

Nothing is saved by it

The translation is written to tmp/my-post.de.md and nothing else happens. You read the file, mend what needs mending, and save it:

./blog.sh add tmp/my-post.de.md

That is the same door a text sent from an app comes through. If the post changed while you were reading, the save is refused instead of writing over the change. Without a slug the command takes the newest published post; --force replaces a language that is already written.

Read more