https://github.com/kellpossible/photo-captioner
A command line tool to assist with creating and editing captions for a gallery of images
https://github.com/kellpossible/photo-captioner
Last synced: about 1 year ago
JSON representation
A command line tool to assist with creating and editing captions for a gallery of images
- Host: GitHub
- URL: https://github.com/kellpossible/photo-captioner
- Owner: kellpossible
- License: mit
- Created: 2019-11-16T13:55:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-05-07T01:35:26.000Z (about 4 years ago)
- Last Synced: 2025-03-26T23:03:44.644Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 98.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# photo-captioner [](https://crates.io/crates/photo-captioner) [](https://github.com/kellpossible/photo-captioner/blob/master/LICENSE.txt)
This is a command line application to aid in the creation and editing of captions for a gallery of images.

Install:
```bash
cargo install photo-captioner
```
Command Line Options:
```txt
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
The name of the output file (if there is one). Will be "captions.csv" by default for the "csv" output-type.
-t, --output-type The type of output, available options: "csv" [default: csv]
-c, --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 ...
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:
Directory of the gallery to generate captions for
```
CSV output file:
```csv
Image,Caption
image_filename.jpg,caption
```
## Building on Windows
Building on Windows currently requires you to select a [different backend](https://github.com/gyscos/cursive/wiki/Backends) for the [cursive](https://github.com/gyscos/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](https://github.com/crossterm-rs/crossterm) library. To select this for building use the command:
```sh
cargo build --no-default-features --features crossterm-backend --release
```
## Example
Using the [feh](https://feh.finalrewind.org/) image viewer to preview images while editing captions, and scale them nicely to fit the screen.
```bash
photo-captioner -e -c "feh" -a "\-\-scale-down" "\-B" "black" -- /photo/gallery/path
```
Using Windows Explorer image viewer on Windows to preview images:
```bash
photo-captioner -e -c "explorer.exe" -- /photo/gallery/path
```
## Features
Features available are ticked, todo items remain unchecked until completed.
- [x] generate captions.csv file in gallery directory
- [x] gui (terminal ui) editor for editing captions
- [x] update captions.csv with new images
- [ ] write/read to jpg exif