my dotz
0

Configure Feed

Select the types of activity you want to include in your feed.

at main 987 B View raw
1#!/bin/sh 2 3die() { 4 printf '%s: %s.\n' "$(basename "$0")" "$1" >&2 5 exit 1 6} 7 8sudo mount /dev/sda1 /media/ricoh 9trap 'sudo umount /media/ricoh' EXIT 10 11# make sure it's da right ting 12test -d /media/ricoh/DCIM/101RICOH || 13 die "picture dir not found" 14 15ls /media/ricoh/DCIM/101RICOH/*.JPG 2>&1 >/dev/null || 16 die "no jpgs found" 17 18# bak that shit up 19imgdir="$HOME/Pictures/ricoh/$(date +%Y-%m-%d)" 20mkdir -p "$imgdir" 21cp /media/ricoh/DCIM/101RICOH/*.JPG "$imgdir" 22 23printf "%s\n" "$imgdir" 24 25# exif metadata gets stripped rip 26# also i decided that big jpgs arent so bad 27# to upload really 28# 29# convert to ente.io uploadable format 30# tmpdir="$(mktemp -d /tmp/ricoh_webp.XXXXXX)" 31# for i in "$imgdir"/*.JPG; do 32# test -f "$i" || 33# die "$i is not a file" 34# b="$(basename "$i" .JPG)" 35# ffmpeg -i "$i" \ 36# -c:v libwebp \ 37# -lossless 0 \ 38# -q:v 80 \ 39# -compression_level 6 \ 40# "$tmpdir/$b.webp" >/dev/null 41# done 42# 43# printf "%s\n" "$tmpdir"