chezmoi/dot_config/kitty/kitty-themes/dot_tools/executable_markdown.sh
kjuulh 9cedfd61f6
feat: chezmoi
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-24 12:31:59 +02:00

16 lines
479 B
Bash

#!/usr/bin/env bash
previews_root=$1
# usually this value: https://raw.githubusercontent.com/dexpota/kitty-themes-website/master
url_root=$2
for f in $(find "$previews_root/previews" -maxdepth 1 -mindepth 1 -type d | sort); do
preview_file="$f"/preview.png
theme=$(basename $f)
relative_path=$(realpath --relative-to="$previews_root" "$preview_file")
header=`basename $theme | sed 's/_/ /g'`
image="![image]($url_root/$relative_path)"
echo \#\# $header
echo $image
done