ctpv/sh/prev/libreoffice.sh
2022-07-31 17:12:18 +05:00

16 lines
308 B
Bash

# office: libreoffice
lo() {
# 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 lo