Go to file
Atanas Yankov 77a451abd8 Print grey boxes instead of transparent background 2019-05-02 01:22:10 +01:00
img Add more images for testing 2019-05-01 19:37:26 +01:00
src Print grey boxes instead of transparent background 2019-05-02 01:22:10 +01:00
.gitignore Rename app to viu 2019-04-12 17:58:46 +03:00
Cargo.lock Rename app to viu 2019-04-12 17:58:46 +03:00
Cargo.toml Rename app to viu 2019-04-12 17:58:46 +03:00
LICENSE-MIT Add LICENSE-MIT 2019-04-12 18:11:33 +03:00
README.md Update readme 2019-05-01 01:49:23 +01:00

README.md

viu

Description

A small command-line application to view images from the terminal written in Rust. It uses lower half blocks (▄ or \u2584) to fit 2 pixels into a single cell by adjusting foreground and background colours accordingly.

Installation

Installation is currently only available from source and a local Rust environment is required.

git clone https://github.com/atanunq/viu.git

# Build & Install
cd viu/
cargo install --path .

# Use
viu img/smallimage.jpg

Usage

Examples:

  • viu img/smallimage.jpg
  • viu img/*

The shell will expand the wildcard above and viu will display all the images in the folder one after the other. For a more informative output when dealing with folders the flag -n could be used.

Aspect Ratio

If no flags are supplied to viu it will try to get the size of the terminal where it was invoked. If it succeeds it will fit the image and preserve the aspect ratio. The aspect ratio will be changed only if both options -w and -h are used together.

Command line options
USAGE:
    viu [FLAGS] [OPTIONS] <FILE>...

FLAGS:
    -m, --mirror     Display a mirror of the original image
    -n, --name       Output the name of the file before displaying
    -v, --verbose    Output what is going on

OPTIONS:
    -h, --height <height>    Resize the image to a provided height
    -w, --width <width>      Resize the image to a provided width

ARGS:
    <FILE>...    The image to be displayed