1
0
Fork 0
This commit is contained in:
Luca Bilke 2024-01-23 14:45:54 +01:00
parent d2be63b3d7
commit a4b5fbf736
3 changed files with 14 additions and 6 deletions

View file

@ -63,17 +63,26 @@ case "$(xdg-mime query filetype "$1")" in
*/vnd.openxmlformats-officedocument.wordprocessingml.document) run docx2txt <"$1" ;;
*/vnd.ms-excel) run ssconvert --export-type=Gnumeric_stf:stf_csv "$1" "fd://1" | batorcat --language=csv ;;
*/vnd.openxmlformats-officedocument.spreadsheetml.sheet) run ssconvert --export-type=Gnumeric_stf:stf_csv "$1" "fd://1" | batorcat --language=csv ;;
*/epub+zip) [ ! -f "$CACHE" ] && run epub-thumbnailer "$1" "$CACHE" 1024; image "$CACHE" "$2" "$3" "$4" "$5" ;;
*/epub+zip)
[ ! -f "$CACHE" ] && run epub-thumbnailer "$1" "$CACHE" 1024
image "$CACHE" "$2" "$3" "$4" "$5"
;;
*/pgp-encrypted) run gpg -d -- "$1" ;;
*/pkix-cert) run openssl x509 -text -noout -in "$1" ;;
image/svg+xml) [ ! -f "$CACHE" ] && run inkscape --convert-dpi-method=none -o "$CACHE" --export-overwrite -D --export-png-color-mode=RGBA_16 "$1"; image $CACHE "$2" "$3" "$4" "$5" ;;
image/svg+xml)
[ ! -f "$CACHE" ] && run inkscape --convert-dpi-method=none -o "$CACHE" --export-overwrite -D --export-png-color-mode=RGBA_16 "$1"
image $CACHE "$2" "$3" "$4" "$5"
;;
image/*) image "$1" "$2" "$3" "$4" "$5" ;;
video/*) video "$1" "$2" "$3" "$4" "$5" ;;
*opendocument*) run odt2txt "$1" ;;
*/markdown) run lowdown -Tterm "$1" ;;
*/html) run lynx -dump "$1" ;;
text/* | */json | */schema+json | */xml) batorcat "$1" "$2" ;;
*/pdf) [ ! -f "${CACHE}.jpg" ] && run pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE"; image "${CACHE}.jpg" "$2" "$3" "$4" "$5" ;;
text/* | */json | */schema+json | */xml | */javascript) batorcat "$1" "$2" ;;
*/pdf)
[ ! -f "${CACHE}.jpg" ] && run pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE"
image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
;;
esac
case "$(file -bL --mime-type "$1")" in

View file

@ -7,7 +7,6 @@ KVM
Qemu
Tralios
Libvirt
bereichen
POSIX
Ansible
Hosting

View file

@ -103,7 +103,7 @@ export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
localpath="$(find -L ~/.local/bin -type d -printf %p: | sed 's/.$//')"
fpath=($XDG_CONFIG_HOME/zsh/completions $fpath)
export PATH="$PATH::$localpath"
export PATH="$PATH:$localpath"
# export NVM_DIR="$HOME/.config/nvm"
# [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm