чување 9bb5ff15077dddc262086c8bb3909c9b31fe449f
родитељ 8ff06120708c782d4f65c7f755b4df814ee884cd
Аутор: Страхиња Радић <contact@strahinja.org>
Датум: Wed, 16 Aug 2023 21:25:36 +0200
Add manpages for transpose, tsv{edit,del,ins}
Signed-off-by: Страхиња Радић <contact@strahinja.org>
Diffstat:
измењених датотека: 8, додавања: 116(+), брисања: 4(-)
diff --git a/.gitignore b/.gitignore
@@ -17,7 +17,7 @@ nohup.out
*.xz
config.redo
ste
-ste.1
+*.1
ste.session
compile_commands.json
date
diff --git a/all.do b/all.do
@@ -1 +1 @@
-redo-ifchange ste ste.1.gz
+redo-ifchange ste ste.1.gz transpose.1.gz tsvedit.1.gz tsvdel.1.gz tsvins.1.gz
diff --git a/install.do b/install.do
@@ -14,4 +14,6 @@ install -d $BINDIR $MANDIR
for binfile in ste transpose tsvdel tsvins tsvedit; do
install -m 0755 "${binfile}" "${BINDIR}/${binfile}"
done
-install -m 0644 ste.1.gz "${MANDIR}/ste.1.gz"
+for manfile in ste transpose tsvdel tsvins tsvedit; do
+ install -m 0644 "${manfile}.1.gz" "${MANDIR}/${manfile}.1.gz"
+done
diff --git a/transpose.1.in b/transpose.1.in
@@ -0,0 +1,16 @@
+.Dd %DATE%
+.Dt TRANSPOSE 1
+.Os
+.Sh NAME
+.Nm transpose
+.Nd Transpose a TSV file
+.Sh SYNOPSIS
+.Nm
+.Op Ar tsvfile.tsv
+.Sh DESCRIPTION
+.Nm
+converts lines in a TSV file to columns and vice versa, similar to the matrix
+transpose operation from linear algebra.
+.Sh AUTHORS
+.An "Strahinya Radich" Aq contact@strahinja.org ,
+2023
diff --git a/tsvdel.1.in b/tsvdel.1.in
@@ -0,0 +1,27 @@
+.Dd %DATE%
+.Dt TSVDEL 1
+.Os
+.Sh NAME
+.Nm tsvdel
+.Nd Delete a line from a TSV file
+.Sh SYNOPSIS
+.Nm
+.Op Ar tsvfile.tsv
+.Op Ar rowno | Ar colno Ar text
+.Sh DESCRIPTION
+.
+.Bl -tag -width ".Nm Ar rowno" -offset indent
+.
+.It Nm Ar tsvfile.tsv Ar rowno
+select the line (row) to be deleted by its row number (1\-based)
+.
+.It Nm Ar tsvfile.tsv Ar colno Ar text
+select the line (row) to be deleted by searching the column with index
+.Ar colno
+(1\-based) for
+.Ar text .
+.
+.El
+.Sh AUTHORS
+.An "Strahinya Radich" Aq contact@strahinja.org ,
+2023
diff --git a/tsvedit.1.in b/tsvedit.1.in
@@ -0,0 +1,34 @@
+.Dd %DATE%
+.Dt TSVEDIT 1
+.Os
+.Sh NAME
+.Nm tsvedit
+.Nd Edit a line from a TSV file
+.Sh SYNOPSIS
+.Nm
+.Op Ar tsvfile.tsv
+.Op Ar rowno | Ar colno Ar text
+.Sh DESCRIPTION
+.
+.Bl -tag -width ".Nm Ar rowno" -offset indent
+.
+.It Nm Ar tsvfile.tsv Ar rowno
+select the line (row) to be edited by its row number (1\-based)
+.
+.It Nm Ar tsvfile.tsv Ar colno Ar text
+select the line (row) to be edited by searching the column with index
+.Ar colno
+(1\-based) for
+.Ar text .
+.
+.El
+.Sh IMPLEMENTATION NOTES
+Needs
+.Xr vipe 1
+from moreutils
+.Lk https://joeyh.name/code/moreutils/
+and any
+.Ev $EDITOR .
+.Sh AUTHORS
+.An "Strahinya Radich" Aq contact@strahinja.org ,
+2023
diff --git a/tsvins.1.in b/tsvins.1.in
@@ -0,0 +1,31 @@
+.Dd %DATE%
+.Dt TSVINS 1
+.Os
+.Sh NAME
+.Nm tsvins
+.Nd Insert a line to a TSV file
+.Sh SYNOPSIS
+.Nm
+.Op Ar tsvfile.tsv
+.Op Ar lineno
+.Sh DESCRIPTION
+.
+Insert a line to a TSV file after the line
+.Ar lineno
+(1-based).
+When 0 is passed as
+.Ar lineno ,
+insert a line as first (header) line.
+If
+.Ar lineno
+is omitted, insert a line at the end of file.
+.Sh IMPLEMENTATION NOTES
+Needs
+.Xr vipe 1
+from moreutils
+.Lk https://joeyh.name/code/moreutils/
+and any
+.Ev $EDITOR .
+.Sh AUTHORS
+.An "Strahinya Radich" Aq contact@strahinja.org ,
+2023
diff --git a/uninstall.do b/uninstall.do
@@ -9,5 +9,7 @@ MANDIR=$PREFIX/share/man/man1
for binfile in ste transpose tsvdel tsvins tsvedit; do
rm -f "${BINDIR}/${binfile}"
done
-rm -f "${MANDIR}/ste.1.gz"
+for manfile in ste transpose tsvdel tsvins tsvedit; do
+ rm -f "${MANDIR}/${manfile}.1.gz"
+done
#$(find $DOCDIR -type f)