Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Zoph/Using the commandline tools/zoph CLI client

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

zoph is the commandline interface (CLI) of Zoph 0.8.2 and later. You can use the CLI to import photos in Zoph and make (bulk) changes to photos already in Zoph. Multiple Zoph installations --instance v0.8.2 and later -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 developer, 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. First instance in zoph.ini Instance defined in zoph.ini zoph --instance production photo.jpg Commands You can only supply one "command" type option to Zoph, if you supply more, Zoph will take the last one. --import v0.8.2 and later -I The list of photos given will be imported in Zoph --import is the default command, it doesn't need to be given. zoph --import photo.jpg --update v0.8.2 and later -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. --import is the default command zoph --update photo.jpg --new v0.8.4 and later -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. zoph --new --parent "Holidays" --album "Summer 2011" --version v0.8.2 and later -V Show the current Zoph version. --import is the default command All other options will be ignored if --version is specified zoph --version --help v0.8.2 and later (not implemented in the current CVS version) -h Display help. --import is the default command All other options will be ignored if --help is specfied zoph --help Organizers Organizers is what Zoph is all about, these are the ways you can organize your photos by. --album v0.8.2 and later -a --albums Specify one or multiple albums Zoph should add the given list of photos to. You can specify --album multiple times. The name of an album or multiple, separated by commas. The album must pre-exist in the database. zoph --album "Summer, Holiday"zoph -a "Summer" -a "Holiday" photo.jpg --category v0.8.2 and later -c --categories Specify one or multiple categories Zoph should add the given list of photos to. You can specify --category multiple times. The name of a category or multiple, separated by commas. The category must pre-exist in the database. zoph --category "sun, water" photo.jpgzoph -c "sun" -c "water" photo.jpg --person v0.8.2 and later -p --persons --people 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'. zoph --person "Linus Torvalds, Mark Shuttleworth" photo.jpgzoph -p "Linus Torvalds" -p "Mark Shuttleworth" photo.jpgzoph --new --person "Linus Torvalds"zoph --new --person "John Fitzgerald Kennedy"zoph --new --person "Johnny B.::Goode"zoph --new --person "John::Doe:Average Joe --location v0.8.2 and later -l --place Specify the location where the photos specified were taken. You can specify --location only one time. The name of a place. The place must pre-exist in the database. zoph --location "Rotterdam" photo.jpgzoph -l "Rotterdam" photo.jpg --photographer v0.8.2 and later -P Specify the photographer of the photos specified. You can specify --photographer only one time. The name of a person. The person must pre-exist in the database. zoph --photographer "Alan Cox" photo.jpgzoph -P "Alan Cox" photo.jpg --fields v0.8.2 and later -f --field Specify fields that should be filled for the photos specified. You can specify --field multiple times. The following fields can be used: date time camera_make camera_model flash_used focal_length exposure compression aperture iso_equiv metering_mode ccd_width focus_dist comment lat lon rating description level view title zoph --field "rating=10" photo.jpgzoph -f "description=self portrait" photo.jpg Options --thumbs / --no-thumbs v0.8.2 and later -t / --nothumbs -n Specify whether thumbnails should be created. When importing (--import): create thumbs. When updating (--update): do 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. zoph --import --no-thumbs photo.jpgzoph --update -t photo.jpg --exif / --no-exif v0.8.2 and later --EXIF / --noexif --no-EXIF --noEXIF Specify whether EXIF date should be read. When importing (--import): read EXIF data. When updating (--update): do not read EXIF data. Use these commands to overrule the defaults. If you want to reread the EXIF date of already imported photos, use --exif. If you do not want to read EXIF data while importing, use --no-exif. zoph --import --no-exif photo.jpgzoph --update --exif photo.jpg --size / --no-size v0.8.2 and later (none) / --nosize Specify whether Zoph should update the dimensions of the photo stored in the database. When importing (--import): update database with dimensions of the image. When updating (--update): do 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. zoph --import --no-size photo.jpgzoph --update --size photo.jpg --useids v0.8.2 and later --useIds --use-ids --useid --use-id When updating photos it can be useful to be able to specify database ids instead of filenames. Filenames are used. Using --useids implies --update 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. zoph --update --useids 2 5 11-20 56zoph --update --useids --album "Summer" 15-60 --move / --copy v0.8.2 and later When importing photos, you can either import a copy of the photo or move the photo into the Zoph imagedirectory. 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. zoph --move photo.jpgzoph --copy photo.jpg --dateddirs / --no-dateddirs v0.8.2 and later --datedDirs --dated -d / --no-datedDirs --nodateddirs --nodatedDirs With dated dirs, Zoph automatically creates directories based on the (EXIF-)date of a photo. For example a photo taken on March 15, 2010, will automatically be places in a directory called 2010.03.15 No dated dirs are used. zoph --dateddirs photo.jpg --hierarchical / --no-hierarchical v0.8.2 and later -H --hier / --no-hierarchical --no-hier --nohierarchical --nohier Hierarchical dated dirs are similar to dated dirs, Zoph automatically creates directories based on the (EXIF-)date of a photo, the difference is that with hierarchical dated dirs, a separtate directory is create for year, month and day. For example a photo taken on March 15, 2010, will automatically be places in the directory tree 2010/03/15. No hierarchical dated dirs are used. zoph --hierarchical photo.jpg --hash / --no-hash v0.8.4 and later 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. Generate a hash or update the hash when --update is used. zoph --no-hash photo.jpg --parent v0.8.4 and later If you do not specify a parent, the new object will be placed directly under the root. 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. --parent must precede the actual album, category or place. The parent is only set for the next --album, --category or --place. </code>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 cateogory "Trees" under the "Nature" category:zoph --new --parent "Holidays" --album "Summer 2011" --parent "Nature" --category "Trees"<code> --autoadd v0.8.4 and later -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. zoph --autoadd --album "Summer 2011" IMG_1234.JPGNo parent album for "Summer 2011"zoph --autoadd --parent "Holidays" --album "Summer 2011" IMG_1234.JPG --addalways v0.8.4 and later -w --add-always 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. Do not add albums, categories or locations unless a parent has been specified. zoph --autoadd --addalways --album "Summer 2011" IMG_1234.JPG --recursive v0.8.4 and later -r With --recursive, Zoph will recursively go through directories added to the file list and import photos found in those dirs as well. Zoph will error if you try to import a directory. zoph -r IMG_1234.JPG Photos/Import image IMG_1234.JPG and any photos in the directory 'Photos', or any directory below that. --dirpattern v0.8.4 and later 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. This option makes no sense if you do not specify --recursive as well. Default=No default. a (album), c (category), l (location), p (person), P (photographer) and D (path) zoph -r --dirpattern "Paccc" *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. For a more detailed example, see [Using dirpatterns] --path v0.8.2 and later You may want to manually organize your photos in directories. You can use --path for that. The path is inserted between the image directory and (in case they are enabled) dated or hierarchical dated directories. Photos are imported directly under the image dir. Valid path, relative to image dir. zoph --path "holiday" photo.jpgzoph --path "travel/business" --dateddirs photo.jpg