add hexyl

This commit is contained in:
AJ ONeal
2020-07-14 20:25:48 +00:00
parent 991861fcf5
commit 6de69579c8
3 changed files with 89 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
---
title: hexyl
homepage: https://github.com/sharkdp/hexyl
tagline: |
hexyl is a simple hex viewer for the terminal.
---
## Updating
```bash
webi hexyl@stable
```
Use the `@beta` tag for pre-releases.
## Cheat Sheet
![](https://camo.githubusercontent.com/1f71ee7031e1962b23f21c8cc89cb837e1201238/68747470733a2f2f692e696d6775722e636f6d2f4d574f3975534c2e706e67)
> It uses a colored output to distinguish different categories of bytes (NULL
> bytes, printable ASCII characters, ASCII whitespace characters, other ASCII
> characters and non-ASCII).
`hexyl` is pretty self-explanatory.
If you know that you need a _hex viewer_, then you probably already know enough
to see why this is particularly useful, and can figure out how to use it.
```bash
echo "hello" > foo.bin
hexyl foo.bin
```
For options, such as `--length`, `--skip`, and `--offset`, see:
```bash
hexyl --help
```
+31
View File
@@ -0,0 +1,31 @@
#!/bin/bash
{
set -e
set -u
###############
# Install hexyl #
###############
WEBI_SINGLE=true
pkg_get_current_version() {
# 'hexyl --version' has output in this format:
# hexyl 0.8.0
# This trims it down to just the version number:
# 0.8.0
echo $(hexyl --version 2>/dev/null | head -n 1 | cut -d' ' -f 2)
}
pkg_install() {
# $HOME/.local/
mkdir -p "$pkg_src_bin"
# mv ./hexyl-*/hexyl "$HOME/.local/opt/hexyl-v0.8.0/bin/hexyl-v0.8.0"
mv ./hexyl-*/hexyl "$pkg_src_cmd"
# chmod a+x "$HOME/.local/xbin/rg-v11.1.0"
chmod a+x "$pkg_src_cmd"
}
}
+20
View File
@@ -0,0 +1,20 @@
'use strict';
var github = require('../_common/github.js');
var owner = 'sharkdp';
var repo = 'hexyl';
module.exports = function (request) {
return github(request, owner, repo).then(function (all) {
return all;
});
};
if (module === require.main) {
module.exports(require('@root/request')).then(function (all) {
all = require('../_webi/normalize.js')(all);
all.releases = all.releases.slice(0, 10);
//console.info(JSON.stringify(all));
console.info(JSON.stringify(all, null, 2));
});
}