Add svg support

This commit is contained in:
Nikita Ivanov 2022-10-10 01:43:16 +05:00
parent d38577e061
commit 230f6254c5
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133
4 changed files with 10 additions and 2 deletions

View File

@ -65,7 +65,7 @@ For example, you only need either `elinks`, `lynx` or
| pdf | `pdftoppm` |
| text | `bat` `cat` `highlight` `source-highlight` |
| torrent | `transmission-show` |
| video | `ffmpegthumbnailer` |
| video | `convert` `ffmpegthumbnailer` |
<!--TABLEEND-->

View File

@ -115,7 +115,7 @@ torrent T{
transmission\-show
T}
video T{
ffmpegthumbnailer
convert ffmpegthumbnailer
T}
.TE
.\" TABLEEND

View File

@ -40,6 +40,7 @@ Preview b_previews[] = {
PR(NULL, "text", NULL, cat, PREV_ATTR_NONE),
PR(NULL, "image", NULL, image, PREV_ATTR_NONE),
PR(NULL, "image", "svg+xml", svg, PREV_ATTR_NONE),
PR(NULL, "video", NULL, video, PREV_ATTR_NONE),
PR(NULL, "application", "pdf", pdf, PREV_ATTR_NONE),

7
sh/prev/svg.sh Normal file
View File

@ -0,0 +1,7 @@
# video: convert
video() {
convert "$f" "jpg:$cache_f"
}
convert_and_show_image video