hackerb9 / vv

An image viewer for sixel terminals.
GNU General Public License v3.0
59 stars 9 forks source link
cli command-line console graphics imagemagick images pager sixel ssh terminal

vv: VT View

A simple image viewer for video terminals capable of sixel graphics.

Quickly preview, delete, and move files. Particularly useful on remote machines over ssh.

Example of vv showing an avatar with a transparent background

Installation

It's a shell script. Just download vv to a directory in your PATH (e.g., ~/bin or /usr/local/bin) and make it executable (chmod +x vv).

Required dependencies

Recommended but not required

Some nice features

NOTES

Note 1

This is designed mainly for quickly previewing, deleting, and renaming images over an ssh connection. For that reason, fast, small, low-quality images are emphasized and deletion is a single keystroke. (Note, undeletion is also a single key).

Note 2

libglib2.0-bin's gio will be used for moving files to the Trashcan, if it is installed, but it is not required. See the trash() and untrash() shell functions.

Note 3

Bash 4.4 had a bug where catching SIGWINCH in the middle of a normal 'read' would cause the stty to go insane. For that reason, in the main loop we use 'read -e' which uses readline and does not suffer from the bug. (Bash 5 is fine.)

Note 4

ImageMagick 6.9.12 has a few issues:

Todo

Questions

About Metadata

The author, hackerb9, has long added little notes and blurbs to images in the JPEG "Comments" field. However, that humble field has been extended by EXIF, IPTC, and XMP to a dizzying degree: Description, Caption, Headline, Title, .... If you are a professional photographer and have feedback on how this program can better show and manipulate metadata, please send a bug report at https://github.com/hackerb9/vv/issues/

Here's what we know.

The IPTC industry standards define Title, Description/Caption, and Headline as:

"Title", AKA "Document Title", AKA "Object Name"

A shorthand reference for the image or “photograph” - primarily for identification. The title of an image should be a short, human-readable name - text and/or numeric reference - and may take several forms. For photographers, this might be the filename of their original scan or digital camera file. The Title term should not be confused with the Headline term, which is a short synopsis of the photograph's content.

Title Examples: "IMG_9873", or "Sunrise Over Temple"

"Description", AKA "Caption"

The Description field, often referred to as “Caption,” should report the who, what and why of what the photograph depicts. If there is a person or people in the image, this caption might include their names, and/or their roles in any action taking place. If the image depicts a location, then it should describe the location.

Description Example: "The Shore Temple of the Seven Pagodas was built under Narsimha II of the Pallava dynasty between 7th and 8th century AD and is dedicated to Lord Shiva. It resembles the structure of the Dharmaraja rath, but its tower rises much higher (approx. five stories or ~ 60 ft. high) and its stupa spire is small and slender."

Headline

A headline is a brief, publishable synopsis or summary of the contents of the photograph. Like a news story's lead, the Headline should grab attention and summarize the image's content. Headlines must be succinct. Leave any supporting narrative for the Description field. Do not, however, confuse the Headline term with Title.

Headline Example: "Shore Temple, Malibalipuram, India"

IPTC Summary

So, it sounds like, in theory, "Title" is supposed to be the title of the document, like a filename and would be where we jot down typical comments. HOWEVER: Microsoft Windows uses "Title" as the Caption and Flickr uses "Title" as the Headline. So, YMMV.

For now, vv does not alter IPTC and only allows setting the "Comment" field using the C key`. However, the editproperty function should work once we figure out what the right field to edit is.