aboutsummaryrefslogtreecommitdiff
path: root/kitty/kitty-themes/.tools/markdown.sh
diff options
context:
space:
mode:
authorIndrajith K L2024-06-27 17:51:18 +0530
committerIndrajith K L2024-06-27 17:51:18 +0530
commit57eb70137b5bbcdabdc0f02eea5477b3e5f845a1 (patch)
treee78187146c506d5a640545dee99cc3e9860e25dc /kitty/kitty-themes/.tools/markdown.sh
downloaddots-57eb70137b5bbcdabdc0f02eea5477b3e5f845a1.tar.gz
dots-57eb70137b5bbcdabdc0f02eea5477b3e5f845a1.tar.bz2
dots-57eb70137b5bbcdabdc0f02eea5477b3e5f845a1.zip
Adds Arch Linux dotfiles
Diffstat (limited to 'kitty/kitty-themes/.tools/markdown.sh')
-rwxr-xr-xkitty/kitty-themes/.tools/markdown.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/kitty/kitty-themes/.tools/markdown.sh b/kitty/kitty-themes/.tools/markdown.sh
new file mode 100755
index 000000000..0fb08bae0
--- /dev/null
+++ b/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