ctpv/sh/prev/odt.sh
2022-06-21 01:18:04 +05:00

16 lines
313 B
Bash

# odt: libreoffice
office() {
# File produced by libreoffice
jpg="$(printf '%s\n' "$f" | sed 's|^.*/||; s|\..*$||')"
libreoffice \
--headless \
--convert-to jpg \
--outdir "$cache_d" \
"$f" >/dev/null &&
mv -- "$cache_d/$jpg.jpg" "$cache_f"
}
convert_and_show_image office