From 1c17a09954b28147e50931f243901f0043541aae Mon Sep 17 00:00:00 2001 From: Nuno Sempere Date: Wed, 17 May 2023 21:50:39 +0000 Subject: [PATCH] remove "me in 2022" series of gifs --- blog/2023/01/.03/me-in-2022/index.md | 85 ---------------------------- 1 file changed, 85 deletions(-) delete mode 100644 blog/2023/01/.03/me-in-2022/index.md diff --git a/blog/2023/01/.03/me-in-2022/index.md b/blog/2023/01/.03/me-in-2022/index.md deleted file mode 100644 index fa02579..0000000 --- a/blog/2023/01/.03/me-in-2022/index.md +++ /dev/null @@ -1,85 +0,0 @@ -Me in 2022 -========== - -![](https://i.imgur.com/m5rQtBI.gif) - -The above *.gif* shows a snapshot taken by my computer at 12:00 for a large number of days of the year. The below *.gif* shows a snapshot taken by my computer every five minutes on the 22/02/2022: - -![](https://i.imgur.com/Pw1iMSn.gif) - -### To create such a *.gif* in Linux - -**a. Create a script to take a photo from your webcam:** - -``` -## Defs -panopticonDir="~/.panopticon" - -selfiesDir="$panopticonDir/selfies" -today="$(date +"%Y%m%d")" -timeNow="$(date +"%H%M%S")" - -## Init -mkdir -p "$selfiesDir/$today" - -## Selfies - -selfieFileName="webcam_$timeNow.jpg" -/usr/bin/fswebcam -r 1280x720 "$selfiesDir/$today/$selfieFileName" -# ^ works with pipewire - -``` - -**b. Call the script from within crontab** - -Call - -``` -$ sudo crontab -e -``` - -and then paste: - -``` -*/5 * * * * /home/loki/.panopticon/shoot.sh -``` - -**c. Put it all together into a gif** - -One gif from snapshots taken at 12:00. - -``` -summary_dir="~/.panopticon/summary-12" -mkdir summary_dir -for dir in ~/.panopticon/*/ ; do - if [[ -d "$dir" && ! -L "$dir" ]]; then - echo "Entering $dir"; - dirname_raw="$(echo "$dir" | sed 's#/##')" - temp_photo_name="$(echo $dirname_raw/webcam_1200*)" - echo "$temp_photo_name" - cp $temp_photo_name temp.jpg - mv temp.jpg $summary_dir/$dirname_raw.jpg - fi; -done - -convert -delay 10 -loop 0 $summary_dir/*.jpg 12.gif - -``` - -One for each day with something like: - -``` -for dir in */ ; do - if [[ -d "$dir" && ! -L "$dir" ]]; then - echo "Entering $dir"; - dirname_raw="$(echo "$dir" | sed 's#/##')" - convert -delay 10 -loop 0 $dirname_raw/*.jpg daily-gifs/$dirname_raw.gif - echo "Created daily_gifs/$dirname_raw" - fi; -done - -``` - -

- -