Posts Tagged ‘pygmyfoto’
A Raspberry Pi-based server is perfectly capable of sharing photos on the Web. But instead of deploying Gallery, Piwigo, or any other heavyweight photo publishing application, you might want to opt for something nimble like Pygmyfoto that offers a straightforward way to publish photos as a continuous roll. The application allows you to give a brief description and assign tags for each published photo. In addition to that, Pygmyfoto automatically processes and displays key EXIF data (exposure, aperture, and ISO), adds a link to the full-size version of the photo, and generates a map URL. The latter lets you view the exact place where the photo was taken using the OpenStreetMap service (provided the photo has been geotagged). Pygmyfoto features a few creature comforts, including the search by tags functionality, rating capabilities, and simple view statistics.
The Pygmyfoto installation on Raspberry Pi consists of a few relatively simple steps. First of all, you need to install the required packages. To do this, run the following command on Raspberry Pi:
sudo apt-get install apache2 php5 sqlite3 php5-sqlite imagemagick libimage-exiftool-perl git
Switch then to the /var/www directory and clone Pygmyfoto’s GitHub repository:
sudo git clone https://github.com/dmpop/pygmyfoto.git
Use the sudo chown www-data:www-data -R pygmyfoto command to change the directory’s owner and group.
Switch to the pygmyfoto directory, open the phpliteadmin.config.php file in a text editor, and replace the default password by editing the $password = “admin”; line. Modify the default values in the config.php file, if necessary.
Add photos to the pygmyfoto/photos directory, run the ./pygmyfoto.sh command in the terminal, and provide the required info.
Point the browser to http://127.0.0.1/pygmyfoto (replace 127.0.0.1 with the actual IP address or domain name of your server) to access Pygmyfoto.
To access and manage the pygmyfoto.sqlite database, make it writable using the sudo chmod 600 pygmyfoto.sqlite command. Point then the browser to http://127.0.0.1/pygmyfoto/phpliteadmin.php and log in using the password specified in the phpliteadmin.config.php file.
Although I haven’t mentioned Pygmyfoto lately on this blog, I keep tinkering with the application in my spare time. So I thought I’d post a brief update on my progress.
- The most important news is that Pygmyfoto now can handle single quotes in titles and descriptions. I’m still trying to figure out how to implement escaping for quotes, though.
- The application now properly processes empty EXIF values (useful for publishing scanned images).
- Global settings have been moved to the separate config.php file, which makes it more convenient to tweak Pygmyfoto.
- As you can see from the screenshot, Pygmyfoto now features not a no-frills star rating system based on a simple PHP script.
- Pygmyfoto is now able to log basic visitor info (IP address, visited page, and date/time) in the ip.log file. You can think of it as a poor man’s web stats solution.
- Finally, I’ve added rudimentary support for RSS: the rss.php script automatically generates an RSS feed for Pygmyfoto. The script is far from perfect, but it’s a start.
As always, you can download the latest release of Pygmyfoto from the project’s GitHub repository. You might also want to drop by dmpop.homelinux.com/pygmyfoto to my own Pygmyfoto instance running on Raspberry Pi.
Besides minor tweaks and fixes, the latest release of Pygmyfoto features a couple of significant changes. The Python script that took care of processing photos and pushing data to the pygmyfoto.sqlite database has been replaced with a Bash shell script which does the job with less code. This means, among other things, that Pygmyfoto has fewer dependencies.
Version 1.3.7 also provides integration with OpenStreetMap. Geotagged photos can now be viewed on OpenStreetMap via a dedicated link.
Photos can now be easily published and unpublished using the dedicated links.
The new version of the application also does away with the Google+ button and adds a simple view counter. The source code and a neatly packaged archive containing the latest release of Pygmyfoto are available in the project’s GitHub repository. A demo of Pygmyfoto is available at dmpop.homelinux.com/pygmyfoto
Version 1.0 of Pygmyfoto, a no-frills application for publishing a photo roll on the web, is now available on GitHub. The first stable release features a handful of new features and improvements added since the latest beta version of the application. The older 1.2.3 version of jQuery bundled with the beta release has been replaced with jQuery 1.7.2. The jQuery lightBox plugin has been replaced with the Lightbox2 plugin. The pygmyfoto.py script features improved handling of EXIF metadata. Pygmyfoto now integrates the +1 button which can be used to share the published photos on Google+.
Probably the most important improvement in Pygmyfoto 1.0 is the addition of the auto-pygmyfoto.py script which automatically processes photos placed in the uploads directory. Using this script, combined with a cron job, you can publish photos by simply putting them into the uploads directory.
Pygmyfoto 1.0 and its latest source code is available in the project’s GitHub repository. A demo of the latest version of Pygmyfoto is available for your viewing pleasure at http://dmpop.homelinux.com/pygmyfoto/.
Besides a handful of interface tweaks, the current version of the application features several major improvements.
- A dedicated navigation menu makes it easier to move around Pygmyfoto.
- The application now uses the jQuery lightBox plugin to display photos. This offers a much better way to showcase your photographic masterpieces.
- A new search feature can be used to display photos that match a specific tag.
- Each photo now has a permalink which points to a separate photo page.
- The pygmyfoto.py processing script has better error handling, among other tweaks and improvements.
All key functionality has been implemented, so Pygmyfoto now enters the testing stage. A demo of the latest version of Pygmyfoto is available for your viewing pleasure, and you can grab the latest source code distribution from the project’s GitHub repository.
WordPress is an excellent platform for publishing photos on the web, but what if you don’t need all the bells and whistles it has to offer? Surprisingly, decent no-frills photo publishing applications are few and far between. After thorough research, I returned pretty much empty-handed, so I decided to hack something myself.
The result of my coding endeavors is still pretty crude, but it does the job with a minimum of fuss. At first sight, Pygmyfoto may look like a bare-bones photography blog application, but I prefer to think of it as a no-frills tool for publishing a photo roll on the web. As such, Pygmyfoto doesn’t have the features that are de rigueur of any decent blogging engine. There are no search capabilities, tagging is limited, there is no support for commenting or rating, there is no RSS feed, and all photos are presented as a single stream. In fact, Pygmyfoto is not even a pure webapp: it uses a simple SQLite database as its back end, and a couple of PHP scripts for rendering the photos and the accompanying info. Publishing photos (i.e., resizing them, adding title, description, tags, retrieving EXIF metadata etc.) is done using a relatively simple Python script. Another equally simple Python script lets you quickly archive and re-publish the photos. Data in the database that powers Pygmyfoto can be edited using an SQLite administration tool like the SQLite Manager add-on for Firefox or the phpLiteAdmin web-based tool (included with Pygmyfoto).
Pygmyfoto is not designed to replace a dedicated photography blog or gallery software. Instead, it offers a straightforward way to publish your photos as a continuous roll. Key EXIF data, such as exposure, aperture, focal length, and ISO are provided for each photo along with the link to its high resolution version.
The lack of embellishments means that, once deployed, Pygmyfoto requires practically no maintenance: you don’t have to moderate comments, manage users, remove spam, and perform other administrative chores (although you might want to back up Pygmyfoto’s files and databases regularly). The simplicity of Pygmyfoto’s overall design and its core components (Python and PHP scripts, an CSS file, and the SQLite database) mean that you can deconstruct, tweak, and improve the application even if your coding skills are not up to scratch.
A demo installation of the latest development version of Pygmyfoto is available on my server, so feel free to take a look at it. The source code is available in the project’s GitHub repository along with brief installation and usage instructions.