diff --git a/file_previewer.sh b/file_previewer.sh index b5f0059..9ea1c7b 100755 --- a/file_previewer.sh +++ b/file_previewer.sh @@ -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"