tttml

tools for formatting a very basic markdown-like format
Log | Files | Refs | README

commit 97183e4b8e6d679289e808e461a4f8b4294fde4f
parent b507855bac3a7d1ca9576b1f02809fa2e804101e
Author: Josuah Demangeon <mail@josuah.net>
Date:   Thu, 19 Apr 2018 03:21:56 +0200

added man pages

Diffstat:
MMakefile | 5++++-
Amarkup-fmt.1 | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amarkup-gopher.1 | 106+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 174 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -5,6 +5,9 @@ MAN5 = markup.5 all: install: - mkdir -p $(PREFIX)/bin $(PREFIX)/man/man1 $(PREFIX)/man/man5 + mkdir -p $(PREFIX)/bin + cp $(BIN) $(PREFIX)/bin + mkdir -p $(PREFIX)/share/man/man1 cp $(MAN1) $(PREFIX)/share/man/man1 + mkdir -p $(PREFIX)/share/man/man5 cp $(MAN5) $(PREFIX)/share/man/man5 diff --git a/markup-fmt.1 b/markup-fmt.1 @@ -0,0 +1,64 @@ +.Dd $Mdocdate: April 19 2018$ +.Dt MARKUP-FMT 1 +.Os +. +. +.Sh NAME +. +.Nm markup-fmt +.Nd pretty-print and fix a markup file +. +. +.Sh SYNOPSIS +. +.Nm +.Op Ar file... +. +. +.Sh DESCRIPTION +. +The +.Nm +utility reformat a +.Xr markup 5 +and print valid format to stdout. +. +.Pp +Most markdown documents can be converted to +.Xr markup 5 +format if they do not have recursive elents such as nested lists +or quotes. +. +.Bl -bullet -width 6n +. +.It +The paragraphs are being filled to 80 columns, +. +.It +The empty lines are set as apropriate +. +.It +The blocks merged together are separated, such as lists without +separating blank spaces. +. +.It +The title and heading horizontal lines are expanded to 80 columns. +. +.It +The tags with the tagline merged with the paragraph are separated +on their own line. +. +.El +. +.Sh SEE ALSO +. +.Xr markup-gopher 1 , +.Xr smu 1 , +.Xr markup 5 , +.Lk https://github.com/Gottox/smu "simple markup - markdown like syntax" +. +. +.Sh AUTHORS +. +.An Josuah Demangeon +.Aq Mt mail@josuah.net diff --git a/markup-gopher.1 b/markup-gopher.1 @@ -0,0 +1,106 @@ +.Dd $Mdocdate: April 19 2018$ +.Dt MARKUP-GOPHER 1 +.Os +. +. +.Sh NAME +. +.Nm markup-gopher +.Nd generate a gophermap from a markup file +. +. +.Sh SYNOPSIS +. +.Nm markup-opher +.Ar host +.Ar port +.Op Ar file... +. +. +.Sh DESCRIPTION +. +The +.Nm +utility convert +.Ar file +to a gophermap format, simply by converting all link entries, +converting tabs into spaces and printing the rest. +. +.Ar host +and +.Ar port +is used to set the host in links that do not have a host, such as +.Dl /path/to/file.txt +. +.Bl -bullet -width 6n +. +.It +All URI starting with a +.Sq Li / +and ending with a +.Sq Li / +are printed using the +.Sq Li 1 +entry type +. +.It +All URI starting with a +.Sq Li / +and not ending with a +.Sq Li / +are printed using the +.Sq Li 0 +. +.It +All URI starting with +.Sq Li 0 , +.Sq Li 1 , +.Sq Li 7 , +.Sq Li 8 , +.Sq Li 9 , +.Sq Li a , +.Sq Li g , +.Sq Li h +or +.Sq Li I +followed by a +.Sq Li / +and all +.Dq li gopher:// +URI are printed using the corresponding entry type. +. +.It +All other URI are printed using the +.Sq Li h +entry type +. +.El +. +.\" .Sh CONTEXT +.\" For section 9 functions only. +.\" .Sh RETURN VALUES +.\" For sections 2, 3, and 9 function return values only. +.\" .Sh ENVIRONMENT +.\" For sections 1, 6, 7, and 8 only. +.\" .Sh FILES +.\" .Sh EXIT STATUS +.\" For sections 1, 6, and 8 only. +.\" .Sh EXAMPLES +.\" .Sh DIAGNOSTICS +.\" For sections 1, 4, 6, 7, 8, and 9 printf/stderr messages only. +.\" .Sh ERRORS +.\" For sections 2, 3, 4, and 9 errno settings only. +.\" .Sh SEE ALSO +.\" .Xr foobar 1 +.\" .Sh STANDARDS +.\" .Sh HISTORY +. +. +.Sh AUTHORS +. +.An Josuah Demangeon +.Aq Mt mail@josuah.net +. +. +.\" .Sh CAVEATS +.\" .Sh BUGS