This commit is contained in:
Nikita Ivanov 2022-07-31 17:16:58 +05:00
parent abf1a706ac
commit 2e0827a873
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133

View File

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