zoph(1)

πŸ’– zoph(1) β€” User Commands πŸ’–

okay bestie, welcome to the zoph manual page, section 1, and honestly? it's giving main character energy for your photo library. ✨


πŸŽ€ NAME πŸŽ€

zoph β€” the CLI interface to Zoph, no cap πŸ’…


🌸 SYNTAX 🌸

okay so here's the whole vibe, literally every flag, verbatim, don't @ me:

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 ...

like… yes, that's a lot of brackets. it's fine. it's iconic. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so zoph is the command line importer for the Zoph system β€” that's Zoph Organizes PHotos, the web photo management system. periodt. πŸ“Έ

Any fields you specify get applied to every single photo you import. and listen β€” any albums, categories, people or places you refer to must already be in the database. like, you can't just manifest them. they gotta exist first. 😭

the photos you import get moved or copied (which one depends on whether you passed --copy) out of wherever they're chillin' right now, and then stored in a directory below IMAGE_DIR β€” and which directory exactly depends on your --path, --dateddirs and --hierarchical settings. the MySQL database is the one holding all the attributes and all the references to the images. she's the record keeper. πŸ‘‘

also, quick thing: photos can show up in multiple albums and multiple categories, and multiple people can be in one photo. so to handle that, you've got two moves: pass a comma separated list, or set the flag multiple times. either works, you're slaying either way. ✨

and if multiple people appear in a photo? specify them in left to right, front to back order. that's the rule, bestie, that's the vibe check. πŸ’–


(part 1 of 3 β€” more coming, don't go anywhere) 🌈

✨ OPTIONS ✨

Okay so before we get into the menu, quick PSA: those " quotes wrapped around your arguments? They are not just for ✨aesthetics✨, bestie, they are load-bearing. They stop your argument from getting shredded around whitespace and they stop the shell from getting nosy and interpreting special characters. If your album name is literally one single word, you can be chill and skip them. Otherwise? Quote it. πŸ’…


  • --instance, -i β€” okay so you can have multiple Zoph installations chilling on one system. Like, one for you, one for a family member or a friend, or if you're a Zoph dev, a production version and a dev version, slay. The webinterface figures out which installation you're on from the URL you're using. But the command line interface has no URL, so it needs a whole different way to figure out which instance of Zoph you mean.

By default, the first instance in zoph.ini is used. πŸŽ€

  • --import, -I β€” the list of photos you gave gets imported into Zoph. This is the default, so it's the vibe you get for free.
  • --update, -u β€” Zoph will try to find the list of photos you gave in the database and apply the options to those photos. You can hand it either a list of filenames or a list of id's, see --useIds. πŸ¦‹
  • --new, -N β€” create albums, categories, places and people straight from the CLI. Use --album "new album", --category "new category", --person "new person", --place "new location". The new object gets created directly under the root unless you specify --parent. See --person for the details on how Zoph figures out what's the first and second name. πŸ‘‘
  • --help β€” lists all supported options and quits. Our fave.
  • --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 🌸

okay bestie, this is the part where it all clicks. real commands, real vibes, copy-paste energy. let's go πŸ’…


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" *
lowkey obsessed with that last one 🫢 the Paccc pattern is doing SO much heavy lifting and it's iconic for it.

For more examples, see the wikibooks documentation. πŸ“šβœ¨


πŸ’€ RETURN VALUES πŸ’€

okay so when zoph is done doing its thing, it tells you how it went with a number. here's the whole mood ring:

  • 0 β€” success πŸŽ‰ (we ate, no crumbs)
  • 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 πŸ‘‘ (nice try bestie)
  • 96 β€” CLI user not valid 🚫
  • 97 β€” CLI_USER not defined in zoph.ini πŸ“
  • 99 β€” API not compatible πŸ’”
  • 250 β€” Cannot access arguments πŸ”’
  • 254 β€” Unknown error ❓
fr fr, if you get anything that isn't 0, something's up β€” go read the number, it's literally telling you what broke.

πŸ‘€ SEE ALSO πŸ‘€


πŸ’– 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. ✨


and that's the whole page bestie!! 🌈 this one came from Jeroen Roos, dated 12 Oct 2010, and it's the zoph(1) manpage β€” go forth and import ur pics with main character energy. periodt. πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from