Provided by: zoph_0.9.4-4_all
NAME
zoph - CLI interface to Zoph
SYNTAX
zoph [--instance "instance"] [--import] [--update] [--new] [--help] [--version] [--album "album"] [--category "category [, category]"] [--person "first_name last_name [, first_name last_name]"] [--photographer "first_name last_name"] [--location ["place_title"] [--fields name="value"] [--path path] [--[no]thumbs] [--[no]exif] [--[no]size] [--[no]dateddirs] [--[no]hierarchical] [--verbose] [--copy] [--move] --useids id ... | image ...
DESCRIPTION
zoph 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. Imported photos are moved or copied (depending on whether --copy was specified) from their current location and stored in in a directory below IMAGE_DIR - dependent on --path, --dateddirs and --hierarchical settings. 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. 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 name consist of a single word you can omit them. --instance, -i You can have multiple Zoph installations on one system. For example a Zoph installation for yourself and one for a family member or friend, or if you are a Zoph developper, a production and a development version. The webinterface can determine which installation your are using by the URL you are using. The command line interface does not have an URL thus it needs a different way to find out which instance of Zoph is used. By default, the first instance in zoph.ini is used. --import, -I The list of photos given will be imported in Zoph. This is the default. --update, -u Zoph will try to find the given list of photos in the database and apply the options to those photos. You can either give a list of filenames or a list of id's, see --useIds. --new, -N Create albums, categories, places and people from CLI. Use --album "new album", --category "new category", --person "new person", --place "new location". The new object will be created directly under the root unless --parent is specified. See --person for details on how Zoph determines what's the first and second name. --help Lists all supported options and quits --version, -V Show the current Zoph version. --album, --albums, -a "album, [, album]" put the references to the image(s) into album(s) --category, --categories, -c "category [, category]" put the references to the image(s) into category(s) --photographer, -P "first_name last_name" store first_name last_name as the photographer of image(s) --person, --persons, -p, --people "first_name last_name [, first_name last_name]" Specify one or multiple persons that appear on the photos specified. You can specify --person multiple times. The name of a person or a list of persons separated by commas. The person must pre- exist in the database. When using --new to add new persons to the database, Zoph will try to determine which parts of the name are first, middle and last. If a name is a single word ("John"), Zoph assumes this is the first name. If a name is two words ("John Doe"), Zoph will assume this is the first and last name. If a name is 3 or more words, Zoph will assume the first word is the first name, the second is a middle name and all remaining words are the last name. If this does not give the correct results, you can choose to separate by colon (":") instead of space. Zoph will then set the part before the first colon to first name, then middle, then last and finally 'called'. --location, -l, --place "place_title" put the references to the image(s) into location --fields, -f, --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. --thumbs, -t / --nothumbs, --nothumbs, -n Specify whether thumbnails should be created. When importing (--import), the default is to create thumbs. When updating (--update), the default is to not create thumbs. Use these commands to overrule the defaults. If you want to recreate thumbs for already imported photos, use --thumbs. If you do not want to create thumbnails while importing, use --no-thumbs. --exif, --EXIF / --no-exif, --noexif, --no-EXIF, --noEXIF Specify whether EXIF data should be read. When importing (--import), the default is to read EXIF data. When updating (--update), the default is to not read EXIF data. --size / --no-size, --nosize Specify whether Zoph should update the dimensions of the photo stored in the database. When importing (--import), the default is to update database with dimensions of the image. When updating (--update), the default is to not update the size information. Use these commands to overrule the defaults. If you want to update the information stored in the database when updating, use --size. If you do not want store size information while importing (although I see no real use for this), use --no-size. --useids, --useIds, --use-ids, --useid, --use-id When updating photos it can be useful to be able to specify database ids instead of filenames. You can specify a list of ids instead of a list of filenames. You can either specify a single id or a range of ids. Keep in mind that the list of filenames or ids are the last options of the command and do not necessarily follow the --useids option. You can specify ids as single numbers or ranges. For example: zoph --update --useids 2 5 11-20 56 Without specifying this option, zoph assumes filenames are used. Specifying this option implies --update is used. --move / --copy When importing photos, you can either import a copy of the photo or move the photo into the Zoph image directory. By default, files are moved. If the file imported is a symlink, in case of --move, a copy of the file the symlink points to is imported and the symlink is deleted. In case of --copy, the symlink is not deleted. --dateddirs, --datedDirs, --dated, -d / --no-dateddirs --no-datedDirs, --nodateddirs, --nodatedDirs put photos in YYYY.MM.DD directories, which are automatically created from the date in the EXIF header, or, when no date is found in the EXIF header, the file date. The directories are created below path --hierarchical, --hier, -H / --no-hierarchical, --no-hier, --nohierarchical, --nohier when given together with the --datedDirs option, the dated directories are created YYYYMMDD (instead of YYYY.MM.DD), thus creating a hierarchical directory tree. The directories are created below path --hash / --no-hash As of v0.8.4 Zoph stores a hash of each photo in the database. This is currently only used for the 'share photo' feature. In the future other features will use this, as it will allow Zoph to detect whether a photo has been changed. The default is to generate a hash or update the hash when --update is used. --parent When adding new objects to the database using the --new option, you can determine where in the tree an album, category or place will be placed by specifying --parent. If you do not specify a parent, the new object will be placed directly under the root. --parent must precede the actual album, category or place. The parent is only set for the next --album, --category or --place. --autoadd, -A, --auto-add You can use --new to add albums, categories, places and people from CLI, with autoadd you can add them in the same run as you are importing photos. Zoph will add any album, category, etc. you have specified, but does not exist. However, to protect you from every typo to be automatically added to the database, only items preceded with --parent will be added, unless you specify --addalways. Of course this only works for albums, categories and locations, and not for persons and photographers. --addallways, -w, --add-alwys When using --autoadd, zoph protects you from every typo to be automatically added to the database by only adding albums, categories and location preceded with --parent. To overrule this behaviour, use --addalways, which causes them to be added under the root album, category or location. --recursive, -r Recursively go through directories added to the file list and import photos found in those dirs as well. --dirpattern With --dirpattern, you can automatically assign albums, categories, people, photographer, location or path based on the directories the photos are in. You do this by specifying a pattern, based on which Zoph will use directory names to assign to correct organizer. This pattern consists of a list of letters, where each letter is a directory: a (album), c (category), l (location), p (person), P (photographer) and D (path). This option makes no sense if you do not specify --recursive as well. --verbose show verbosely whats going on (not implemented in v0.8.4) --path path the path relative to IMAGE_DIR (set in config.inc.php), where the images are physically stored file ... The filenames or database ids (in case --useids is used) of the image(s) to be imported or updated.
EXAMPLES
Import IMG_1300.JPG and place it in the album Summer and category Landscapes: zoph --album "Summer" --category "Landscapes" IMG_1300.JPG Import john.jpg and place it in the album Family, category Portraits and specify John Doe is in this picture: zoph --album "Family" --category "Portraits" --person "John Doe" john.jpg Create a new album called summer 2011 under the root album: zoph --new --album "Summer 2011" Create new albums called Summer 2011 and Winter 2011 under the Holidays album: zoph --new --parent "Holidays" --album "Summer 2011, Winter 2011" Create new albums called Summer 2011 and Winter 2011 under the Holidays album and an album Trees under the root album: zoph --new --parent "Holidays" --album "Summer 2011, Winter 2011" --album "Trees" Create new albums called Summer 2011 and Winter 2011 under the Holidays album and an album Trees under the Nature album: zoph --new --parent "Holidays" --album "Summer 2011, Winter 2011" --parent "Nature" --album "Trees" Create a new album called Summer 2011 under the Holidays album and a category Trees under the Nature category: zoph --new --parent "Holidays" --album "Summer 2011" --parent "Nature" --category "Trees" Import all files in the current directory and the directories below. For each path, assign the name of the first directory as photographer, the second as album, and the third, fourth and fifth as categories. zoph -r --dirpattern "Paccc" * For more examples, see the wikibooks documentation.
RETURN VALUES
0: success 1: no arguments given (try --help) 2: no files to import 10: image not found 20: person not found 30: location not found 40: album not found 50: category not found 90: zoph.ini not found 91: instance not found 95: CLI user not admin 96: CLI user not valid 97: CLI_USER not defined in zoph.ini 99: API not compatible 250: Cannot access arguments 254: Unknown error
SEE ALSO
zoph.ini(5), a description of the zoph.ini configuration file http://en.wikibooks.org/wiki/Zoph, the Zoph documentation WikiBook
AUTHORS
zoph was written by Jason Geiger <zoph@nother.net> and is now maintained by Jeroen Roos (jeroen@zoph.org) this manpage was created for zophImport.pl by Mark Cooper, edited by Edelhard Becker <becker@edelhard.de> and Jeroen Roos <jeroen@zoph.org>. With the release of Zoph 0.8.2, it was rewritten by Jeroen Roos <jeroen@zoph.org> for the zoph CLI tool.