Skip to content

Instantly share code, notes, and snippets.

@piousdeer
Created September 20, 2021 09:24
Show Gist options
  • Save piousdeer/b1bccaca541e499a5441bc90fc816723 to your computer and use it in GitHub Desktop.
Save piousdeer/b1bccaca541e499a5441bc90fc816723 to your computer and use it in GitHub Desktop.
#!/bin/bash
OUT_FILE="$(xdg-user-dir DOCUMENTS)/Домашка на $(date --iso-8601).pdf"
CAMERA_PATH="/run/user/1000/gvfs/sftp:host=192.168.0.2,port=1739/primary/DCIM/Camera"
convert -monitor -auto-orient -quality 35 -strip `ls -1tr $CAMERA_PATH/* | tail -${1:-1}` "$OUT_FILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment