/seize

A Command-line Utility written in Go for generating images of your CLI output using stdin

Primary LanguageGoApache License 2.0Apache-2.0

Seize

A Command-line Utility for Generating Images from CLI Outputs using stdin

DescriptionFeaturesInstallationUsageContact Me

Static Badge Static Badge Buy Me A Coffee


⬇️



Description

Seize is a Command-line utility tool written in Golang that helps you generate images from CLI outputs by taking inputs from stdin. The tool allows you to specify font and background colors and can also upload the generated images to AWS S3.

The tool is designed to help users create customized images easily and quickly, with the ability to specify text, font color, and background color. It can upload the generated images to S3-compatible storage solutions, including AWS S3.

Features

Generate Custom Images

Seize allows you to create images with custom text, font colors, and background colors by taking inputs from stdin. This makes it easy to visualize CLI outputs or other text data as images.

Upload to AWS S3

Seize can upload the generated images to an AWS S3 bucket. You can specify the necessary AWS credentials and bucket information through environment variables.

Flexible Color Options

Seize allows you to specify font and background colors using hex codes, giving you full control over the appearance of the generated images.

Installation

You can install Seize by cloning the repository and building it manually, or by using the `go install` command.

Clone and Build Manually

git clone https://github.com/umair9747/seize.git
cd seize
go build

Using go install

go install github.com/umair9747/seize@latest

Ensure your $GOPATH/bin is in your PATH:

export PATH=$PATH:$(go env GOPATH)/bin

Usage

Basic Usage

command | seize

Flags

  • -oD: Directory to save the output image (default: current directory)
  • -oF: Name of the output image file (default: generated hash)
  • -uP: Upload the image to an AWS S3 bucket
  • -fC: Font color in hex (default: white FFFFFF)
  • -bC: Background color in hex (default: dark gray 181414)

Environment Variables for Upload

AWS S3

  • AWS_ACCESS_KEY_ID: Your AWS access key ID
  • AWS_SECRET_ACCESS_KEY: Your AWS secret access key
  • AWS_BUCKET_NAME: The name of your S3 bucket
  • AWS_REGION: The AWS region of your bucket

Example for Upload

To upload the generated image to AWS S3:

export AWS_ACCESS_KEY_ID=your_aws_access_key
export AWS_SECRET_ACCESS_KEY=your_aws_secret_key
export AWS_BUCKET_NAME=your_aws_bucket_name
export AWS_REGION=your_aws_region

seize -oD ./output -oF image -fC FF0000 -bC 000000 -uP < input.txt

Contact Me

Have any suggestions, queries, feedback or just want to connect with me? Feel free to reach out using the below handles:

Also, if you'd like to support me for my future research works, please consider using this link for your donations!