From 61a9584fb67c026002953ef02046ca0f78575040 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sat, 6 Sep 2025 22:06:27 +0200 Subject: Add pg_jekyll script --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 5a2a4a2..b30ff91 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,8 @@ The repository contains a collection of random scripts and short programs. 3. [read\_logs.rb](#read_logsrb) 4. [cross\_toolchain.rb](#cross_toolchainrb) 5. [rename.rb](#renamerb) -6. [tea-cleaner](#tea-cleaner) +6. [pg\_jekyll.rb](#pg_jekyllrb) +7. [tea-cleaner](#tea-cleaner) ## 7digital.rb @@ -80,6 +81,17 @@ Changes the extension of all files matching a pattern in the given directory. Call the `rename.rb` without arguments to see the usage information and an example. +## pg\_jekyll.rb + +This script was used to migrate blog posts from a PostgreSQL database to a +static site generator in Jekyll-like format. `pg_jekyll.rb` cannot be used as +is: the query and columns should be adjusted for a concrete case, but it can +be a starting point and example for such a migration. Also it expects +environment variables `USER` and `DBNAME` to be present in the environment. + +Pages are written into the `posts/` directory. A column named `slug` is used +for the name with `.html` extension. + ## tea-cleaner `tea-cleaner` tries to detect spam accounts on a gitea instance and can remove -- cgit v1.2.3