To streamline testing operations, I opted to move the theme-picker out of the pelican settings file.

With this setup, this script random_theme can be executed before building the site, as shown in the following example:

./random_theme ; make clean devserver

– Enjoy!