Giter Site home page Giter Site logo

hevi's Introduction

HEVI - A hex viewer

ci status

example image

What is hevi?

Hevi is a hex viewer, just like xxd or hexdump.

But it's missing X...

Hevi is under development. But if you think it's missing any feature, please open an issue. I will address it as soon as possible.

Usage

The command should be used as hevi <file> [flags]. The flags are described below.

Flags

Flag(s) Description
-h/--help Show a help message
-v/--version Show version information
--color/--no-color Enable or disable colored output
--lowercase/--uppercase Toggle between lowercase and uppercase hex
--size/--no-size Enable or disable the line showing the size at the end
--offset/--no-offset Enable or disable showing the offset
--ascii/--no-ascii Enable or disable ASCII interpretation
--skip-lines/--no-skip-lines Enable or disable skipping of identical lines
--parser Specify the parser to use. For a list use hevi --help

Environment variables

The NO_COLOR variable is supported, and disables color (see https://no-color.org/) printing. Note that it can be overwritten by an explicit --color.

Config file

You can create a config file and specify the default values for the flags. It follows the .json syntax. Example:

{
    "color": true,
    "uppercase": true,
    "show_size": false,
    "show_offset": true,
    "show_ascii": false,
    "skip_lines": true,
    "parser": "data",
    "palette": {
        "normal": { "base": "yellow", "dim": false },
        "normal_alt": { "base": "yellow", "dim": true },
        "c1": { "base": "red", "dim": false },
        "c1_alt": { "base": "red", "dim": true },
        "c2": { "base": "green", "dim": false },
        "c2_alt": { "base": "green", "dim": true },
        "c3": { "base": "blue", "dim": false },
        "c3_alt": { "base": "blue", "dim": true },
        "c4": { "base": "magenta", "dim": false },
        "c4_alt": { "base": "magenta", "dim": true },
        "c5": { "base": "cyan", "dim": false },
        "c5_alt": { "base": "cyan", "dim": true }
    }
}

Note: for the palette field you must specify all palettes!

The config file is located at:

OS Path
Linux, MacOS, FreeBSD, OpenBSD, NetBSD $XDG_CONFIG_HOME/hevi/config.json or if the env doesn't exist $HOME/.config/hevi/config.json
Windows %APPDATA%/hevi/config.json
Other Not supported. No config file will be read

Note: hevi has a precedence for configuration and is:

  1. Flags
  2. Environment variables
  3. Config file
  4. Defaults

About

It is written in zig, in an attempt to simplify hex viewers.

Installation

AUR

If you're using Arch Linux, you can install it from the AUR (hevi-bin).

Other platforms

You can download a binary from the releases page. You can also clone the repository and compile it with zig build (using a zig master build).

Contribute

Contributions are welcome! Even if you don't want to write code, you can help a lot creating new issues or testing this software.

License

See LICENSE

License: GPL v3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.