From 0f144c1ef9d831b1c663ef998f40e22c33156d9e Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Fri, 8 Sep 2023 14:43:41 +0530 Subject: Initial Commit * Adds Basic dot files configs --- .config/kitty/kitty-themes/.tools/markdown.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 .config/kitty/kitty-themes/.tools/markdown.sh (limited to '.config/kitty/kitty-themes/.tools/markdown.sh') diff --git a/.config/kitty/kitty-themes/.tools/markdown.sh b/.config/kitty/kitty-themes/.tools/markdown.sh new file mode 100755 index 0000000..0fb08ba --- /dev/null +++ b/.config/kitty/kitty-themes/.tools/markdown.sh @@ -0,0 +1,15 @@ +#!/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 -- cgit v1.2.3