[file_previewer.sh]: Add previews for Markdown files

This commit is contained in:
2024-09-23 03:18:25 +01:00
parent 7c8d5bc265
commit a94b62483e

View File

@ -55,6 +55,9 @@ case "$(mimetype --brief -- "$file")" in
text/html)
lynx -width="$width" -display_charset=utf-8 -dump "$file";;
text/markdown)
markdown-it "$file" | lynx -width="$width" -display_charset=utf-8 -dump -stdin;;
video/*)
ffmpeg -ss 00:00:00 -i "$file" -frames:v 1 -q:v 2 "$preview_image"
chafa "$preview_image" --size "$(($width-4))"x"$height"