Add Sunday, and a helper script called 'addpic.sh'
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
26
addpic.sh
Executable file
26
addpic.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
[ $# -ne 2 ] && {
|
||||
echo "Usage: addpic.sh <input_filename> <gallery_filename>"
|
||||
echo "Example: $0 ~/Pictures/Screenshot\ 2024-08-18\ at\ 23.32.55.png fusion.png"
|
||||
exit
|
||||
}
|
||||
|
||||
infile=$1; shift
|
||||
outfile=$(basename $1); shift
|
||||
|
||||
|
||||
[ -r "$infile" ] || {
|
||||
echo "Can't read infile $infile"
|
||||
exit
|
||||
}
|
||||
|
||||
today=$(date +%Y-%m-%d)
|
||||
|
||||
cmd="magick \"$infile\" -resize 400x static/img/thumbnails/$today/$outfile"
|
||||
echo "Running: $cmd"
|
||||
eval $cmd
|
||||
|
||||
cmd="magick \"$infile\" -resize 4000000@\> static/img/fullsize/$today/$outfile"
|
||||
echo "Running: $cmd"
|
||||
eval $cmd
|
Reference in New Issue
Block a user