photo-captioner

Crates.iophoto-captioner
lib.rsphoto-captioner
version0.1.3
sourcesrc
created_at2019-11-16 14:57:40.341131
updated_at2021-09-06 17:16:44.879149
descriptionA tool to assist with creating and editing captions for a gallery of images
homepage
repositoryhttps://github.com/kellpossible/photo-captioner
max_upload_size
id181834
size125,950
Luke Frisken (kellpossible)

documentation

README

photo-captioner crates io badge license badge

This is a command line application to aid in the creation and editing of captions for a gallery of images.

edit menu screenshot

Install:

cargo install photo-captioner

Command Line Options:

USAGE:
    photo-captioner [FLAGS] [OPTIONS] [--] [gallery-dir]

FLAGS:
    -e, --edit       whether or not to edit the captions
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -n, --output-name <output-name>
            The name of the output file (if there is one). Will be "captions.csv" by default for the "csv" output-type.

    -t, --output-type <output-type>                   The type of output, available options: "csv" [default: csv]
    -c, --view-command <view-command>
            The command used to launch an image viewer upon editing the caption for an image in order to view the image
            who's caption is being edited
    -a, --view-command-args <view-command-args>...
            The command used to launch an image viewer upon editing the caption for an image in order to view the image
            who's caption is being edited. Escape dash "-" symbols with a backslash: "\-". For example: -a "\-\-some"
            "command"

ARGS:
    <gallery-dir>    Directory of the gallery to generate captions for

CSV output file:

Image,Caption
image_filename.jpg,caption

Building on Windows

Building on Windows currently requires you to select a different backend for the cursive library. Target specific default features doesn't appear to be well supported in cargo/rust at the moment.

You have a few choices, but the one with the least effort required to setup is the crossterm library. To select this for building use the command:

cargo build --no-default-features --features crossterm-backend --release

Example

Using the feh image viewer to preview images while editing captions, and scale them nicely to fit the screen.

photo-captioner -e -c "feh" -a "\-\-scale-down" "\-B" "black" -- /photo/gallery/path

Using Windows Explorer image viewer on Windows to preview images:

photo-captioner -e -c "explorer.exe" -- /photo/gallery/path

Features

Features available are ticked, todo items remain unchecked until completed.

  • generate captions.csv file in gallery directory
  • gui (terminal ui) editor for editing captions
  • update captions.csv with new images
  • write/read to jpg exif
Commit count: 20

cargo fmt