Looking for the latest version? Download pv-0.99.tar.gz (25.3 kB)
Home
Name Modified Size Downloads / Week Status
Totals: 2 Items   5.8 kB
pv1 2008-05-05 11 weekly downloads
README.md 2012-09-19 5.8 kB 0

Photo Viewer (pv)

pv is a script used to share photo collectios over the Internet.

It is meant to be used where one has direct access to a web server and want an easy way to share photos.

I have been using this tool to manage my own photo collection for close to five years.

Feature Overview

pv sports the following features:

  • Does not need (make use) of a database. All meta data stored on flat files in the file system.
  • Bi-Lingual (English and Spanish)
  • Photos stored in the filesystem in original form. Web friendly views and thumbnails generated on the fly.
  • reasonably optimised. Can use {{SpeedyCGI}} for persistent perl interpreters. Also pictures are reformatted for reasonable web browsing speeds. Generated pictures are cached.

The main idea of pv is that users will keep all their pictures in their file system, and pv will on-the-fly generate web friendly views of their collection. This is why pv does not feature any interface to upload photos.

Requirements

The following components are required for pv to function:

  • A reasonable UNIX environment.
  • A web server with a {{CGI}} interface.
  • A way for you to access the file-system of the published web pages. (This is to upload pages).
  • A perl5 interpreter.
  • libjpeg for manipulating JPG files.
  • netpbm for creating PNG thumbnails.

For viewing:

  • A web browser with supporting {{frames}}.

Also the following Perl modules are used:

  • CGI
  • HTML::Entities
  • Digest::MD5
  • File::Basename
  • Socket

These are usually included in most installations.

Optionally, you may choose to install the [[http://search.cpan.org|CPAN]] module for [[http://search.cpan.org/dist/CGI-SpeedyCGI/|SpeedyCGI]].

Installation

Installation of pv should be straight forward.

  • Download a current pv distribution from http://pv0.sourceforge.net/.
  • untar the contents to a temporary directory.
  • Copy the directory {{pv-dat}} (and its contents) to your document root.
  • Upload your photos to the web server. Make sure that all files and directories are owned by the user that runs the web server.
  • Modify pv configuration settings (located at the beginning of the script) to suit your local preferences.
  • Copy the modified pv script to the {{cgi-bin}} directory of your web server.
  • Point your web browser to the pv cgi location.
  • Enjoy...

The following settings must be customised/configured:

  • {{$fpath}} Points to the location in the file-system where your photo collection is stored.
  • {{$cachedir}} This is where we store temporary files. Usually scaled down versions of the different photos.
  • {{$furl}} Points to the URL path where the photo collection is stored.
  • {{$home}} URL for your home page link.
  • {{$icon_url}}
  • {{$css_url}} URL path to where the {{pv-dat}} directory was copied to.
  • {{$icon_path}} file system path to where the {{pv-dat}} directory was copied to.
  • {{%admin_net}} IP networks that are allow to modify the photo colleciton.

The following settings are customisable:

  • {{$dft_lang}} Default language
  • {{%sup_langs}} Supported languages
  • {{$cols}}
  • {{$rows}} Number of pictures accross and down of thumbnail pictures in over views.
  • {{$delay}} Number of seconds to delay during slide shows.
  • {{@title}} Title to display
  • {{$prologue}}
  • {{$epilogue}} This is always sent at the beginning and the end of each {{HTML}} page. You can use this to customise the look and feel of the web application.

Using PV

Using pv should be quite straight forward. Point your browser to the pv cgi-bin URL and it should show a folder navigation tree on the left frame and the contents of the currrent folder on the right frame.

Clicking on the links on the left frame will open the respective folders. At the bottom of the tree you will see a home icon (which should bring you to your home page) and if in one of the trusted IP address an Edit link. This should switch to editing mode.

On the right frame you should see either thumbnails or actual pictures. Clicking on a thumbnail should switch to a picture view. Clicking on the picture during picture view will allow you to download the full resolution (original) version of the picture.

Edit Mode

Clicking on the Edit link on the left frame will turn-on edit mode. In this mode the left hand frame will show two or three more icons next to open folders. These icons will allow you to:

  • Change folder names, titles and subtitles in the supported languages.
  • Create new folders.
  • Delete empty folders. If there are files on a folder, you will not see this icon.

on the right frame, the thumbail view will allow you to:

  • Delete photos
  • Rotate left/right (these are JPEG lossless transformations).
  • Move pictures to different folders.

Clicking on a picture will allow you to view it. In this mode you may:

  • Change the image name.
  • Create a caption in any of the supported languages.
  • Move or delete.

License

pv is Copyright (C) 2003-2008 Alejandro Liu Ly

pv is released under the GNU General Public License.

pv is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

pv is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/

Source: README.md, updated 2012-09-19