Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

129 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Piwigo Cli

Installation

This tools allow you to interact with your Piwigo Instance. Installation:

$ go install github.com/celogeek/piwigo-cli/cmd/piwigo-cli@latest

Help

To get help:

$ piwigo-cli -h

Usage:
  piwigo-cli [OPTIONS] <command>

Help Options:
  -h, --help  Show this help message

Available commands:
  categories  Categories management
  getinfos    Get general information
  images      Images management
  method      Reflexion management
  session     Session management

QuickStart

Login

First connect to your instance:

$ piwigo-cli session login -u URL -l USER -p PASSWORD

Status

Then check your status

$ piwigo-cli session status

Commands

General commands

$ piwigo-cli getinfos

GetInfos Command

General information of your instance.

$ piwigo-cli getinfos

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ KEY               β”‚ VALUE               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ version           β”‚ 12.2.0              β”‚
β”‚ nb_elements       β”‚ 39664               β”‚
β”‚ nb_categories     β”‚ 816                 β”‚
β”‚ nb_virtual        β”‚ 816                 β”‚
β”‚ nb_physical       β”‚ 0                   β”‚
β”‚ nb_image_category β”‚ 39714               β”‚
β”‚ nb_tags           β”‚ 73                  β”‚
β”‚ nb_image_tag      β”‚ 24024               β”‚
β”‚ nb_users          β”‚ 3                   β”‚
β”‚ nb_groups         β”‚ 1                   β”‚
β”‚ nb_comments       β”‚ 0                   β”‚
β”‚ first_date        β”‚ 2021-08-27 20:15:15 β”‚
β”‚ cache_size        β”‚ 4242                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Categories List Command

List the categories.

$ piwigo-cli categories list

β”Œβ”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   ID β”‚ NAME                      β”‚ IMAGES β”‚ TOTAL IMAGES β”‚ URL                                                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚    4 β”‚ 2021                      β”‚      0 β”‚         1520 β”‚ https://yourphotos/index.php?/category/4             β”‚
β”‚  677 β”‚ 2021/Animals              β”‚      0 β”‚           49 β”‚ https://yourphotos/index.php?/category/677           β”‚
β”‚   24 β”‚ 2021/Animals/Cats         β”‚     29 β”‚           32 β”‚ https://yourphotos/index.php?/category/24            β”‚
β”‚  760 β”‚ 2021/Animals/Cats/Videos  β”‚      3 β”‚            3 β”‚ https://yourphotos/index.php?/category/760           β”‚
β””β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Images List Command

List the images of a category.

Recursive list:

$ piwigo-cli images list -r

Category1/SubCategory1/IMG_00001.jpeg
Category1/SubCategory1/IMG_00002.jpeg
Category1/SubCategory1/IMG_00003.jpeg
Category1/SubCategory1/IMG_00004.jpeg
Category1/SubCategory2/IMG_00005.jpeg
Category1/SubCategory2/IMG_00006.jpeg
Category2/SubCategory1/IMG_00007.jpeg

Specify a category:

$ piwigo-cli images list -r -c 2

Category2/SubCategory1/IMG_00007.jpeg

Tree view:

$ piwigo-cli images list -r -c 1 -t

.
β”œβ”€β”€ SubCategory1
β”‚   β”œβ”€β”€ IMG_00001.jpeg
β”‚   β”œβ”€β”€ IMG_00002.jpeg
β”‚   β”œβ”€β”€ IMG_00003.jpeg
β”‚   └── IMG_00004.jpeg
└── SubCategory2
    β”œβ”€β”€ IMG_00005.jpeg
    └── IMG_00006.jpeg

Images Details Command

Get details of an image. It supports the birthday plugin.

$ piwigo-cli images details -i 38062

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ KEY           β”‚ VALUE                                                                     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Id            β”‚ 38062                                                                     β”‚
β”‚ Md5           β”‚ 6ad2abade6d5460181890e2bad671002                                          β”‚
β”‚ Name          β”‚ 2006 04 14 015                                                            β”‚
β”‚ DateAvailable β”‚ 2021-11-25 20:25:05                                                       β”‚
β”‚ DateCreation  β”‚ 2006-04-14 04:14:00                                                       β”‚
β”‚ LastModified  β”‚ 2022-01-01 23:11:48                                                       β”‚
β”‚ Width         β”‚ 1984                                                                      β”‚
β”‚ Height        β”‚ 1488                                                                      β”‚
β”‚ Url           β”‚ https://yourphotos/picture.php?/38062                                     β”‚
β”‚ ImageUrl      β”‚ https://yourphotos/upload/2021/11/25/20211125202505-6ad2abad.jpg          β”‚
β”‚ Filename      β”‚ 2006_04_14_015.jpeg                                                       β”‚
β”‚ Filesize      β”‚ 513                                                                       β”‚
β”‚ Categories    β”‚ 2007                                                                      β”‚
β”‚ Tags          β”‚ User Tag 1 (46 years old)                                                 β”‚
β”‚               β”‚ User Tag 2 (8 months old)                                                 β”‚
β”‚               β”‚ User Tag 3 (48 years old)                                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Derivatives:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ NAME    β”‚ WIDTH β”‚ HEIGHT β”‚ URL                                                                                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ thumb   β”‚   144 β”‚    108 β”‚ https://yourphotos/i.php?/upload/2021/11/25/20211125202505-6ad2abad-th.jpg           β”‚
β”‚ xsmall  β”‚   432 β”‚    324 β”‚ https://yourphotos/i.php?/upload/2021/11/25/20211125202505-6ad2abad-xs.jpg           β”‚
β”‚ xxlarge β”‚  1656 β”‚   1242 β”‚ https://yourphotos/_data/i/upload/2021/11/25/20211125202505-6ad2abad-xx.jpg          β”‚
β”‚ square  β”‚   120 β”‚    120 β”‚ https://yourphotos/_data/i/upload/2021/11/25/20211125202505-6ad2abad-sq.jpg          β”‚
β”‚ small   β”‚   576 β”‚    432 β”‚ https://yourphotos/_data/i/upload/2021/11/25/20211125202505-6ad2abad-sm.jpg          β”‚
β”‚ medium  β”‚   792 β”‚    594 β”‚ https://yourphotos/_data/i/upload/2021/11/25/20211125202505-6ad2abad-me.jpg          β”‚
β”‚ large   β”‚  1008 β”‚    756 β”‚ https://yourphotos/i.php?/upload/2021/11/25/20211125202505-6ad2abad-la.jpg           β”‚
β”‚ xlarge  β”‚  1224 β”‚    918 β”‚ https://yourphotos/_data/i/upload/2021/11/25/20211125202505-6ad2abad-xl.jpg          β”‚
β”‚ 2small  β”‚   240 β”‚    180 β”‚ https://yourphotos/i.php?/upload/2021/11/25/20211125202505-6ad2abad-2s.jpg           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Images Upload Command

Upload an image or a video in chunks. It will skip existing file on the server.

$ piwigo-cli images upload -f ~/Downloads/IMG_4886.jpeg -j 4

Images Upload Tree Command

Upload a tree of images and videos in chunks, skipping existing file on the server.

$ piwigo-cli images upload-tree -d ~/Downloads/2021 -j4 -c 4

Images Tag Command

Massive tag your image in your terminal.

$ piwigo-cli images tag -h
Usage:
  piwigo-cli [OPTIONS] images tag [tag-OPTIONS]

Help Options:
  -h, --help                      Show this help message

[tag command options]
      -i, --id=                   image id to tag
      -t, --tag-id=               look up for the first image of this tagId
      -T, --tag=                  look up for the first image of this tagName
      -x, --exclude=              exclude tag from selection
      -m, --max=                  loop on a maximum number of images (default: 1)
      -k, --keep                  keep survey filter
      -K, --keep-previous-answer  Preserve previous answer

Example: Retag the image you mark as "todo:todo-2006", 50 max at a time, by keeping the previous selection between images.

$ piwigo-cli images tag -x ^todo -T todo:todo-2006 -m 50 -K

It displays in well on iTerm:

  • image
  • some details with the previous tag
  • list of tags selection

You can use "SPACE" for selection of a tag, "LEFT" to remove the current selection, type words to lookup.

visualtag

License

MIT

About

Command line client for piwigo

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages