Add more document formats

This commit is contained in:
Nikita Ivanov 2022-07-28 03:02:07 +05:00
parent 4aee1f7fcc
commit 9e2be65d68
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133
2 changed files with 14 additions and 4 deletions

View File

@ -17,7 +17,17 @@ Preview b_previews[] = {
PR("md", NULL, NULL, mdcat, PREV_ATTR_NONE),
PR("torrent", NULL, NULL, torrent, PREV_ATTR_NONE),
PR("odt", NULL, NULL, odt, PREV_ATTR_NONE),
PR("ods", NULL, NULL, libreoffice, PREV_ATTR_NONE),
PR("fods", NULL, NULL, libreoffice, PREV_ATTR_NONE),
PR("xls", NULL, NULL, libreoffice, PREV_ATTR_NONE),
PR("xlsx", NULL, NULL, libreoffice, PREV_ATTR_NONE),
PR("csv", NULL, NULL, libreoffice, PREV_ATTR_NONE),
PR("odt", NULL, NULL, libreoffice, PREV_ATTR_NONE),
PR("fodt", NULL, NULL, libreoffice, PREV_ATTR_NONE),
PR("doc", NULL, NULL, libreoffice, PREV_ATTR_NONE),
PR("docx", NULL, NULL, libreoffice, PREV_ATTR_NONE),
PR(NULL, "text", NULL, bat, PREV_ATTR_NONE),
PR(NULL, "text", NULL, highlight, PREV_ATTR_NONE),

View File

@ -1,6 +1,6 @@
# odt: libreoffice
# office: libreoffice
office() {
libreoffice() {
# File produced by libreoffice
jpg="$(printf '%s\n' "$f" | sed 's|^.*/||; s|\..*$||')"
@ -12,4 +12,4 @@ office() {
mv -- "$cache_d/$jpg.jpg" "$cache_f"
}
convert_and_show_image office
convert_and_show_image libreoffice