Simple bash script to make a digital photo frame with QIV.
Clone the repository on the Raspberry Pi (or any system Linux based) :
git clone [email protected]:HitoTech/photoframe.git
cd photoframe
Execute the system setup script.
sudo ./system_init.sh
When the script is done, you should have QIV installed, an autoloading slideshow at system boot, and a new folder ~/pics
. Add photos in this folder, and they will be added to slideshow.
The slideshow will automatically launch at system boot, but you can start it manually :
./qiv_slideshow.sh
In order to add more photos to the system, maybe you want to access a shared drive (computer, server, NAS, etc.).
Add this line in /etc/fstab
to automatically mount a shared folder at system boot :
server_name:remote_folder /home/pi/shared_folder nfs defaults 0 0
If you have mounted a shared drive, you could like to copy some photos from the remote to the local system.
For this, use a rsync command :
rsync -avz --exclude '*.NEF' --exclude '*.MOV' --exclude '*.m4v' --exclude '*.mp4' /home/pi/shared_folder/cats/ /home/pi/pics/cats/
This command copy all the photo from /home/pi/shared_folder/cats/
to the local system, without the RAW and video files.
find . -name "*.JPG" -exec rename 's/.JPG$/.jpg/' {} \;
If you want to resize all your photos to fit the size of your screen :
sudo chmod 777 *
find . -name "*.jpg" -exec mogrify -resize 1400x800 {} +
find . -type f -name '*~' -exec rm -f '{}' \;
The chmod is here because mogrify must have access to the photos. The third command is to remove photos in case mogrify has created copy of the resized images.
Il you copy your files from a Synology, there could be some folders named "@eaDir". You can remove them with this command :
find . -name "@eaDir" -type d -print |while read FILENAME; do rm -rf "${FILENAME}"; done