man zophImport (Commandes) - Import images into zoph
NAME
zophImport - Import images into zoph
SYNTAX
zophImport [--album "album"] [--category "category [, category]"] [--photographer "first_name last_name"] [--people "first_name last_name [, first_name last_name]"] [--location ["place_title"] [--field name="value"] [--path path] [--datedDirs] [--update] [--updateSize] [--updateExif] [--nothumbnails] --useIds id ... | image ...
DESCRIPTION
zophImport is the command line importer for the zoph (Zoph Organizes
PHotos) web photo management system.
Any fields specified will be applied to every photo imported. Any albums,
categories, people or places referred to must already be present in the
database.
Please run the importer from within the IMAGE_DIR zoph has been configured to
use. If a --path is specified, imported photos are physically moved
away from their current location and stored into the given directory (which
then is IMAGE_DIR/path), otherwise the images are left in place. The
MySQL database stores all the attributes and references to the images.
Photos can appear in multiple albums and categories, and multiple people can be
in a photo. To handle this, you can either pass a comma separated list or set
the flag multiple times. Actually, you can use a comma separated list for
categories and people but not for albums (since I realized that I have many
albums with commas in their names and have yet to build an escape mechanism).
If multiple people appear in a photo, specify them in left to right, front to
back order.
OPTIONS
The `"' around arguments are needed to prevent breaking up around whitespace or the shell interpreting special characters. If an album e.g. is called hugo you can omit them.
- --album "album"
- put the references to the image(s) into album(s)
- --category "category [, category]"
- put the references to the image(s) into category(s)
- --photographer "first_name last_name"
- store first_name last_name as the photographer of image(s)
- --people "first_name last_name [, first_name last_name]"
- store the named people (as seen on the picture from left to right) with the image(s)
- --location "place_title"
- put the references to the image(s) into location
- --field name="value"
-
set the image(s) field name to value; common fields are title
(text, 64 chars max), view (text, 64 chars max), description (text), rating
(1..10) or level (1..10); possible fields are from the MySQL database, table
photos;
view can be used to describe what can be seen in the photo. Often this is covered by the location field but sometimes you might want to be more specific, or to describe something you don't want to store in the database as a location (view is just a string). In the demo the view field is used in a photo of Big Ben in London: the location is set to Parliament (since that was where the photographer was standing) and the view to Big Ben (since that was what where the photographer was looking at).
In the description field you can store additional information that doesn't fit elsewhere.
level is used for access privileges. When someone is granted permission to view an album, they are also granted an access level for that album. They will be able to view photos in that album whose level is less than or equal to their access level. This is so you can selectively exclude photos by giving them a higher level. - --path path
- the path relative to IMAGE_DIR (set in config.inc.php), where the images are physically stored
- --datedDirs
- put photos in YYYY.MM.DD directories, which are automatically created from the date in the Exif header below path
- --update
- update existing photos, e.g. to edit database entries
- --updateSize (implies --update)
- update the photo's width, height and size.
- --updateExif (implies --update)
- reparse and load the exit headers.
- --nothumbnails
- do not generate thumbnails
- --thumbnails
- (re)generate thumbnails (usually combined with --update)
- --useIds id ...
- use the numerical id from the database, not file names, to identify photos for update
- image ...
- the name(s) of the image(s) to be imported or updated
EXAMPLES
- zophImport --path dc280 --datedDirs ~/incoming/*.jpg
Reads the Exif headers of all photos ~/incoming/*.jpg, creates a subdirectory for each date below IMAGE_DIR/dc280/ and moves the photos to that place.
- doit() { exiftran -aib $1 ; zophImport --updatesize --update --thumbnails $1; }
Rotates images from your camera when they're already stored in the database (thanks Brian May for this tip, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=284815 and exiftran(1) for more details).
- zophImport --path dc280 --datedDirs --photographer "Jason Geiger" --location "Jason's Apartment" --album "Zoph Tutorial" ~/incoming/*.jpg
Same as above, plus updates the database with entries for photographer, location and album.
- perl -e 'use DBI; $dbh = DBI->connect("DBI:mysql:zoph", "zoph_rw", "zoph_rw") or die; $sth = $dbh->prepare("select * from photos where 1 = 0"); $sth->execute() or die; $names = $sth->{"NAME"}; foreach $name (@$names) { if ($name !~ /_id$/ and $name ne "path" and $name ne "name" and $name ne "timestamp") { print $name, "\n"; } } $sth->finish(); $dbh->disconnect();'
List all fields, that can be selected by the --field Option (using the installation default password). Note that modifying many of them (i.e. image size) usually doesn't make sense.
AUTHORS
zoph was written by Jason Geiger <zoph@nother.net>
this manpage was created by Mark Cooper and edited by Edelhard Becker <becker@edelhard.de>
SEE ALSO
zophExport(1) http://localhost/doc/zoph/manual.html