Sigal as photo gallery

Hello,

I wanted to share my experience and my setup with Sigal.
I’m running Freedombox on a Raspberry pi b v1, and I was looking for something light and user-friendly to browse my photo folder, which I sync with Syncthing.

Sigal is pretty simple to set up with Freedombox, I just shared the out put directory of Sigal.
Then I use Icrontab in order to proceed automaticaly the new photos:

/var/lib/syncthing/Photos/      IN_CREATE       ./home/pi/autosigal.sh

The goal of autosigal.sh is to not run many times Sigal at the same time and so kill my cheap Raspberry :

#!/bin/bash
# sigal_is_running = 0 : sigal is not running
# sigal_is_running = 1 : sigal is running
# sigal_is_running = 2 : sigal should be run again
cd /home/pi
source autosigal.txt

if [ "$sigal_is_running" = "0" ]; then
        renice 19 -p $$
        sigal_is_running=1
        echo "sigal_is_running=$sigal_is_running" > "autosigal.txt"
        sigal build ../../var/lib/syncthing/Photos/ sigal/
        source autosigal.txt
        while [ "$sigal_is_running" = "2" ]; do
                sigal_is_running=1
                echo "sigal_is_running=$sigal_is_running" > "autosigal.txt"
                sigal build ../../var/lib/syncthing/Photos/ sigal/
                source autosigal.txt
        done
        sigal_is_running=0
        echo "sigal_is_running=$sigal_is_running" > "autosigal.txt"

elif [ "$sigal_is_running" = "1" ]; then
        sigal_is_running=2
        echo "sigal_is_running=$sigal_is_running" > "autosigal.txt"
        echo "sigal_is_in_queue"
fi

Here a screenshot of the result:

On my Raspberry pi it takes ~80 seconds since I take a photo with my smartphone until I see the result on Freedombox.

For information, I use the theme photoswipe, the option medias_sort_reverse and the plugin ‘sigal.plugins.extended_caching’].

Since I use Syncthing for my music I was looking for similar as Sigal but for music, if anybody have some advice, let me know.

6 Likes

This is a very cool use case. Thanks for sharing it! I wish our team could integrate Sigal into the FreedomBox suite of apps, but it looks like Sigal is not available within Debian. If Debian packages for Sigal and its dependencies are ever created and accepted into Debian, then we could integrate this app into FreedomBox.

Still, your use case empowers other users to follow your example and install Sigal manually. Thanks again for sharing!

3 Likes

Thanks!
I have almost the exact same usecase, and was wondering how to set something up. Was considering a script (and cron) to update mediawiki or the static HTML, but I might just try this instead.

Im a complete noob wrt packages, but what would it take to get sigal into Debian? It seems the licensing should be compatible.

@haidar What about Media Goblin? I believe it is in the Debian packages already.

1 Like

@Gareth, all of Signal’s dependencies seem to have been packaged for Debian (except for one optional dependency). So, it should fairly straight forward to package Signal into Debian.

Also since sigal is a static site generator, you can also run it on your Desktop and then upload/sync the output to FreedomBox from where it will be served. Syncing can be done over SSH or a Samba folder. Web serving can be done by using the ‘Share’ app or the userdir feature. See manual for more info.

Media Goblin is currently in ‘experimental’ and not available for general use via ‘testing’ or ‘unstable’. I suppose it requires some testing and feedback to reach there.

2 Likes