Add pg_jekyll script

This commit is contained in:
2025-09-06 22:06:27 +02:00
parent 0a575a9731
commit 61a9584fb6
4 changed files with 63 additions and 4 deletions

View File

@@ -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