--- zoph-0.7.5.orig/bin/zophExport.pl +++ zoph-0.7.5/bin/zophExport.pl @@ -153,7 +153,7 @@ exit(1); } -print "zophExport.pl $version\n"; +print "zophExport $version\n"; # do it export(); @@ -168,8 +168,8 @@ # sub printUsage { print - "zophExport.pl $version\n" . - "Usage: zophExport.pl --dir --format zoph|album|bins [OPTIONS]\n" . + "zophExport $version\n" . + "Usage: zophExport --dir --format zoph|album|bins [OPTIONS]\n" . "OPTIONS:\n" . " --album ALBUM\n" . " --category CATEGORY\n" . --- zoph-0.7.5.orig/bin/zophImport.pl +++ zoph-0.7.5/bin/zophImport.pl @@ -228,8 +228,8 @@ # sub printUsage { print - "zophImport.pl $version\n" . - "Usage: zophImport.pl [OPTIONS] [IMAGE ...]\n" . + "zophImport $version\n" . + "Usage: zophImport [OPTIONS] [IMAGE ...]\n" . "OPTIONS:\n" . " --album ALBUM\n" . " --category CATEGORY\n" . --- zoph-0.7.5.orig/bin/zophrc.sample +++ zoph-0.7.5/bin/zophrc.sample @@ -10,13 +10,13 @@ $db_host = 'localhost'; # hostname or hostname:port $db_name = 'zoph'; $db_user = 'zoph_rw'; -$db_pass = 'pass'; +$db_pass = 'zoph_rw'; $db_prefix = 'zoph_'; # # set this to your image directory # -$image_dir = '/data/images/'; +$image_dir = '/var/lib/zoph/'; # # Change these to override default settings --- zoph-0.7.5.orig/php/css.php +++ zoph-0.7.5/php/css.php @@ -18,7 +18,7 @@ header("Content-Type: text/css"); if(isset($_GET['logged_on'])) { - require_once("config.inc.php"); + require_once("/etc/zoph/config.inc.php"); require_once("zoph_table.inc.php"); require_once("user.inc.php"); echo "/* This is the default CSS, the user is not logged on */"; --- zoph-0.7.5.orig/php/config.inc.php +++ zoph-0.7.5/php/config.inc.php @@ -21,7 +21,7 @@ define('DB_HOST', 'localhost'); define('DB_NAME', 'zoph'); define('DB_USER', 'zoph_rw'); - define('DB_PASS', 'pass'); + define('DB_PASS', 'zoph_rw'); define('DB_PREFIX', 'zoph_'); // prefix for tables, '' for none // Define how Zoph looks by choosing a stylesheet and iconset. @@ -29,7 +29,7 @@ define('ICONSET', 'default'); define('USE_IMAGE_SERVICE', 1); - define('IMAGE_DIR', "/data/images/"); + define('IMAGE_DIR', "/var/lib/zoph/"); // Only needed when imaga service is off: // define('WEB_IMAGE_DIR', "/images/"); // from webserver doc root @@ -135,10 +135,10 @@ define('MAX_UPLOAD', 10000000); // commands to use to expand uploaded archives. set to 0 to disable. - define('UNZIP_CMD', 0); - //define('UNZIP_CMD', 'unzip'); - define('UNTAR_CMD', 0); - //define('UNTAR_CMD', 'tar xvf'); + //define('UNZIP_CMD', 0); + define('UNZIP_CMD', 'unzip'); + //define('UNTAR_CMD', 0); + define('UNTAR_CMD', 'tar xvf'); // Enable downloading of a set of photos in a ZIP file. // Warning: the downloaded photos are NOT watermarked. @@ -178,7 +178,7 @@ // Maximum number of people that can be added to a photo at once. // Each user can set his own preference through the pref screen, with // The number below as max. - define('MAX_PEOPLE_SLOTS', 1); + define('MAX_PEOPLE_SLOTS', 10); define('THUMB_SIZE', 120); define('MID_SIZE', 480); --- zoph-0.7.5.orig/php/include.inc.php +++ zoph-0.7.5/php/include.inc.php @@ -18,7 +18,7 @@ require_once("variables.inc.php"); - require_once("config.inc.php"); + require_once("/etc/zoph/config.inc.php"); require_once("util.inc.php"); require_once("validator.inc.php"); --- zoph-0.7.5.orig/php/logon.php +++ zoph-0.7.5/php/logon.php @@ -15,7 +15,7 @@ * along with Zoph; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - require_once("config.inc.php"); + require_once("/etc/zoph/config.inc.php"); require_once("variables.inc.php"); if(isset($HTTP_GET_VARS["redirect"])) { $redirect = urlencode($HTTP_GET_VARS["redirect"]); --- zoph-0.7.5.orig/sql/zoph_update-0.8-sid.sql +++ zoph-0.7.5/sql/zoph_update-0.8-sid.sql @@ -0,0 +1,102 @@ +# +# Zoph 0.7 -> 0.8 update +# +# This file is part of Zoph. +# +# Zoph 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. +# +# Zoph 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 Zoph; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# +# As of version 0.7.1 I am planning to release a few interim "feature" releases +# between two 'major' (0.7 and 0.8) releases, to make the 'time to market' for +# a new release shorter. +# If you upgrade to 0.7.1, be prepared to comment the changes for 0.7.1 once +# you upgrade to 0.7.2 or 0.8. +# + +## done within sid 0.7.1-1 on Thu, 10 Apr 2008 (eb) +## +## Changes for 0.7.1 +## +# +#alter table zoph_users add column download char(1) NOT NULL DEFAULT '0' +# after import; +# +#alter table zoph_albums add column sortname char(32) +# after album_description; +#alter table zoph_categories add column sortname char(32) +# after category_description; +#alter table zoph_prefs add column child_sortorder +# enum('name', 'sortname', 'oldest', 'newest', +# 'first', 'last', 'lowest', 'highest', 'average') +# default 'sortname' after autothumb; + +# +# Changes for 0.7.2 +# + +CREATE TABLE zoph_pageset ( + pageset_id int(11) NOT NULL auto_increment, + title varchar(128), + show_orig enum('never', 'first', 'last', 'all') NOT NULL DEFAULT 'all', + orig_pos enum('top', 'bottom') NOT NULL DEFAULT 'top', + date datetime, + user int(11) , + timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (pageset_id)); + +CREATE TABLE zoph_pages ( + page_id int(11) NOT NULL auto_increment, + title varchar(128), + text blob, + date datetime, + timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (page_id)); + +CREATE TABLE zoph_pages_pageset ( + pageset_id int(11) NOT NULL, + page_id int(11) NOT NULL, + page_order int(5) unsigned ); + +ALTER TABLE zoph_albums + ADD COLUMN pageset int(11) DEFAULT NULL after coverphoto; + +ALTER TABLE zoph_categories + ADD COLUMN pageset int(11) DEFAULT NULL after coverphoto; + +ALTER TABLE zoph_places + ADD COLUMN pageset int(11) DEFAULT NULL after coverphoto; + +ALTER TABLE zoph_people + ADD COLUMN pageset int(11) DEFAULT NULL after coverphoto; + +# +# Changes for 0.7.3 +# +ALTER TABLE zoph_places ADD COLUMN lat float(10,6); +ALTER TABLE zoph_places ADD COLUMN lon float(10,6); +ALTER TABLE zoph_places ADD COLUMN mapzoom tinyint unsigned; + +ALTER TABLE zoph_photos ADD COLUMN lat float(10,6); +ALTER TABLE zoph_photos ADD COLUMN lon float(10,6); +ALTER TABLE zoph_photos ADD COLUMN mapzoom tinyint unsigned; + +ALTER TABLE zoph_photos ADD COLUMN time_corr smallint NOT NULL default 0 after time; +ALTER TABLE zoph_places ADD COLUMN timezone varchar(50) default NULL; + +# Change description from BLOB to TEXT +ALTER TABLE zoph_photos MODIFY COLUMN description TEXT; + +# Make title for albums and categories longer +ALTER TABLE zoph_albums MODIFY COLUMN album varchar(64) NOT NULL default ''; +ALTER TABLE zoph_categories MODIFY COLUMN category varchar(64) NOT NULL default ''; --- zoph-0.7.5.orig/debian/NEWS +++ zoph-0.7.5/debian/NEWS @@ -0,0 +1,19 @@ +zoph (0.7.3-1) unstable; urgency=low + + When upgrading from Etch to Lenny, follow the instructions in section "B:" + in README.Debian to update your database. + + -- Edelhard Becker Tue, 12 Aug 2008 22:57:48 +0200 + +zoph (0.4-3) unstable; urgency=low + + This release adds two new configuration options: db_host (which can be + host:port) and db_prefix (which is "zoph_" by default). + + If you update from any previous release, you must add both variables to your + local setup (i.e. your $HOME/.zophrc) and update your database by running + zoph_update-.sql, see /usr/share/doc/zoph/README.Debian for the + details. + + -- Edelhard Becker Mon, 23 Jan 2006 14:56:50 +0100 + --- zoph-0.7.5.orig/debian/README.Debian +++ zoph-0.7.5/debian/README.Debian @@ -0,0 +1,90 @@ + +zoph for Debian +--------------- + +For this debian package some paths and filenames were adjusted from the +upstream source. If you had never installed zoph before, goto A: First time +install. If you are upgrading from an older version or from a self-installed +upstream package, BACK YOUR MySQL DATABASE UP and go to B: or C: for upgrading +between stable releases or while running unstable. +Finally go to http://en.wikibooks.org/wiki/Zoph/Configuration to tweak any +new options introduced into zoph. + +A: First time install +===================== + + As root, after apt-get-installing the package, do the following steps: + + $ mysqladmin create zoph + $ mysql zoph < /usr/share/doc/zoph/zoph.sql + $ mysql + mysql> GRANT select, insert, update, delete ON zoph.* TO zoph_rw@localhost IDENTIFIED BY 'zoph_rw'; + mysql> GRANT all ON zoph.* TO zoph_admin@localhost IDENTIFIED BY 'zoph_admin'; + mysql> quit + + Each user that wants to use the zoph{Im,Ex}port scripts has to install a + .zophrc file with the database name and passwords. The file + /usr/share/doc/zoph/zophrc.sample contains the necessary statements with + the default passwords used in this README. Adjust the values as needed for + your installation and do a 'chmod 600 ~/.zophrc'. + + Point your browser to http://localhost/zoph/logon.php and login as user + 'admin', password 'admin' and follow the steps in the manual + http://localhost/doc/zoph/manual.html. + + Beware: this is a demo install and highly insecure. Everybody can access the + pictures under /var/lib/zoph and you use default passwords. To tighten the + system, change database and user passwords (see manual). You might even + create a dedicated zoph user who owns the image directory. + +B: Upgrading from Debian "Etch" (0.6-2.1etch1) to Debian "Lenny" +================================================================ + + B1: + --- + Backup your current zoph database: + + $ mysqldump -u zoph_admin --password=zoph_admin zoph > zoph-`date +%Y%m%d`.sql + + + B2: + --- + If you don't have an up to date backup of your MySQL databases, goto B1! + + Now update the database, first to 0.7, then to the 0.8prerelease + delivered with Lenny: + + $ mysql -u zoph_admin --password=zoph_admin zoph < /usr/share/doc/zoph/zoph_update-0.7.sql + $ mysql -u zoph_admin --password=zoph_admin zoph < /usr/share/doc/zoph/zoph_update-0.8.sql + + If you upgrade from any older version, run all mysql update scripts + sequentially. And finally make sure you have all the necessary settings in + your $HOME/.zophrc (see /usr/share/doc/zoph/zophrc.sample). + +C: Upgrading from previous unstable (0.7.1) +=========================================== + + If you don't have an up to date backup of your MySQL databases, goto B1! + + Now update the database: + + $ mysql -u zoph_admin --password=zoph_admin zoph < /usr/share/doc/zoph/zoph_update-0.8-sid.sql + +Upgrading from upstream sources to this Debian package +====================================================== + + Install/upgrade and edit the config variables you know from your initial + install. Remember these changes: + - zophImport.pl moved from /usr/local/bin/ to /usr/bin/zophImport + - zophExport.pl moved from /usr/local/bin/ to /usr/bin/zophExport + - the passwords and database name are stored in $HOME/.zophrc + - the config.inc.php moved to /etc/zoph/ + - and all the other php files are in /usr/share/zoph/ + If you are upgrading from an older release, refer to + http://localhost/doc/zoph/upgrading.html. + +Upstream docs +============= + +All zoph documentation is available on http://en.wikibooks.org/wiki/Zoph . + --- zoph-0.7.5.orig/debian/changelog +++ zoph-0.7.5/debian/changelog @@ -0,0 +1,272 @@ +zoph (0.7.5-1) unstable; urgency=low + + * new upstream release + * bumped standards to 3.8.1 (no changes needed) + * bumped dh compat to 7 (no changes needed) + * removed empty preinst/prerm (lintian warning) + * cleaned up dependencies to make it installable with all httpds that + support PHP (Closes: #514683) + * fixed lintian warnings about dh_clean -k and copyright + + -- Edelhard Becker Tue, 31 Mar 2009 17:48:03 +0200 + +zoph (0.7.3-2) unstable; urgency=low + + * remove "{..,..}" bashism from debian/rules (Closes: #495658) + + -- Edelhard Becker Fri, 22 Aug 2008 20:45:26 +0200 + +zoph (0.7.3-1) unstable; urgency=low + + * new upstream release + * updated README.Debian for the lenny release with instructions to upgrade + from etch + * add a paragraph to NEWS to remind stable users of database update + + -- Edelhard Becker Tue, 12 Aug 2008 23:00:14 +0200 + +zoph (0.7.1-2) unstable; urgency=low + + * really fix 417259 now (check for existence of wwwconfig-commen in remove + *and* purge part of postrm; Closes: #417259) + + -- Edelhard Becker Mon, 11 Aug 2008 13:27:26 +0200 + +zoph (0.7.1-1) unstable; urgency=low + + * new upstream release + * install missing javascript files (Closes: #473062) + * bumped standards to 3.7.3 (no changes needed) + * moved homepage from description to control field + * changed doc-base section to Data Management + + -- Edelhard Becker Thu, 10 Apr 2008 16:42:47 +0200 + +zoph (0.7.0.2-2) unstable; urgency=low + + * added patch from stable/etch addressing #417259: + Only call wwwconfig-common tools when they are actually still + installed, fixing possible problems when purging the package + after removal of wwwconfig-common. + Thanks Michael and Marc for NMU. + + -- Edelhard Becker Sun, 02 Sep 2007 10:22:49 +0200 + +zoph (0.7.0.2-1) unstable; urgency=low + + * new upstream release + * fixes SQL injection vulnerability CVE-2007-3905 (Closes: #435711) + + -- Edelhard Becker Sat, 01 Sep 2007 12:35:52 +0200 + +zoph (0.6-2) unstable; urgency=low + + * prefer apache2 over apache in Depends: and allow PHP5 (Closes: #376687) + + -- Edelhard Becker Tue, 26 Sep 2006 00:55:28 +0200 + +zoph (0.6-1) unstable; urgency=low + + * New upstream release + * USE_IMAGE_SERVICE is now 1 by default (Closes: #364054) + * added watch file + * updated to policy 3.7.2 (no changes needed) + * made package lintian-clean + * add php-pear to Suggests: (needed for mailing photos) + + -- Edelhard Becker Sun, 24 Sep 2006 17:31:22 +0200 + +zoph (0.5.1-1) unstable; urgency=low + + * New upstream release + + -- Edelhard Becker Mon, 13 Mar 2006 21:13:24 +0100 + +zoph (0.5-1) unstable; urgency=low + + * New upstream release + + -- Edelhard Becker Thu, 2 Mar 2006 14:18:18 +0100 + +zoph (0.4+0.5pre4-1) unstable; urgency=low + + * New upstream release + + -- Edelhard Becker Mon, 20 Feb 2006 21:28:58 +0100 + +zoph (0.4+0.5pre3-1) unstable; urgency=low + + * New upstream release + * upstream included our manpages + + -- Edelhard Becker Thu, 9 Feb 2006 20:30:17 +0100 + +zoph (0.4+0.5pre2-1) unstable; urgency=low + + * New upstream release + * bumped standards to 3.6.2 (no changes needed) + * updated man pages with upcoming return values and --help flag + * debian/control: changed dependency to + libapache-mod-php4 | libapache2-mod-php4 + + -- Edelhard Becker Wed, 25 Jan 2006 16:40:31 +0100 + +zoph (0.4+0.5pre1-1) unstable; urgency=low + + * New upstream release: + - more restrictive permissions (Closes: #326649) + - zophImport exits without changes to the database and image dir when any + of album/location/category/person does not exist (Closes: #284539) + - zophImport now has --copy and --verbose options that prevent surprises + about missing source images (Closes: #211312, #218491) + * php/css.php: added path /etc/zoph to config.inc.php + * removed language pack from package (it's included by upstream) and z.ps + + -- Edelhard Becker Wed, 25 Jan 2006 14:55:11 +0100 + +zoph (0.4-3) unstable; urgency=low + + * upload to unstable + * make NEWS.Debian more explicit about what do do + * README: s/actual/up to date/ + + -- Edelhard Becker Mon, 23 Jan 2006 14:56:50 +0100 + +zoph (0.4-2) experimental; urgency=low + + * debian/postinst: make changes for apache2 (apache-modconf is not available + and application configs are loaded via link in conf.d) + * debian/{control,copyright}: added Jeroen Roos to authors + + -- Edelhard Becker Tue, 22 Nov 2005 19:01:46 +0100 + +zoph (0.4-1) experimental; urgency=low + + * New upstream release (Closes: #339843) + * new configuration options db_host and db_prefix, see zophrc.sample + * added link to the new documentation wiki to the man pages and README and + updated the README + * debian/rules: added php/*.html + + -- Edelhard Becker Mon, 21 Nov 2005 01:41:40 +0100 + +zoph (0.3.3-14) unstable; urgency=low + + * Thomas Hardings scripts updated to V1.6 + + -- Edelhard Becker Tue, 16 Aug 2005 00:28:12 +0200 + +zoph (0.3.3-13) unstable; urgency=low + + * added /usr/share/doc/zoph/contrib directory with user supplied add-ons, + starting with Thomas Hardings bash interactive upload script + * cleaned lintian warnings (escape accented chars in zophExport.1, made + postinst bash script to allow bashisms, seperate user and group with ':' + in chown) + + -- Edelhard Becker Tue, 9 Aug 2005 17:04:28 +0200 + +zoph (0.3.3-12) unstable; urgency=low + + * removed dependency on mysql-server, thanks Matthias (Closes: #301857) + * added a note on how to enable the php4 mysql extension, thanks Bill for + #302285. + + -- Edelhard Becker Tue, 5 Apr 2005 01:29:32 +0200 + +zoph (0.3.3-11) unstable; urgency=low + + * replace jpegtran by exiftran as suggested by Brian May in a follow-up to + #284815 in the manpage, suggest exiftran in debian/control and add + --thumbnail description + * cleaned bashisms in post{inst,rm} + + -- Edelhard Becker Fri, 11 Feb 2005 01:35:00 +0100 + +zoph (0.3.3-10) unstable; urgency=low + + * command in post{inst,rm} made zoph uninstallable when apache2 is not found + on the system + + -- Edelhard Becker Wed, 15 Dec 2004 01:55:48 +0100 + +zoph (0.3.3-9) unstable; urgency=low + + * checked that it works with apache2 also, updated the Depends + (Closes: #220288) + * depend on virtual-mysql-server, remove dependency on mysql-common + (Closes: #282243) + * move the database name and passwords out of /usr/bin/zoph{Im,Ex}port and + read them from $HOME/.zophrc instead; provide a zophrc.sample to start + with and document the changes in README.Debian (Closes: #284543) + * zoph doesn't rotate images automagically when importing photos; document + Brian Mays solution for doing this afterwards (Closes: #284815, thanks + Brian for this tip and the other reports) + + -- Edelhard Becker Sun, 12 Dec 2004 22:52:35 +0100 + +zoph (0.3.3-8) unstable; urgency=low + + * really do the raise to optional + + -- Edelhard Becker Sun, 2 May 2004 20:02:03 +0200 + +zoph (0.3.3-7) unstable; urgency=low + + * added language pack zoph_lang-1.13.tar.gz into the package + * changed dependency from php4-gd2 to php4-gd (Closes: #243713) + * php4-gd is priority optional, so we can raise to optional again + * bumped standards to 3.6.1 (no changes) + + -- Edelhard Becker Sun, 2 May 2004 19:06:16 +0200 + +zoph (0.3.3-6) unstable; urgency=low + + * lowered priority since php4-gd2 is extra (policy Sec. 2.5) + + -- Edelhard Becker Fri, 24 Oct 2003 12:57:43 +0200 + +zoph (0.3.3-5) unstable; urgency=low + + * replaced inclusion of header.inc.php by 'print $rtplang->lang_header();' + as suggested by bug submitter Alexander Kogan, thanks Alexander; + (Closes: #216844) + + -- Edelhard Becker Thu, 23 Oct 2003 21:34:00 +0200 + +zoph (0.3.3-4) unstable; urgency=low + + * include header.inc.php from slideshow.php (Closes: #209309) + + -- Edelhard Becker Tue, 9 Sep 2003 15:39:22 +0200 + +zoph (0.3.3-3) unstable; urgency=low + + * changed maintainer to my debian account + * bumped standards to 3.6.0 (no changes) + * added language pack zoph_lang-1.12.tar.gz into the package + * added php4-gd2 dependency (Closes: #193992). + * removed the double UN???_CMD definitions from config.inc.php as reported + by Daniel Bonniot + * added Daniel's report upgrading from his own installation of 0.3.2 to the + README.Debian, thanks Daniel + * change owner of default image dir (/var/lib/zoph) to www-data.www-data + + -- Edelhard Becker Mon, 1 Sep 2003 16:28:24 +0200 + +zoph (0.3.3-2) unstable; urgency=low + + * improved documentation + * first upload (Closes: bug#176618). + + -- Edelhard Becker Wed, 26 Feb 2003 16:51:16 +0100 + +zoph (0.3.3-1) unstable; urgency=low + + * Initial Release. + * shuffled around some files and paths to make them more FHS/Debian like + * patched sources so initially there's a running demo (only the database has + to be created manually) + + -- Edelhard Becker Mon, 13 Jan 2003 21:38:46 +0100 + --- zoph-0.7.5.orig/debian/compat +++ zoph-0.7.5/debian/compat @@ -0,0 +1 @@ +7 --- zoph-0.7.5.orig/debian/control +++ zoph-0.7.5/debian/control @@ -0,0 +1,33 @@ +Source: zoph +Section: web +Priority: optional +Maintainer: Edelhard Becker +Build-Depends: debhelper (>= 7) +Standards-Version: 3.8.1 +Homepage: http://www.zoph.org/ + +Package: zoph +Architecture: all +Depends: apache2 | httpd, php5-mysql, php5-gd, wwwconfig-common, perl, libdbi-perl, libimage-size-perl, libdbd-mysql-perl, jhead, imagemagick, unzip +Suggests: exiftran, php-pear +Description: Web based digital image presentation and management system + "Zoph Organizes PHotos" is a web based photo management system written using + PHP and backed by MySQL, not just yet-another-web-album. + . + Database features: photos can have lots of meta data (EXIF info, title, + photographer, location, description, rating, people in the photo); each photo + can appear in zero or more albums; each photo can appear in zero or more + categories; albums and categories are both hierarchical; searches can be + performed using all this data; access privileges for each user. + . + Additional features: slideshows; lightboxes; "email this photo"; basic + reporting (most photographed people, places, etc.); user interface in several + languages. + . + Administration: photos, albums, categories, people, places and users can be + easily administered using the web interface; import photos from the web or by + using a Perl script; export photos to generate static galleries with album or + bins (both available as Debian packages). + . + Authors: Jason Geiger and Jeroen Roos + --- zoph-0.7.5.orig/debian/copyright +++ zoph-0.7.5/debian/copyright @@ -0,0 +1,51 @@ +This package was debianized by Edelhard Becker on Sun, 12 +Jan 2003 18:04:03 +0100, based on the work by Mark Cooper. + +It was downloaded from http://www.zoph.org/ + +Upstream Authors: Jason Geiger and + Jeroen Roos (zoph AT zoph DOT org) +Zoph is Copyright 2002-2007, Jason Geiger and Jeroen Roos + +Zoph makes use of the following packages, for which I thank their authors +for making available: + + HTML Mime Mail class by Richard Heyes + http://www.phpguru.org/mime.mail.html + + PHP Calendar class by David Wilkinson + http://www.cascade.org.uk/software/php/calendar/index.php + + Rycks Translation Project by Eric Seigne + http://cvs.rycks.com/cgi-bin/cvsweb/rtpclass/?cvsroot=RTP + + For a list of individuals who have contributed fixes, improvements or + translations, click on the 'about' tab within Zoph. + + +Copyright: from 0.4 on, zoph is licensed as GPL v2: + + You are free to distribute this software under the terms of the GNU General + Public License. On Debian systems, the complete text of the GNU General + Public License can be found in the file `/usr/share/common-licenses/GPL-2'. + +Up to version 0.3.3 zoph had the BSD license: + + Redistribution and use in source and binary forms, with or without + modification, are permitted under the terms of the BSD License. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +On Debian GNU/Linux systems, the complete text of the BSD License can be +found in `/usr/share/common-licenses/BSD'. + --- zoph-0.7.5.orig/debian/docs +++ zoph-0.7.5/debian/docs @@ -0,0 +1,5 @@ +docs/* +sql/* +contrib +debian/zophrc.sample +debian/contrib --- zoph-0.7.5.orig/debian/postinst +++ zoph-0.7.5/debian/postinst @@ -0,0 +1,104 @@ +#! /bin/bash +# postinst script for zoph +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# +# quoting from the policy: +# Any necessary prompting should almost always be confined to the +# post-installation script, and should be protected with a conditional +# so that unnecessary prompting doesn't happen if a package's +# installation fails and the `postinst' is called with `abort-upgrade', +# `abort-remove' or `abort-deconfigure'. + +case "$1" in + configure) + + set +e + dpkg -s apache2 > /dev/null 2>&1 + if [ "$?" = "0" ]; then + server=apache2 + else + server=apache + fi + set -e + + # apache-php needs apache-modconf which isn't available for apache2 + if [ "$server" = "apache" ] + then + # ensure php is enabled + phpver=php4 + phpini=/etc/php4/$server/php.ini + . /usr/share/wwwconfig-common/apache-php.sh + if [ "$status" = "uncomment" ] ; then + restart="$server $restart" + fi + fi + + # ensure php indexes are allowed + index=index.php + . /usr/share/wwwconfig-common/apache-index_all.sh + if [ "$status" = "added" ] ; then + restart="$server $restart" + fi + + if [ "$server" = "apache" ] + then + # include zoph directive into httpd.conf + includefile=/etc/zoph/apache.conf + . /usr/share/wwwconfig-common/apache-include_all.sh + if [ "$status" = "uncomment" -o "$status" = "include" ] ; then + restart="$server $restart" + fi + else + # apache2 uses files in conf.d + if [ ! -f /etc/apache2/conf.d/zoph ] + then + ln -s /etc/zoph/apache.conf /etc/apache2/conf.d/zoph + restart="$server $restart" + fi + fi + + # restart servers if necessary + servers="apache-ssl apache apache2" + . /usr/share/wwwconfig-common/restart.sh + + # change ownership of default image dir + chown www-data:www-data /var/lib/zoph + + # protect the passwords + chgrp www-data /etc/zoph/apache.conf /etc/zoph/config.inc.php + chmod 640 /etc/zoph/config.inc.php + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- zoph-0.7.5.orig/debian/postrm +++ zoph-0.7.5/debian/postrm @@ -0,0 +1,78 @@ +#! /bin/sh +# postrm script for zoph +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + set +e + dpkg -s apache2 > /dev/null 2>&1 + if [ "$?" = "0" ]; then + server=apache2 + else + server=apache + fi + set -e + includefile=/etc/zoph/apache.conf + case "$1" in + purge) + # remove zoph directives + if [ -r /usr/share/wwwconfig-common/apache-uninclude_all.sh ]; then + . /usr/share/wwwconfig-common/apache-uninclude_all.sh + if [ "$status" = "purge" ] ; then + restart="$restart $server" + fi + fi + ;; + remove) + # comment out zoph directives + if [ -r /usr/share/wwwconfig-common/apache-cominclude_all.sh ]; then + . /usr/share/wwwconfig-common/apache-cominclude_all.sh + if [ "$status" = "comment" ] ; then + restart="$restart $server" + fi + fi + ;; + esac + + # reistart servers if necessary + if [ -r /usr/share/wwwconfig-common/restart.sh ]; then + servers="apache-ssl apache apache2" + . /usr/share/wwwconfig-common/restart.sh + fi + + # remove zoph config if purging + if [ $1 = "purge" ] ; then + rm -rf /etc/zoph + fi + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- zoph-0.7.5.orig/debian/rules +++ zoph-0.7.5/debian/rules @@ -0,0 +1,77 @@ +#!/usr/bin/make -f +#export DH_VERBOSE=1 + +DESTDIR=$(CURDIR)/debian/zoph +BINDIR=$(DESTDIR)/usr/bin +CGIBINDIR=$(DESTDIR)/usr/share/zoph +IMAGEDIR=$(DESTDIR)/var/lib/zoph +CONFDIR=$(DESTDIR)/etc/zoph + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +clean: + dh_testdir + dh_testroot + dh_clean + rm -f man/zophImport.1 man/zophExport.1 + +build: + +install: + dh_testdir + dh_testroot + dh_prep + dh_installdirs + install -m 755 -d $(CONFDIR) + install -m 755 -d $(CGIBINDIR)/js $(CGIBINDIR)/lang $(BINDIR) + install -m 755 -d $(CGIBINDIR)/images/icons/default $(CGIBINDIR)/images/smileys + install -m 777 -d $(IMAGEDIR) + install -m 644 etc/zoph/apache.conf $(CONFDIR) + install -m 644 php/config.inc.php $(CONFDIR) + install -m 644 php/*.php $(CGIBINDIR) + install -m 644 php/*.html $(CGIBINDIR) + install -m 644 php/images/*.gif php/images/*.png $(CGIBINDIR)/images + install -m 644 php/images/icons/default/* $(CGIBINDIR)/images/icons/default + install -m 644 php/images/smileys/* $(CGIBINDIR)/images/smileys + install -m 644 php/js/* $(CGIBINDIR)/js + install -m 644 lang/* $(CGIBINDIR)/lang + install -m 644 bin/zophrc.sample $(CURDIR)/debian + rm -rf $(CGIBINDIR)/config.inc.php + install -m 755 bin/zophImport.pl $(BINDIR)/zophImport + install -m 755 bin/zophExport.pl $(BINDIR)/zophExport + +binary-arch: + +binary-indep: build install + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs + dh_installexamples +# dh_installmime + gunzip -cd man/zophImport.pl.1.gz > man/zophImport.1 + gunzip -cd man/zophExport.pl.1.gz > man/zophExport.1 + dh_installman man/zophImport.1 man/zophExport.1 +# dh_undocumented + dh_installchangelogs CHANGELOG +# dh_link +# dh_strip + dh_compress -X.sql + dh_fixperms + dh_installdeb + dh_perl + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep +.PHONY: clean build binary-indep install --- zoph-0.7.5.orig/debian/watch +++ zoph-0.7.5/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts="uversionmangle=s/pre/~pre/" \ + http://sf.net/zoph/ zoph-(.*)\.tar\.gz --- zoph-0.7.5.orig/debian/zoph.doc-base +++ zoph-0.7.5/debian/zoph.doc-base @@ -0,0 +1,11 @@ +Document: zoph +Title: Debian zoph documentation overview +Author: Edelhard Becker +Abstract: Zoph (Zoph Organizes PHotos) is not another web album but a web based + photo management system written using PHP and backed by MySQL. +Section: Data Management + +Format: HTML +Index: /usr/share/doc/zoph/index.html +Files: /usr/share/doc/zoph/*.html + --- zoph-0.7.5.orig/debian/zophrc.sample +++ zoph-0.7.5/debian/zophrc.sample @@ -0,0 +1,32 @@ +#----------------------------------------- +# Configuration file for Zoph +#----------------------------------------- +# +# Rename this file to .zophrc and place it in your home directory. +# +# All settings must match the settings with the same name in config.inc.php +# +# edit these to reflect your database +$db_host = 'localhost'; # hostname or hostname:port +$db_name = 'zoph'; +$db_user = 'zoph_rw'; +$db_pass = 'zoph_rw'; +$db_prefix = 'zoph_'; + +# +# set this to your image directory +# +$image_dir = '/var/lib/zoph/'; + +# +# Change these to override default settings +# (these settings do not have a matching setting in config.inc.php) +# +$datedDirs = 0; +$copy = 0; +$hierarchical = 0; +$verbose = 0; +$resolveSymlinks = 0; + +# Perl does not like it when this file ends with a "= 0" +1; --- zoph-0.7.5.orig/debian/contrib/load_photos/CHANGES +++ zoph-0.7.5/debian/contrib/load_photos/CHANGES @@ -0,0 +1,12 @@ +V1.6 2005/08/15 + - use qiv as window if --noroot option is given + - suppression of error message about .xvpics deletion + - display a more usefull help + - makefile for installation + +V1.5 2005/08/14 + - display only directories where the user can write + (assumes user have 'photo' group) + - rename photos to be copied safely in incoming directory + - rename photos to be safely imported in destination directory + --- zoph-0.7.5.orig/debian/contrib/load_photos/INSTALL +++ zoph-0.7.5/debian/contrib/load_photos/INSTALL @@ -0,0 +1,9 @@ + +su + +apt-get install qiv exiftran jhead gimp || urpmi qiv exiftran jhead gimp +make install +make addgrpphoto + +exit + --- zoph-0.7.5.orig/debian/contrib/load_photos/Makefile +++ zoph-0.7.5/debian/contrib/load_photos/Makefile @@ -0,0 +1,17 @@ + +all: + echo -e "targets:\n\tinstall\n\taddgrpphoto" + +install: + cp load_photos /usr/local/bin/ + chmod 755 /usr/local/bin/load_photos + cp {en,fr}_load_photos /usr/share/zoph/lang/ + mkdir /var/lib/zoph/incoming + groupadd photo + chgrp photo /var/lib/zoph + chmod g+sw /var/lib/zoph + groupmod -G photo www-data + +addgrpphoto: + chmod +x addgrpphoto.sh + ./addgrpphoto.sh --- zoph-0.7.5.orig/debian/contrib/load_photos/_README +++ zoph-0.7.5/debian/contrib/load_photos/_README @@ -0,0 +1,17 @@ + load_photos is a bash interactive front-end to zophImport, the photo + loader of zoph, web based photos album. + + + It permit to everyone to load photos in the family album, as so as + to use all zophImport options. + + load_photos use qiv to display images, exiftran to fix them as portrait, + jhead to extract and keep exif informations, gimp to tidy photos, + at to make in backround the (so) long importation work. + + load_photos is I10n (Internationalized) in, at time, + (I think bad) English and French. + + syntax: load_photos --help + + installation: see INSTALL --- zoph-0.7.5.orig/debian/contrib/load_photos/addgrpphoto.sh +++ zoph-0.7.5/debian/contrib/load_photos/addgrpphoto.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +for i in `awk -F\: '{print $1":"$3}' /etc/passwd | + grep -e ':\(\(|1|2\)[0-9][0-9][0-9][0-9]$\|[1-9][0-9][0-9][0-9]$\)' | + awk -F: '{print $1}'` +do + usermod -G `groups $i | sed -e 's/[[:print:]]*: //;s/ /,/g'`,photo $i +done --- zoph-0.7.5.orig/debian/contrib/load_photos/copyright +++ zoph-0.7.5/debian/contrib/load_photos/copyright @@ -0,0 +1,16 @@ +Added to the zoph package by Edelhard Becker +on Tue, 09 Aug 2005 16:07:46 +0200 + +It was downloaded from http://tom.harding.free.fr/downloads/ + +Upstream Author: Thomas Harding + +Copyright: Thomas Harding + + This program 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; version 2 dated June, 1991. + +On Debian GNU/Linux systems, the complete text of the GNU General Public +License can be found in the `/usr/share/common-licenses' directory. + --- zoph-0.7.5.orig/debian/contrib/load_photos/en_load_photos +++ zoph-0.7.5/debian/contrib/load_photos/en_load_photos @@ -0,0 +1,24 @@ +# Set to your language... +OTHER='Other' +ALBUM_MSG="Select album" +ALBUM_TYPE_MSG="Type the name of the album" +CATEGORY_MSG="Select category" +CATEGORY_TYPE_MSG="Type the name of the category" +DIRECTORY_MSG="Select directory" +DIRECTORY_TYPE_MSG="Type the name of directory" +DIRECTORY_INSANE_MSG="Cannot create directory with spaces." +USE_DATEDIRS_MSG="file photos by date ? [Y/n]" +ROTATE_MSG="rotate ? [y/N]" +KEEP_MSG="keep ? [Y/n]" +WORK="job " +MAIL_MSG="A message will be sent to you as work will be finished:\n1dot per photo\nDO NOT SWITCH OFF COMPUTER BEFORE HAVE RECEIPT THE MESSAGE" +MAIL="Message from load_photos: " +MAIL2="Photos loaded!" +NO_EXIF_DATE_MSG="No date information in exif tags,\ +images will be not file by date." +DATE_MSG="date:" +ADD_COMMENT_MSG="Would you add a comment? [N/d=>default/comment]\\nDefault : " +DATE_OF_PHOTO_MSG="(photo date)" +EDIT_MSG="Tidy photo ?" + + --- zoph-0.7.5.orig/debian/contrib/load_photos/fr_load_photos +++ zoph-0.7.5/debian/contrib/load_photos/fr_load_photos @@ -0,0 +1,23 @@ +# Set to your language... +OTHER='Autre' +ALBUM_MSG="Sélectionnez l'album" +ALBUM_TYPE_MSG="Tapez le nom de l'album" +CATEGORY_MSG="Sélectionnez la catégorie" +CATEGORY_TYPE_MSG="Tapez le nom de la catégorie" +DIRECTORY_MSG="Sélectionnez le répertoire" +DIRECTORY_TYPE_MSG="Tapez le nom du répertoire" +DIRECTORY_INSANE_MSG="Refus de créer un répertoire avec des espaces." +USE_DATEDIRS_MSG="Classer les photos par date ?[Y/n]" +ROTATE_MSG="Passer en portrait ?[y/N]" +KEEP_MSG="Conserver ?[Y/n]" +WORK="travail " +MAIL_MSG="Un message sera envoyé à la fin du travail :\n un point par photo\nNE COUPEZ PAS L'ORDINATEUR AVANT D'AVOIR RECU LE MESSAGE" +MAIL="message de charge_photos : " +MAIL2="Photos chargées !" +NO_EXIF_DATE_MSG="Pas d'information de date dans les champs exif,\ +les images ne seront pas classées par date." +DATE_MSG="date :" +ADD_COMMENT_MSG="Voulez-vous ajouter un commentaire ?[N/d=>defaut/commentaire]\\nDéfaut : " +DATE_OF_PHOTO_MSG="(date de la photo)" +EDIT_MSG="Retoucher la photo?" +NO_PHOTO_MSG="Il n'y a pas de photos à charger" --- zoph-0.7.5.orig/debian/contrib/load_photos/index.html +++ zoph-0.7.5/debian/contrib/load_photos/index.html @@ -0,0 +1,43 @@ + + + + Index of /downloads/load_photos + + +

Index of /downloads/load_photos

+
      Name                    Last modified       Size  Description
+
+[DIR] Parent Directory 15-Aug-2005 14:32 - +[   ] CHANGES 15-Aug-2005 22:10 1k +[   ] INSTALL 15-Aug-2005 22:20 1k +[   ] LICENSE 15-Aug-2005 13:58 18k +[   ] Makefile 15-Aug-2005 22:20 1k +[   ] _README 15-Aug-2005 13:58 1k +[TXT] addgrpphoto.sh 15-Aug-2005 22:10 1k +[   ] en_load_photos 15-Aug-2005 13:58 1k +[   ] fr_load_photos 15-Aug-2005 22:35 1k +[   ] load_photos 15-Aug-2005 23:39 14k +[   ] load_photos_V1.4 15-Aug-2005 13:58 11k +[   ] load_photos_V1.5 15-Aug-2005 13:58 12k +[   ] load_photos_V1.6 15-Aug-2005 23:39 14k +

+
+	load_photos is a bash interactive front-end to zophImport, the photo
+	loader of zoph, web based photos album.
+	<URL:http://zoph.sourceforge.net/demo/zoph.php>
+	
+	It permit to everyone to load photos in the family album, as so as
+	to use all zophImport options.
+	
+	load_photos use qiv to display images, exiftran to fix them as portrait,
+	jhead to extract and keep exif informations, gimp to tidy photos,
+	at to make in backround the (so) long importation work.
+
+	load_photos is I10n (Internationalized) in, at time, 
+	(I think bad) English and French.
+
+	syntax: load_photos --help
+	
+	installation: see INSTALL
+
+ --- zoph-0.7.5.orig/debian/contrib/load_photos/load_photos +++ zoph-0.7.5/debian/contrib/load_photos/load_photos @@ -0,0 +1,585 @@ +#!/bin/bash + +#V 1.6 +# front-end to zophImport +# Copyright (C) 2005, Thomas HARDING. thomas.harding@laposte.net +# +# This program 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. +# +# This program 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, write to the Free Software +# +# + +############ +# +# CONFIG +# +PHOTOS_ROOT=/var/lib/zoph +ZOPH_PASSWD='zoph_rw' +ZOPH_DB='zoph' +PHOTO_EDITOR="gimp" +LANGUAGE_PATH=/usr/share/zoph/lang +if [ -d /mnt/removable ] ; then + MOUNT_POINT="/mnt/removable" +else + MOUNT_POINT='/usbdisk' +fi + +# +# messages +# +OTHER='Other' +ALBUM_MSG="Select album" +ALBUM_TYPE_MSG="Type the name of the album" +CATEGORY_MSG="Select category" +CATEGORY_TYPE_MSG="Type the name of the category" +DIRECTORY_MSG="Select directory" +DIRECTORY_TYPE_MSG="Type the name of directory" +DIRECTORY_INSANE_MSG="Cannot create directory with spaces." +USE_DATEDIRS_MSG="file photos by date? [Y/n]" +ROTATE_MSG="rotate? [y/N]" +KEEP_MSG="keep? [Y/n]" +WORK="job " +MAIL_MSG="A message will be sent to you as work will be finished:\n1dot per photo\nDO NOT SWITCH OFF COMPUTER BEFORE HAVE RECEIPT THE MESSAGE" +MAIL="Message from load_photos: " +MAIL2="Photos loaded!" +NO_EXIF_DATE_MSG="No date information in exif tags,\ +images will be not file by date." +DATE_MSG="date:" +ADD_COMMENT_MSG="Would you add a comment? [N/d=>default/comment]\\nDefault : " +DATE_OF_PHOTO_MSG="(photo date)" +EDIT_MSG="Tidy photo?" +NO_PHOTO_MSG="There is no photo to load" + +############# +# +# PROGRAM +# + +# +# set messages language +# +LANGUAGE=$( echo $LANG | awk -F_ '{ print $1 }') +if [[ "$LANGUAGE" != en ]] ; then + if [ -f $LANGUAGE_PATH/${LANGUAGE}_load_photos ] ; then + . $LANGUAGE_PATH/${LANGUAGE}_load_photos + fi +fi + +# +# load personal settings +# + +if [ -f ~/.load_photos ] ; then + . ~/.load_photos +fi + + +# +# load arguments from command line +# +i=0 +IFS='\' +until [ -z "$1" ] +do + case $1 in + -h|--help) +cat <<-END + +USAGE + +$(basename $0) [--nodatedDirs][--noload][--nopath][--nocomment] + [--nocontrol][--noroot][--comment "Blah blah"] + [-zophImport_Option \"blah blah\"][-other-option][...] + + --nodatedDirs causes photos will be not filed by date + + --noload will only load photos presents in + /var/lib/zoph/incoming + + --nopath photos will be let in place + + --nocomment no comment in jpeg comment section + + --nocontrol photos will not be displayed, all photos + will be load + + --noroot photos will be displayed in a window instead + of root window (not it can be harmfull, + depending of your focus setting) + + --comment type your comment yourself, no question about + it will be dispalayed + + other options : all options of zophImport, + see zophImport manpage + +FILES + /usr/share/zoph/lang/lc_load_photos (lc is your language code) + ~/.load_photos : personal settings + + +END + exit 0 ;; + --datedDirs) DATEDIR="$1" + shift ;; + --nodatedDirs) NODATEDIRS=1 + shift ;; + --noload) NOLOAD=1 + shift ;; + --nopath) NOPATH=1 + shift ;; + --noroot) NOROOT=1 + shift ;; + --nocomment) DISABLE_COMMENT=1 + shift ;; + --comment) COMMENT="$2" + shift 2 ;; + --nocontrol) NOCONTROL=1 + shift ;; + --photographer) PHOTOGRAPHER=1 + OPTS[$i]="$1" + PHOTOGRAPHER_C="$2" + (( i += 1 )) + shift ;; + --category) OPTS[$i]="$1" + # fix quotes for mysql + CATEGORY_SANE=$( echo $2 | sed -e "s/'/\\\\'/g" ) + (( i += 1 )) + CATEGORY_FILLED="1" + shift ;; + --album) OPTS[$i]="$1" + ALBUM_SANE=$( echo $2 | sed -e "s/'/\\\\'/g" ) + (( i += 1 )) + ALBUM_FILLED="1" + shift ;; + --path) OPTS[$i]="$1" + OPTS[$(( i += 1 ))]="$2" + INDEX=$i + DIRECTORY="$2" + (( i += 1 )) + DIRECTORY_FILLED="1" + shift 2 ;; + + -*) OPTS[$i]="$1" ; (( i += 1 )) ; shift ;; + + *) #fix quotes to pass argument through "at", + #whish trigger off a shell + OPTS[$i]=$( echo "$1" | sed -e 's/\"/\\\"/g' ) + OPTS[$i]="\"${OPTS[$i]}\"" ; + (( i += 1 )) ; shift ;; + esac +done + + + +IFS=" +" +if [[ $DATEDIR == '' && $NODATEDIRS == '' ]];then +echo "$USE_DATEDIRS_MSG" +read i +echo ${i:=y} > /dev/null +if [[ $i == y ]]; then DATEDIR='--datedDirs'; fi +fi + +# +#Select album +# +if [[ $ALBUM_FILLED != 1 ]] ; then + k="0" + ALBUMS[$k]="INIT" + k=1 + while [[ ${ALBUMS[$(( k - 1 ))]} != '' ]];do + ALBUMS[$k]=$(echo "SELECT album FROM albums + WHERE album NOT IN ('Album Root') + LIMIT ${k},1" | + mysql -uzoph_rw -p$ZOPH_PASSWD $ZOPH_DB | + sed -e '1d;' + ) + (( k += 1 )) + done + ALBUMS[$(( k - 1))]=$OTHER + unset ALBUMS[0] + unset ALBUMS[$k] + + echo $ALBUM_MSG + select ALBUM in ${ALBUMS[@]} ; do + if [[ $ALBUM != '' ]]; then break; fi + done + ALBUM[1]=$ALBUM + if [[ ${ALBUM[1]} == $OTHER ]]; then + echo $ALBUM_TYPE_MSG + read ALBUM[1] + fi + + ALBUM[1]="\"$(echo ${ALBUM[1]} | sed -e 's/"/\\\"/g')\"" + ALBUM[0]="--album" + echo ${ALBUM[@]} +fi +unset k + +if [ -z "$ALBUM_SANE" ] ; then + ALBUM_SANE=$( echo ${ALBUM[1]} | sed -e "s/'/\\\\'/g;s/^\"//;s/\"$//;" ) +fi + + +#create album if not exists, and you have typed only one +if [[ $(echo $ALBUM_SANE | grep -E ',' -) == '' ]] ; then + EXIST_ALBUM=$(echo "SELECT album FROM albums WHERE album = '$ALBUM_SANE'" | + mysql -uzoph_rw $ZOPH_DB -p$ZOPH_PASSWD ) + + if [[ $EXIST_ALBUM == '' ]]; then + echo "Create album $ALBUM_SANE" + echo "INSERT INTO albums (album,parent_album_id) VALUES ('$ALBUM_SANE',1)" | + mysql -uzoph_rw $ZOPH_DB -p$ZOPH_PASSWD +fi +fi + +# +#select Category +# +if [[ $CATEGORY_FILLED != 1 ]] ; then + k="0" + CATEGORIES[$k]="INIT" + k=1 + while [[ ${CATEGORIES[$(( k - 1 ))]} != '' ]];do + CATEGORIES[$k]=$(echo "SELECT category FROM categories + LIMIT ${k},1" | + mysql -uzoph_rw -p$ZOPH_PASSWD $ZOPH_DB | + sed -e '1d;') + (( k += 1 )) + done + CATEGORIES[$(( k - 1))]=$OTHER + unset CATEGORIES[0] + unset CATEGORIES[$k] + + echo $CATEGORY_MSG + + select CATEGORY in "${CATEGORIES[@]}"; do + if [[ $CATEGORY != '' ]] ; then break ; fi + done + + CATEGORY[1]=$CATEGORY + if [[ ${CATEGORY[1]} == $OTHER ]] ; then + echo $CATEGORY_TYPE_MSG + read CATEGORY[1] + fi + + CATEGORY[1]="\"$(echo $CATEGORY | sed -e 's/"/\\\"/g')\"" + CATEGORY[0]="--category" + echo ${CATEGORY[@]} +fi +unset k +if [ -z "$CATEGORY_SANE" ] ; then + CATEGORY_SANE=$( echo ${CATEGORY[1]} | sed -e "s/'/\\\\'/g;s/^\"//;s/\"$//;" ) +fi + +#Create category if you have typed only one +if [[ $(echo $CATEGORY_SANE | grep -E ',' -) == '' ]] ; then + EXIST_CATEGORY=$(echo "SELECT category FROM categories + WHERE category = '$CATEGORY_SANE'" | + mysql -uzoph_rw $ZOPH_DB -p$ZOPH_PASSWD) + + if [[ $EXIST_CATEGORY == '' ]]; then + echo "Create Category $CATEGORY_SANE" + echo "INSERT INTO categories (category,parent_category_id) + VALUES ('$CATEGORY_SANE',1)" | mysql -uzoph_rw $ZOPH_DB -p$ZOPH_PASSWD + fi +fi + +cd $PHOTOS_ROOT + +# +#Fill directory name +# +if [[ $DIRECTORY_FILLED != 1 && $NOPATH != 1 ]]; then + FIND_CMD="find . -type d -group photo -perm -770 -o -type d -uid $UID" + DIRECTORIES="$( $FIND_CMD | sed -e 's/^\.\///; + s/.*mid//; + s/.*thumb//; + s/.*incoming.*//; + s/.*[0-9]\{1,4\}.[0-9]\{1,2\}.[0-9]\{1,2\}//; + s/^\.$//; + s/lost+found//;') $OTHER" + + echo $DIRECTORY_MSG + + select DIRECTORY in $DIRECTORIES; do + if [[ $DIRECTORY != '' ]] ; then break ; fi + done + DIRECTORY[1]=$DIRECTORY + if [[ ${DIRECTORY[1]} == $OTHER ]] ; then + # Ask directory name while it contains spaces + SANE=1 + while [[ $SANE != 0 ]]; do + echo $DIRECTORY_TYPE_MSG + read DIRECTORY[1] + if [[ $(echo ${DIRECTORY[1]} | grep -E '(\ |\t)' -) == '' ]] ; then + SANE=0 + else + echo $DIRECTORY_INSANE_MSG + fi + done + + fi + DIRECTORY[0]="--path" + echo ${DIRECTORY[@]} +elif [[ $NOPATH != 1 ]]; then + if [[ $(echo ${OPTS[$INDEX]} | grep -E '(\ |\t|\n)' -) == '' ]] ; then + SANE=1 + while [[ $SANE != 0 ]]; do + echo $DIRECTORY_TYPE_MSG + read OPTS[$INDEX] + if [[ $(echo ${OPTS[$INDEX]} | grep -E '(\ |\t|\n)' -) == '' ]] ; then + SANE=0 + DIRECTORY[1]=${OPTS[$INDEX]} + else + echo $DIRECTORY_INSANE_MSG + fi + done + fi + DIRECTORY[0]="--path" +fi + +#make directory +UMASK=$(umask) +umask 0002 +mkdir -p ${DIRECTORY[1]} +umask $UMASK + +# +#fill photographer name +# +if [[ $PHOTOGRAPHER != 1 ]];then + PHOTOGRAPHER_C="$( awk -F: {'print $3":"$5'} /etc/passwd | + grep -e "^$UID:" | + awk -F: '{ print $2 }' | + awk -F, '{ print $1 }' )" + PHOTOGRAPHER[1]="\"${PHOTOGRAPHER_C}\"" + PHOTOGRAPHER[0]="--photographer" +echo ${PHOTOGRAPHER[@]} +fi + +# +#fill comment +# +if [[ -z "$COMMENT" && -z "$DISABLE_COMMENT" ]] ; then + echo -ne $ADD_COMMENT_MSG "© ${PHOTOGRAPHER_C}, $(date +%Y) $DATE_OF_PHOTO_MSG\n" + read COMMENT + case $COMMENT in + d) COMMENT="© ${PHOTOGRAPHER_C}, $(date +%Y) " ;; + n|"") DISABLE_COMMENT=1 ;; + *) true ;; + esac +fi + +# +#copy and control photos, rotate if needed, edit if needed, unset --datedDirs if needed +# + +if [[ -z "$NOLOAD" ]] ; then + + #mount the camera + if [[ "$(mount | grep $MOUNT_POINT)" == '' ]]; then + mount $MOUNT_POINT || { echo "L'appareil n'est pas branché" && exit 1 ;} + fi + + FILES=$( find $MOUNT_POINT -type f -name '*.jpg' -o -name '*.JPG' ) + + i=0 + while [[ "$(ls -d incoming/$i 2>/dev/null)" == "incoming/$i" ]]; do + (( i += 1 )) + done + #create an incoming directory as needed + UMASK=$(umask) + umask 0002 + mkdir -p incoming/$i 2>/dev/null + umask $UMASK + DIRDEST=incoming/$i/ + #copy safely photos in incoming directory + o=0 + for j in $FILES ; do + SUFFIX=$(basename $j) + SUFFIX=${SUFFIX/[^.]*./.} + + l=(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) + m=0 + for p in ${VERIFY[@]} ; do + q=$( basename $j ) + if [[ $p == $q ]] ; then + k=${DIRDEST}${q/${SUFFIX}/}${l[$m]}${n}$SUFFIX + (( m += 1 )) + if [[ $m == 25 ]] ; then + (( n += 1 )) + m=0 + fi + fi + done + VERIFY[$o]=$( basename $j ) + (( o += 1 )) + echo ${k:=${DIRDEST}} > /dev/null + echo -n . + cp $j $k + unset n + unset k + + done +echo -ne "\n" + + DIR=incoming/$i/ + + #umount the camera + umount $MOUNT_POINT +else + DIR="incoming/" +fi + + + +for j in $(ls $DIR) ; do + + if [ -x "$( which jhead )" ]; then + EXIFTAGDATE=$(jhead ${DIR}$j | + grep -E "Date/Time" | + awk -F: '{ print $2":"$3":"$4":"$5":"$6 }' | + sed -e 's/^[[:space:]]*//;s/[[:space:]]/-/g') + echo "$j - $DATE_MSG $EXIFTAGDATE" + if [ -z $EXIFTAGDATE ] ; then + echo "$NO_EXIF_DATE_MSG" ; DATEDIR='' + if [ -z $DISABLE_COMMENT ]; then + exiftran -ic "${COMMENT} $(date "+%Y:%m:%d-%T")" ${DIR}$j 2>/dev/null + fi + else + if [ -z "$DISABLE_COMMENT" ]; then + exiftran -ic "${COMMENT} $EXIFTAGDATE" ${DIR}$j 2>/dev/null + fi + fi + fi +done + + +# rename photos to be imported safely +for j in $(ls $DIR) ; do + + SUFFIX=$(basename $j) + SUFFIX=${SUFFIX/[^.]*./.} + + k=$j + l=(a b c d e f g h i j k l m n o p q r s t u v w x y z) + m=0 + DATE=$(jhead ${DIR}/${j} | grep "Date/Time" |\ + awk -F: '{print $2 "." $3 "." $4 }' | awk '{print $1}') + if [ -n $DATEDIR ]; then + echo -ne "${DATE}\t" + while [ -f ${DIRECTORY[1]}/${DATE}/$k ] ; do + mv ${DIR}/$k ${DIR}/${j/${SUFFIX}/}${l[$m]}${n}$SUFFIX + k=${j/.jpg/}${l[$m]}$n.jpg + (( m += 1 )) + if [[ $m == 25 ]] ; then + (( n += 1 )) + m=0 + fi + + done + j=$k + else + while [ -f ${DIRECTORY[1]}/$k ] ; do + mv ${DIR}$k ${DIR}${j/${SUFFIX}/}${l[$m]}${n}$SUFFIX + k=${j/.jpg/}${l[$m]}.jpg + (( m += 1 )) + if [[ $m == 25 ]] ; then + (( n += 1 )) + m=0 + fi + + done + j=$k + fi + unset n + +#display, rotate, edit photo + if [ -z "$NOCONTROL" ] ; then + if [[ $NOROOT == 1 ]] ; then + qiv -w 400 -scale_down -e $DIR/$j & + else + qiv -x -m $DIR/$j + fi + echo $j + echo $KEEP_MSG + unset KEEP + read KEEP + echo ${KEEP:=y} >/dev/null + if [[ $KEEP == 'n' ]]; then + rm ${DIR}$j + killall qiv 2>/dev/null + else + + echo $ROTATE_MSG + unset ROTATE + read ROTATE + killall qiv 2>/dev/null + echo ${ROTATE:=n} > /dev/null + if [[ $ROTATE == 'y' ]]; then + exiftran -ip2 ${DIR}$j 2>/dev/null + if [[ $NOROOT == 1 ]] ; then + qiv -w 400 -scale_down -e $DIR/$j & + else + qiv -x -m $DIR/$j + fi + fi + echo $EDIT_MSG + unset EDIT + read EDIT + killall qiv 2>/dev/null + echo ${EDIT:=n} > /dev/null + if [[ $EDIT != n ]] ; then + cp ${DIR}$j ${DIR}${j}.save + $PHOTO_EDITOR ${DIR}$j + jhead -te ${DIR}${j}.save ${DIR}$j + rm ${DIR}${j}.save + fi + fi + fi + +done + + +# +# execute zophImport via "at", to let the user quit immediately +# +if [[ -n $(ls ${PHOTOS_ROOT}/${DIR}) ]] ; then +IFS='\' +echo umask 0002 \; \ +echo -n $MAIL \; \ +zophImport "${OPTS[@]} ${ALBUM[@]} ${CATEGORY[@]} ${DIRECTORY[@]} ${PHOTOGRAPHER[@]}" \ + $DATEDIR ${PHOTOS_ROOT}/${DIR}* \; \ +if [ -d ${PHOTOS_ROOT}/${DIR}.xvpics ] \; then \ +rm -r ${PHOTOS_ROOT}/${DIR}.xvpics \; \ +fi \; \ +if [ "$DIR" != "incoming/" ] \; then \ +rmdir ${PHOTOS_ROOT}/$DIR \; \ +fi \; \ +echo $MAIL2 | +at now + 1 minutes 2>/dev/null +IFS=' +' +# +# display work message +# +clear +echo -n $WORK +atq +echo -e $MAIL_MSG + +else + echo $NO_PHOTO_MSG +fi --- zoph-0.7.5.orig/etc/zoph/apache.conf +++ zoph-0.7.5/etc/zoph/apache.conf @@ -0,0 +1,8 @@ + +Alias /zoph /usr/share/zoph + + + Options FollowSymLinks + AllowOverride Limit Options FileInfo + + --- zoph-0.7.5.orig/docs/index.html +++ zoph-0.7.5/docs/index.html @@ -16,6 +16,7 @@

Table of Contents

    +
  1. README.Debian --- Debian specific instructions
  2. Requirements
  3. Installation
  4. Configuration
  5. --- zoph-0.7.5.orig/docs/configuration.html +++ zoph-0.7.5/docs/configuration.html @@ -402,7 +402,7 @@

    Zoph automatically creates thumbnails and medium sized ('mid') images during import. To influence this proces, you can edit the following parameters:

    Important!
    -
    +

    The options in this section have a matching setting in ZophImport. These have to be set the same.

    The options in this section have a matching setting in ZophImport.pl. These have to be set the same.

    @@ -494,7 +494,7 @@ Versions: 0.3 and later -Description: Convert thumbnails to JPEGs. This setting should match what is in zophImporter.pl. If you are installing Zoph for the first time, it is recommend to set this to 0 and change zophImport.pl accordingly. If you are upgrading, see the Zoph/Upgrading#Zoph_0.2.1_-.3E_0.3_Upgrade for more information about this. +Description: Convert thumbnails to JPEGs. This setting should match what is in zophImport. If you are installing Zoph for the first time, it is recommend to set this to 0 and change zophImport accordingly. If you are upgrading, see the Zoph/Upgrading#Zoph_0.2.1_-.3E_0.3_Upgrade for more information about this. Default: 1 @@ -530,7 +530,7 @@

    Database configuration

    Important!
    -
    +

    The options in this section have a matching setting in ZophImport. These have to be set the same.

    The options in this section have a matching setting in ZophImport.pl. These have to be set the same.

    @@ -809,7 +809,7 @@ Versions: 0.5 and later -Description: Put the files uploaded via the web import in dated directories, just like the --datedDirs option for zophImport.pl. For example, a photo taken on Dec 21, 2005, will be placed in a directory 2005.12.21, under your default path. +Description: Put the files uploaded via the web import in dated directories, just like the --datedDirs option for zophImport. For example, a photo taken on Dec 21, 2005, will be placed in a directory 2005.12.21, under your default path. Default: 0 @@ -829,7 +829,7 @@ Versions: 0.5 and later -Description: Put the files uploaded via the web import in hierarchical dated directories, just like the --hierarchical option for zophImport.pl. For example, a photo taken on Dec 21, 2005, will be placed in a directory tree 2005/12/21, under your default path. +Description: Put the files uploaded via the web import in hierarchical dated directories, just like the --hierarchical option for zophImport. For example, a photo taken on Dec 21, 2005, will be placed in a directory tree 2005/12/21, under your default path. Default: 0 --- zoph-0.7.5.orig/docs/installation.html +++ zoph-0.7.5/docs/installation.html @@ -35,7 +35,7 @@ @@ -118,12 +118,10 @@ 1;

    Because Perl does not like it when the last assignment of the file is negative.

    -

    -

    Copy bin/zophImport.pl and bin/zophExport.pl to /usr/local/bin

    Or some other directory in your PATH.

    Install the man page

    -

    A man page for zophImport.pl is in the man/ directory. Copy this to somewhere in your manpath, /usr/local/man/man1 for example.

    +

    A man page for zophImport is in the man/ directory. Copy this to somewhere in your manpath, /usr/local/man/man1 for example.

    Test it

    Try hitting http://localhost/zoph/logon.php. You should be presented with the logon screen. Log in using "admin" for user and "admin" for password.

    --- zoph-0.7.5.orig/docs/upgrading.html +++ zoph-0.7.5/docs/upgrading.html @@ -208,7 +208,7 @@

    Perl script changes

    -

    As of v0.7, you can set some defaults for zophImport.pl from .zophrc. The example file zophrc.sample has been updated with these settings:

    +

    As of v0.7, you can set some defaults for zophImport from .zophrc. The example file zophrc.sample has been updated with these settings:

     $datedDirs = 0;
     $copy = 0;
    @@ -216,7 +216,7 @@
     $verbose = 0;
     $resolveSymlinks = 0;
     
    -

    zophImport.pl now has an option to resolve symlinks during import. For more details, see Using the commandline tools

    +

    zophImport now has an option to resolve symlinks during import. For more details, see Using the commandline tools

    Zoph 0.5.x -> 0.6 update

    Copy php/* to the location of your installation. Make sure to also copy the php/lang subdirectory.

    @@ -258,7 +258,7 @@

    Perl script changes

    -

    As of v0.6, no settings need to be made in zophImport.pl and <zophExport.pl, it is replaced by a settings file .zophrc in the home directory of the user that runs these scripts. An example file called zophrc.sample is included with Zoph:

    +

    As of v0.6, no settings need to be made in zophImport and <zophExport, it is replaced by a settings file .zophrc in the home directory of the user that runs these scripts. An example file called zophrc.sample is included with Zoph:

     #-----------------------------------------
     # Configuration file for Zoph
    @@ -387,7 +387,7 @@
     

    Updating configuration

    A number of configuration items have been added since v0.3.3. You can use the list below to update your current configuration file, or simply use the one in the distribution and change it to your needs.

    -

    Set DB_PREFIX to a prefix for each tablename, see db update for details. Suggested is to use 'zoph_', as this will be the default in future releases. Make sure $db_prefix in zophImport.pl and zophExport.pl matches this setting.

    +

    Set DB_PREFIX to a prefix for each tablename, see db update for details. Suggested is to use 'zoph_', as this will be the default in future releases. Make sure $db_prefix in zophImport and zophExport matches this setting.

    Much of the style information has been removed from the HTML code and is now in a separate CSS file. Please set CSS_SHEET to 'css.php' to load the CSS file.

    You can now choose the authentication method used by zoph; set $VALIDATOR accordingly. Possible choices:

    'default_validate':

    @@ -436,7 +436,7 @@

    Another new feature is the addition of a pref to let photo descriptions appear under the thumbnails. The MAX_THUMB_DESC config sets the maximum number of characters to display.

    A New Export Script

    -

    You'll find a new perl script in this release, bin/zophExport.pl, which can be used to create static html galleries of your photos. See the manual for more info.

    +

    You'll find a new perl script in this release, bin/zophExport, which can be used to create static html galleries of your photos. See the manual for more info.

    Zoph 0.3.1 -> 0.3.2 Upgrade

    If you are upgrading from a version previous to 0.3.1, please run the older database updates first.

    @@ -451,7 +451,7 @@

    Updating the Templates

    Copy over php/* to the location of your installation. Make sure to also copy the php/lang subdirectory as there are additions to the language files. Also included in this release are the htmlized docs, in the php/docs/ directory, if you want them.

    There are two new additions to config.inc.php: a VERSION variable and the DEFAULT_SHOW_ALL setting. The DEFAULT_SHOW_ALL setting makes all people or places shown by default when you visit the people or places pages. If you don't have hundreds of records this is probably more convenient than defaulting to 'a'. It is enabled by default.

    -

    That's it for this release, but I'll mention one bug fix for a problem a few users may have noticed: if you used zophImport.pl to load images that were on a different filesystem than your images directory, everything would apparently work but the original images would not be copied. You might not have even noticed the images were missing unless you tried to view the full sized images in your browser. This release fixes this problem and makes sure other sorts of silent failure won't occur.

    +

    That's it for this release, but I'll mention one bug fix for a problem a few users may have noticed: if you used zophImport to load images that were on a different filesystem than your images directory, everything would apparently work but the original images would not be copied. You might not have even noticed the images were missing unless you tried to view the full sized images in your browser. This release fixes this problem and makes sure other sorts of silent failure won't occur.

    Zoph 0.3 -> 0.3.1 Upgrade

    If you are upgrading from a version less than 0.3, please run the previous database updates first.

    @@ -489,12 +489,12 @@

    In versions of Zoph prior to 0.3, thumbnails were generated as the same file type as the original image (a jpeg image would have jpeg thumbnails, a gif image gif thumbnails, etc). As it may be desirable to instead have all thumbnails be the same type (there probably is no need, for example, to create uncompressed tiff thumbnails of tiff images), Zoph 0.3 allows you to specify that all thumbnails should be of the same type.

    If all your images are the same type or if you don't mind having different sorts of thumbnails, you can skip this.

    The default settings maintain compatibility with previous versions. If you would like to switch to a single thumbnail format, do the following:

    -

    In zophImport.pl

    +

    In zophImport

    • set $mixed_thumbnails to 1
    • set $thumb_extension to whatever you like (jpg, for example)
    -

    In config.inc.php set MIXED_THUMBNAILS and THUMB_EXTENSION to the same values as zophImport.pl.

    +

    In config.inc.php set MIXED_THUMBNAILS and THUMB_EXTENSION to the same values as zophImport.

    If you make this change and have previously generated thumbnails with an extension different from THUMB_EXTENSION, you will need to regenerate the old thumbnails. A command like the following can take care of that (this one finds gifs and makes jpgs):

     > find images/ -name "thumb_*.gif" -o -name "mid_*.gif" | perl -nle '$old = $_; s/\.(\w+)$/.jpg/; $cmd = "convert $old $_"; print $cmd; system($cmd);'
    --- zoph-0.7.5.orig/docs/using_the_commandline_tools.html
    +++ zoph-0.7.5/docs/using_the_commandline_tools.html
    @@ -17,7 +17,7 @@
     

    Contents

      -
    • 1 ZophImport.pl +
    • 1 ZophImport
    • -
    • 2 ZophExport.pl +
    • 2 ZophExport
      • 2.1 A Quick Example
      • 2.2 Selecting Photos
      • @@ -48,8 +48,8 @@ if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } //]]> -

        -

        ZophImport.pl

        +

        +

        ZophImport

        Loading Images

        This section describes the command line Perl importer. The next one talks about the web based importer.

        @@ -72,7 +72,7 @@
         > ls ~/incoming
         DCP_0155.JPG
        -> zophImport.pl --path dc280 --datedDirs ~/incoming/*.JPG
        +> zophImport --path dc280 --datedDirs ~/incoming/*.JPG
         

        The --path flag tells the importer I want the photos to be put in the dc280 directory. The --datedDirs flag means that the photo should be put in a subdirectory based on the date field found in the photos Exif header. After running the script:

        @@ -81,13 +81,13 @@
         > ls dc280/2002.03.14
         DCP_0155.JPG mid thumb
         
        -

        The mid/ and thumb/ directories hold images scaled down to 120 and 480 pixels respectively. If you wonder why zophImport.pl takes so long to import photos it is because it is creating these two smaller images (using ImageMagick's convert utility).

        +

        The mid/ and thumb/ directories hold images scaled down to 120 and 480 pixels respectively. If you wonder why zophImport takes so long to import photos it is because it is creating these two smaller images (using ImageMagick's convert utility).

        What if you don't want to use dated directories to store your images? Here is an alternative way:

         > pwd
         /home/jgeiger/photos
         > mkdir christmas_2001
        -> zophImport.pl --path christmas_2001 ~/incoming/*.JPG
        +> zophImport --path christmas_2001 ~/incoming/*.JPG
         > ls christmas_2001
         DCP_0155.JPG mid thumb
         
        @@ -95,7 +95,7 @@
         > mkdir christmas_2001
         > mv ~/incoming/*.JPG christmas_2001/
        -> zophImport.pl christmas_2001/*.JPG
        +> zophImport christmas_2001/*.JPG
         

        By not specifying a path, the importer uses the path that the photos are currently in.

        Whatever way you import photos, make sure you run the script from within your photos directory (as specified by IMAGE_DIR). The importer needs to be able to correctly extract the relative path to the photos from here to be stored in the database.

        @@ -106,12 +106,12 @@
         > pwd
         /home/jgeiger/photos
        -> zophImport.pl --path dc280 --datedDirs --photographer "Jason Geiger" --location "Jason's Apartment" --album "Zoph Tutorial" ~/incoming/*.JPG
        +> zophImport --path dc280 --datedDirs --photographer "Jason Geiger" --location "Jason's Apartment" --album "Zoph Tutorial" ~/incoming/*.JPG
         

        To use the --photographer, --location and --album parameters, corresponding records must have been previously created in Zoph. So first create a person/place/album/category using the web interface, then import using them.

        What if you made a mistake, or remembered a piece of information you want to add? Pass the --update parameter so that the photos will not be inserted again:

        -> zophImport.pl --update --field rating=5 --field description="This is part of the zoph tutorial" dc280/2002.03.14/*.JPG
        +> zophImport --update --field rating=5 --field description="This is part of the zoph tutorial" dc280/2002.03.14/*.JPG
         

        This will set the rating and description for all the photos I just imported. To set any of the fields found in the photos table (such as rating, title, description, etc), use the --field NAME=VALUE flag.

        For more info and examples about the importer, see the section at the end of this document.

        @@ -120,7 +120,7 @@

        It is not uncommon to make a mistake while loading images so that when you view the ui you see a bunch of broken images. This most likely due to an invalid path. To check, edit one of the images in Zoph and click on "show additional attributes" at the bottom. Then you should be able to see the path info. It should always be the case that WEB_IMAGE_PATH (or IMAGE_PATH) + the photo's path field + the photo's name reflects the photo's location.

        You can use the importer to correct the paths for broken images:

        -> zophImport.pl --update --path 'dc280/2002.03.14' dc280/2002.03.14/*.JPG
        +> zophImport --update --path 'dc280/2002.03.14' dc280/2002.03.14/*.JPG
         

        If you still see broken images, check the permissions on the files and directories.

        @@ -170,44 +170,44 @@

        Below are a couple more examples.

        Adding a list of people to a photo (if there are many people it is often faster to do this using the importer rather than through the web ui):

        -> zophImport.pl --update --people "Jason Geiger, Virginia Wolfe" dc280/2002.03.14/DCP_0155.JPG
        +> zophImport --update --people "Jason Geiger, Virginia Wolfe" dc280/2002.03.14/DCP_0155.JPG
         

        People should be listed left to right, front to back. These people must already be the database. If one of the names could not be found the importer will complain.

        Updating all the photos in a directory:

        -> find dc280/ -iname "*.jpg" -maxdepth 2 | xargs zophImport.pl --updateSize
        +> find dc280/ -iname "*.jpg" -maxdepth 2 | xargs zophImport --updateSize
         

        You may want to use the --updateSize option like above if you had rotated or resized a bunch of images and wanted to get the correct dimensions into zoph. Specifying a maxdepth prevents the thumbnails from being included.

        Starting in version 0.3 of the importer you can also update photos based on their photo_ids rather than names. Say you notice couple sequences of of your photos have an incorrect location. You can see the photo_id for a photos in the url and it may be simpler to update based on that rather than by passing the file names:

        -> zophImport.pl --update --useIds --location "Yuka's House" 1562-1571 1580-1585
        +> zophImport --update --useIds --location "Yuka's House" 1562-1571 1580-1585
         
        -

        As of version 0.7, you can influence the way zophImport.pl handles symbolic links.

        +

        As of version 0.7, you can influence the way zophImport handles symbolic links.

        For example, you have the following files IMG_0001.JPG, IMG_0002.JPG, both taken 01-01-2007 and LNK_0002.JPG, which is a symlink to IMG_0002.JPG.

        If you would import these files with

        -zophImport.pl --datedDirs IMG_0001.JPG LNK_0002.JPG
        +zophImport --datedDirs IMG_0001.JPG LNK_0002.JPG
         

        You would have two files in 2007.01.01: IMG_0001.JPG and LNK_0002.JPG - both will be "normal" files. You will also have IMG_0002.JPG, still in it's old location.

        If you would import these files with

        -zophImport.pl --datedDirs --resolveSymlinks IMG_0001.JPG LNK_0002.JPG
        +zophImport --datedDirs --resolveSymlinks IMG_0001.JPG LNK_0002.JPG
         

        You would have two files in 2007.01.01: IMG_0001.JPG and IMG_0002.JPG - both will be "normal" files. You will also have IMG_0002.JPG, still in it's old location.

        Reducing Thumbnail Size

        -

        Based on a suggestion from Alan Shutko, in version 0.3.1 of zophImport.pl I added +profile "*" to the calls to convert. (And in 0.3.3 I commented out this since for some users multiple thumbnails were being generated for an image. I did not see this problem, maybe it was a shell expansion issue. For most people it probably works so you may want to re-enable this feature.)

        +

        Based on a suggestion from Alan Shutko, in version 0.3.1 of zophImport I added +profile "*" to the calls to convert. (And in 0.3.3 I commented out this since for some users multiple thumbnails were being generated for an image. I did not see this problem, maybe it was a shell expansion issue. For most people it probably works so you may want to re-enable this feature.)

        From http://www.imagemagick.org/www/convert.html:

        "The '+profile "*"' removes any ICM, EXIF, IPTC, or other profiles that might be present in the input and aren't needed in the thumbnail."

        This can result in a significant reduction in file sizes. If you do wish to preserve the profiles, remove this argument to convert.

        Also, if you wish to regenerate your thumbnails after this change to save space, you can run a command like this from your image directory:

        -> find . -iname "*.jpg" -a -not -name "mid_*" -a -not -name "thumb_*" | xargs zophImport.pl --update --thumbnails
        +> find . -iname "*.jpg" -a -not -name "mid_*" -a -not -name "thumb_*" | xargs zophImport --update --thumbnails
         
        -

        -

        ZophExport.pl

        -

        Zoph is a dynamic sort of application tied closely to the database. But sometimes you want static html files of your photos to burn to a cd or whatnot. Zoph includes a perl script, zophExport.pl, that lets you easily create static galleries.

        -

        There are numerous programs whose focus is to generate these sorts of static photo albums. Though I included a very simple built-in static album generator, zophExport.pl is primarily intended to be used with other scripts. Currently two such programs are supported:

        +

        +

        ZophExport

        +

        Zoph is a dynamic sort of application tied closely to the database. But sometimes you want static html files of your photos to burn to a cd or whatnot. Zoph includes a perl script, zophExport, that lets you easily create static galleries.

        +

        There are numerous programs whose focus is to generate these sorts of static photo albums. Though I included a very simple built-in static album generator, zophExport is primarily intended to be used with other scripts. Currently two such programs are supported:

        • album (http://marginalhacks.com/Hacks/album/)
        • BINS (http://bins.sautret.org/)
        • @@ -218,44 +218,44 @@

          A Quick Example

          Here is a command that creates an export for use with the album program:

          -> zophExport.pl --dir "~/Winter Pics" --format album --category Snow
          +> zophExport --dir "~/Winter Pics" --format album --category Snow
           
          -

          After the exporter finishes it's up to you to run album. zophExport.pl prints out an example command to run album which you can copy and run as is or update with your own options.

          -

          In this simple example all photos placed in the Snow category are exported. Within the "Winter Pics" directory zophExport.pl will have created a directory structure mirroring the album structure in Zoph for the selected photos.

          +

          After the exporter finishes it's up to you to run album. zophExport prints out an example command to run album which you can copy and run as is or update with your own options.

          +

          In this simple example all photos placed in the Snow category are exported. Within the "Winter Pics" directory zophExport will have created a directory structure mirroring the album structure in Zoph for the selected photos.

          There are only two required arguments: the directory to export to (--dir) which will be created if it does not exist, and the format of the export (--format) which currently must be either "zoph", "album" or "bins".

          Selecting Photos

          -

          Fields to search by are specified in the same was as in zophImport.pl. For example, you can say

          +

          Fields to search by are specified in the same was as in zophImport. For example, you can say

          -> zophExport.pl --dir "~/My Album" --format album --album "Boston Trip" --photographer "Jason Geiger" --field rating=5
          +> zophExport --dir "~/My Album" --format album --album "Boston Trip" --photographer "Jason Geiger" --field rating=5
           

          Only photos I took on my trip to Boston that I rated 5 or more would be exported. By default subalbums of an album are automatically included (so my "Duck Tour" subalbum is also exported). You can disable this by passing --nosubalbums. The same goes for categories (use --nosubcategories to disable). Most fields match using the equals operator. Two exceptions are rating (which defaults to >=) and description (which defaults to like).

          -

          You can probably do most things you want by using this system, especially since you can run zophExport.pl multiple times with different parameters, and even edit the results by hand if you wish, before you run album or bins to generate the galleries.

          +

          You can probably do most things you want by using this system, especially since you can run zophExport multiple times with different parameters, and even edit the results by hand if you wish, before you run album or bins to generate the galleries.

          But if you have a particularly complicated query you want to run you can just pass it in directly using the --sql argument. Your query must select * from the photos table, other than that it can be anything. If you pass a sql statement any other constraint arguments are ignored. Make sure to only pass select statements, the script does no checking to make sure you aren't deleting all your data

          -

          Here's a tip if you run a complicated search within Zoph and then want to export only those photos. After you get to the results page open up config.inc.php and set DEBUG to 2. Then reload the results page and you should see two sql queries at the top of the page. Copy the first (the count query) and replace "count(distinct ph.photo_id)" with "ph.*", append "order by ph.date asc, ph.time asc" and pass this to zophExport.pl using the --sql argument.

          +

          Here's a tip if you run a complicated search within Zoph and then want to export only those photos. After you get to the results page open up config.inc.php and set DEBUG to 2. Then reload the results page and you should see two sql queries at the top of the page. Copy the first (the count query) and replace "count(distinct ph.photo_id)" with "ph.*", append "order by ph.date asc, ph.time asc" and pass this to zophExport using the --sql argument.

          Choosing What to Display

          -

          By default zophExport.pl will export everything about your photos except the last modified time, the rating and the albums or categories in which the photo appears.

          +

          By default zophExport will export everything about your photos except the last modified time, the rating and the albums or categories in which the photo appears.

          To prevent the display of a particular field, use the --noshowFIELD argument. For example: --noshowlocation or --noshowdescription. Passing --noshowexif prevents any exif info from being shown. (Note, however, that the BINS program extracts exif info on its own).

          The exporter can translate field labels using the same language files that Zoph uses. Pass --lang /path/to/php/lang/file to enable this option.

          By default the exporter creates directories to mirror the structure of the albums in which the exported photos appear. To disable this and have all the photos appear directly under the export dir use the --noalbumdirs flag.

          A Simple Export

          -

          The exporter contains the ability to generate a very simple static gallery. To use the simple exporter, pass --format zoph to zophExport.pl.

          +

          The exporter contains the ability to generate a very simple static gallery. To use the simple exporter, pass --format zoph to zophExport.

          There are two advantages to this format. The first is that it requires no additional software. The second is speed. The simple format is much much faster simply because it uses the thumbnails already generated by Zoph whereas album and BINS generate their own. Someone could probably alter album or BINS so that they could reuse the thumbnails.

          -

          There's not really any elegant way to change the appearance of the gallery generated by this exporter. To do so you probably would want to edit zophExport.pl. It wouldn't be too difficult to add css support but I didn't. I only wanted to spend so much time reinventing the wheel.

          +

          There's not really any elegant way to change the appearance of the gallery generated by this exporter. To do so you probably would want to edit zophExport. It wouldn't be too difficult to add css support but I didn't. I only wanted to spend so much time reinventing the wheel.

          Exporting to Album

          album is written by David Ljung Madison. http://marginalhacks.com/Hacks/album/

          album is a single perl script which requires nothing more than you already have from using Zoph (ImageMagick and Image::Size). A debian package is available.

          -

          To use album, specify --format album to zophExport.pl. The exporter will create a captions.txt file in each directory that contains images.

          +

          To use album, specify --format album to zophExport. The exporter will create a captions.txt file in each directory that contains images.

          Album is themeable and a number of themes are available from the website. I'd recommend you download a different theme, or create your own, simply because the default theme displays all of the info about a photo on the thumbnails page which can be quite a bit if you include descriptions and exif data. You specify a theme by passing -theme /path/to/theme/dir to album.

          Exporting to BINS

          BINS is written by Jerome Sautret, based on SWIGS, written by Brendan McMahan, which was in turn based on IDS by John Moose. http://bins.sautret.org/

          BINS consists of three perl scripts: an exporter and two image/album description editors. A debian package is available. BINS requires a number of perl modules which you can get from CPAN if you need to.

          -

          To use BINS, specify --format bins to zophExport.pl. The exporter will create an image.jpg.xml file for each photo and an album.xml file in each directory.

          -

          BINS takes a source directory and a target directory. zophExport.pl will create the target directory based on the --dir you specify. It will also append ".tmp" to the target directory name and create another directory to which it will copy the images from Zoph and which will act as the source dir for BINS. You can remove this temp dir after BINS finishes. You can set the source and target directory to the same dir in BINS but you can only run BINS against that directory once, after that it will start creating thumbnails of the thumbnails, etc.

          +

          To use BINS, specify --format bins to zophExport. The exporter will create an image.jpg.xml file for each photo and an album.xml file in each directory.

          +

          BINS takes a source directory and a target directory. zophExport will create the target directory based on the --dir you specify. It will also append ".tmp" to the target directory name and create another directory to which it will copy the images from Zoph and which will act as the source dir for BINS. You can remove this temp dir after BINS finishes. You can set the source and target directory to the same dir in BINS but you can only run BINS against that directory once, after that it will start creating thumbnails of the thumbnails, etc.

          You can create a config xml file for BINS to use. I found it useful to set the defaultSize parameter to 0 (default to small images).

          --- zoph-0.7.5.orig/docs/using_the_webinterface.html +++ zoph-0.7.5/docs/using_the_webinterface.html @@ -139,7 +139,7 @@

The Web Based Importer

-

The web based importer is a new template in Zoph 0.3 that provides an alternative to the command line importer, zophImport.pl. This template does not yet contain all the functionality of zophImport.pl.

+

The web based importer is a new template in Zoph 0.3 that provides an alternative to the command line importer, zophImport. This template does not yet contain all the functionality of zophImport.

To use the importer, at least one of CLIENT_WEB_IMPORT and SERVER_WEB_IMPORT must be set to 1 in config.inc.php and you must be logged in as either an admin or a user that has been granted permission to import.

Enable CLIENT_WEB_IMPORT to upload files through the web-interface using a 'browse' button, and enable SERVER_WEB_IMPORT to import files through the web-interface for files that are already on the server. CLIENT_WEB_IMPORT and SERVER_WEB_IMPORT may be both activated.

If you are going to be importing directories of photos you will probably need to increase the size of max_execution_time in php.ini. The default is 30 seconds but you will probably need this to be a couple minutes or more, depending on how many images you import and how fast your computer is.