diff options
author | jakobst1n <jakob.stendahl@outlook.com> | 2024-06-08 22:40:49 +0200 |
---|---|---|
committer | jakobst1n <jakob.stendahl@outlook.com> | 2024-06-08 22:40:49 +0200 |
commit | 4e6a860b275abda39ade147ee7cdc48a3520212a (patch) | |
tree | 50102e75438ca2ada76bbf7d3e6b462f3af5e8af | |
parent | 136502f371851efec48426d424115e136033c157 (diff) | |
download | textgraph-4e6a860b275abda39ade147ee7cdc48a3520212a.tar.gz textgraph-4e6a860b275abda39ade147ee7cdc48a3520212a.zip |
Add simple readme and manual, add script to build debian package
-rw-r--r-- | README.md | 11 | ||||
-rw-r--r-- | packaging/DEBIAN/control | 5 | ||||
-rwxr-xr-x | packaging/package-debian.sh | 24 | ||||
-rw-r--r-- | tg.1 | 38 |
4 files changed, 78 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..f0dd97a --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# TextGraph + +A small terminal utility which displays graphs as plain text, +with the goal of having no dependencies, +being lightweight, and reasonably performant. + +It is meant to be used in a traditional unix way, +by piping data through it. +It was written because I sometimes have the need to +watch some state in a sql table for a short while. + diff --git a/packaging/DEBIAN/control b/packaging/DEBIAN/control new file mode 100644 index 0000000..c4b584e --- /dev/null +++ b/packaging/DEBIAN/control @@ -0,0 +1,5 @@ +Package: textgraph +Version: 0.1.0 +Maintainer: jakobst1n +Architecture: all +Description: Text graphing utility diff --git a/packaging/package-debian.sh b/packaging/package-debian.sh new file mode 100755 index 0000000..3bea609 --- /dev/null +++ b/packaging/package-debian.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -x + +tmpdir=$(mktemp -d) + +dir="${tmpdir}/textgraph" + +mkdir -p ${dir} +rm -r ${dir} +mkdir -p ${dir} +cargo build --release + +bindir=${dir}/usr/local/bin +mkdir -p ${bindir} + +mandir=${dir}/usr/share/man/man1 +mkdir -p ${mandir} + +cp -r packaging/DEBIAN ${dir}/DEBIAN +cp target/release/textgraph ${bindir}/tg +cp tg.1 ${mandir}/tg.1 + +cd ${tmpdir} +dpkg-deb --build textgraph @@ -0,0 +1,38 @@ +.TH TG 1 2024-06-08 +.SH name +tg \- TermGraph \- Text graphing utility +.SH SYNOPSIS +.B tg +[-a|--axis] [-l|--last-n \fIN\fR] [-h|--height \fIN\fR] [-w|--width \fIN\fR] [-t \fItype\fR] [--interpolate] + +.SH DESCRIPTION +.B tg +TermGraph is a utility for graphing + +.SH OPTIONS +.IP "\fB-h, --help\fR" +Display help information. + +.IP "\fB-a, --axis\fR" +Enable axis on the resulting graph. + +.IP "\fB-w, --width\fR \fIwidth\fR" +Specify a width for the output. +If not specified, it will attempt to determine the TTY width and use that. +If it cannot be automatically determined, it will fail. + +.IP "\fB-h, --height\fR \fIheight\fR" +Specify a height for the output. +If not specified, it will attempt to determine the TTY height and use that. +If it cannot be automatically determined, it will fail. + +.SH EXAMPLES + +The simplest version is if you have a text file of values +.PP +.nf +.RS +cat \fIfile\fR | tg --axis +.RE +.fi +.PP |