diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..faadedf --- /dev/null +++ b/LICENSE @@ -0,0 +1,11 @@ +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL +THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/Makefile b/Makefile index 6599b28..132ec20 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,12 @@ all: install: geminawk.sh install -m755 geminawk.sh \ "$${DESTDIR}/$${PREFIX-usr/local}/bin/geminawk" + install -m444 geminawk.1 \ + "$${DESTDIR}/$${PREFIX-usr/local}/$${MANDIR:-share/man}/man1/" linstall: geminawk.sh install -m755 geminawk.sh "$$HOME/bin/geminawk" +README: geminawk.1 + $${MANDOC:-mandoc} \ + $${MANDOCFLAGS:--Ios= -Tascii -Omdoc -Owidth=72} \ + geminawk.1 | col -b > $@ clean: diff --git a/README b/README index c8cf354..41ee71d 100644 --- a/README +++ b/README @@ -1,3 +1,30 @@ -Only OpenBSD and LibreSSL-Portable nc(1) have TLS support. -To use a different utility set the `NC' and `NCFLAGS' environment -variables, or change the the defaults in the source file. +GEMINAWK(1) General Commands Manual GEMINAWK(1) + +NAME + GEMINAWK - a Gemini client writen with awk(1) + +SYNOPSIS + GEMINAWK [-p default-port] [-r max-redirects] URL ... + +DESCRIPTION + Fetch URL using the Gemini protocol. + + The options are as follows: + + -p default-port + Set the default port to use when there is no port in the + URL. (default 1965) + + -r -max-redirects + Set the maximum number of redirects to follow. (default 5) + gemini-cat gemini://tilde.black/ | more + +SEE ALSO + awk(1), nc(1) + +CAVEATS + By default, this only works with the OpenBSD, or LibreSSL, nc(1). + To use a different program for the TLS connection set the NC and + NCFLAGS environment variables, or edit the script itself. + + May 16, 2020 diff --git a/geminawk.1 b/geminawk.1 new file mode 100644 index 0000000..9eca3b8 --- /dev/null +++ b/geminawk.1 @@ -0,0 +1,38 @@ +.Dd May 16, 2020 +.Dt GEMINAWK 1 +.Os +.Sh NAME +.Nm GEMINAWK +.Nd a Gemini client written with +.Xr awk 1 +.Sh SYNOPSIS +.Nm +.Op Fl p Ar default-port +.Op Fl r Ar max-redirects +.Ar URL ... +.Sh DESCRIPTION +Fetch +.Ar URL +using the Gemini protocol. +.Pp +The options are as follows: +.Bl -tag -width Ds +.It Fl p Ar default-port +Set the default port to use when there is no port in the +.Ar URL . +.Pq default Li 1965 +.It Fl r max-redirects +Set the maximum number of redirects to follow. +.Pq default Li 5 +.El +.Sh SEE ALSO +.Xr awk 1 , +.Xr nc 1 +.Sh CAVEATS +By default, this only works with the OpenBSD, or LibreSSL, +.Xr nc 1 . +To use a different program for the TLS connection set the +.Ev NC +and +.Ev NCFLAGS +environment variables, or edit the script itself.