Compare commits

...

2 Commits

Author SHA1 Message Date
ge
56feb746ef Upd 2023-02-13 23:10:44 +03:00
ge
6a25349999 Replace RST with MAN 2023-02-13 23:09:47 +03:00
5 changed files with 37 additions and 51 deletions

3
.gitignore vendored
View File

@ -1,2 +1 @@
hr
hr.1.gz
build/

View File

@ -1,9 +1,15 @@
PREFIX := "$$HOME/.local"
PREFIX ?= /usr/local
SRCDIR = src
BUILDDIR = build
all:
nimble build
rst2man src/hr.1.rst | gzip -9 -c > hr.1.gz
nimble build -d:release
gzip -9ck $(SRCDIR)/hr.1 > $(BUILDDIR)/hr.1.gz
install:
install -D hr $(PREFIX)/bin/hr
install -D hr.1.gz $(PREFIX)/share/man/man1/hr.1.gz
install -Dm755 $(BUILDDIR)/hr $(PREFIX)/bin/hr
install -Dm644 $(BUILDDIR)/hr.1.gz $(PREFIX)/share/man/man1/hr.1.gz
uninstall:
rm -v $(PREFIX)/bin/hr
rm -v $(PREFIX)/share/man/man1/hr.1.gz

View File

@ -5,6 +5,7 @@ author = "ge"
description = "A horizontal ruler for your terminal"
license = "Unlicense"
srcDir = "src"
binDir = "build"
bin = @["hr"]

24
src/hr.1 Normal file
View File

@ -0,0 +1,24 @@
.\" vim: set filetype=groff:
.TH HR 1 "2023-02-13" "hr 0.1.0"
.SH NAME
hr - A horizontal ruler for your terminal.
.SH SYNOPSYS
.SY hr
.BI [ string ]...
.YS
.SH DESCRIPTION
.PP
Print line with passed characters till the end of terminal window.
.SH EXAMPLES
.EX
$ hr +
++++++++++++++++++++++++++++++++++++++++++++++++
$ hr x0
x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0
$ hr = + =
================================================
------------------------------------------------
================================================
.EE
.SH SEE ALSO
.BR ncurses (3X)

View File

@ -1,44 +0,0 @@
==
hr
==
------------------------------------
A horizontal ruler for your terminal
------------------------------------
:Author: ge
:Copyright: Unlicense
:Date: 2022 Jul 20
:Manual section: 1
:Version: baf 0.1.0
SYNOPSIS
========
hr <string>...
DESCRIPTION
===========
Print line with passed characters till the end of terminal window.
EXAMPLES
========
::
$ hr '*'
***************************************
$ hr '#--'
#--#--#--#--#--#--#--#--#--#--#--#--#--
$ hr + - +
++++++++++++++++++++++++++++++++++++++++
----------------------------------------
++++++++++++++++++++++++++++++++++++++++
SEE ALSO
========
``ncurses``\(3X)