summarylogtreecommitdiffstats
path: root/stripPicture
blob: 2ca1706b78eea5da1fcb93cea3f72d85fbe78444 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# Usage: stripPicture fileaname

fullname="$1"
filename=$(basename "$1")
extension="${filename##*.}"

mkdir -p $HOME/.config/keneric
exportPicture=$HOME/.config/keneric/UseThisPicture.png

# thumbnail options by extension type
case "$extension" in


      kra|Kra|KRA)
      unzip -p "$fullname" preview.png > "$exportPicture"
      exit
      ;;
      
      ora|Ora|ORA)
      unzip -p "$fullname" Thumbnails/thumbnail.png > "$exportPicture"
      exit
      ;;
      
      blend|Blend|BLEND)
      blender-thumbnailer.py "$fullname" "$exportPicture"
      exit
      ;;

      *)
#     case trap
      exit
      
esac