[file_previewer.sh]: Add previews for Markdown files
This commit is contained in:
@ -55,6 +55,9 @@ case "$(mimetype --brief -- "$file")" in
|
|||||||
text/html)
|
text/html)
|
||||||
lynx -width="$width" -display_charset=utf-8 -dump "$file";;
|
lynx -width="$width" -display_charset=utf-8 -dump "$file";;
|
||||||
|
|
||||||
|
text/markdown)
|
||||||
|
markdown-it "$file" | lynx -width="$width" -display_charset=utf-8 -dump -stdin;;
|
||||||
|
|
||||||
video/*)
|
video/*)
|
||||||
ffmpeg -ss 00:00:00 -i "$file" -frames:v 1 -q:v 2 "$preview_image"
|
ffmpeg -ss 00:00:00 -i "$file" -frames:v 1 -q:v 2 "$preview_image"
|
||||||
chafa "$preview_image" --size "$(($width-4))"x"$height"
|
chafa "$preview_image" --size "$(($width-4))"x"$height"
|
||||||
|
Reference in New Issue
Block a user