~lioploum/offpunk-devel

Provide manuals for new commands. v1 PROPOSED

Étienne Mollier: 2
 Provide manuals for new commands.
 offpunk.1: cross reference other manual pages.

 5 files changed, 236 insertions(+), 0 deletions(-)
Hi Ploum,

Ploum, on 2023-08-27:
Next
Hi phoebos,

phoebos, on 2023-08-28:
Next
Ploum, on 2023-08-28:
Next
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~lioploum/offpunk-devel/patches/44061/mbox | git am -3
Learn more about email & git

[PATCH 1/2] Provide manuals for new commands. Export this patch

This patch add stubs of documentation for ansicat(1), netcache(1),
migrate-offpunk-cache(1) and opnk(1) in prevision of offpunk 2.0
release.  The migration script manual notably resolves issue #15.
Signed-off-by: Étienne Mollier <emollier@debian.org>
---
 man/ansicat.1               | 72 +++++++++++++++++++++++++++++++++++++
 man/migrate-offpunk-cache.1 | 44 +++++++++++++++++++++++
 man/netcache.1              | 63 ++++++++++++++++++++++++++++++++
 man/opnk.1                  | 53 +++++++++++++++++++++++++++
 4 files changed, 232 insertions(+)
 create mode 100644 man/ansicat.1
 create mode 100644 man/migrate-offpunk-cache.1
 create mode 100644 man/netcache.1
 create mode 100644 man/opnk.1

diff --git a/man/ansicat.1 b/man/ansicat.1
new file mode 100644
index 0000000..042a449
--- /dev/null
+++ b/man/ansicat.1
@@ -0,0 +1,72 @@
.Dd August 27, 2023
.Dt ANSICAT 1
.Os Debian
.
.Sh NAME
.Nm ansicat
.Nd terminal gemini gemtext renderer for offpunk
.
.Sh SYNOPSIS
.Nm
.Op Fl \-format Ar RENDERER
.Op Fl \-mime Ar MIME
.Op Fl \-url Ar URL ...
.Op Ar INPUT ...
.Nm
.Fl h | \-help
.
.Sh DESCRIPTION
Ansicat is the rendering engine of the browser
.Xr offpunk 1 .
It will render nicely on the terminal any gemtext,
html,
gopher,
and a few other formats.
.Pp
.Xr Offpunk 1
is a command-line browser and feed reader dedicated to browsing the Web,
Gemini, Gopher and Spartan.
.Ss Positional arguments
.Bl -tag -width Ds -offset indent
.It Ar INPUT
path to the text to render.
It defaults to the standard input.
.El
.Ss Keyword arguments
.Bl -tag -width Ds -offset indent
.It Fl h , \-help
show a help message and exit.
.It Fl \-format Ar RENDERER
renderer to use.
Available renderers are
.Ic auto ,
.Ic gemtext ,
.Ic html ,
.Ic feed ,
.Ic gopher ,
.Ic image ,
and
.Ic folder .
The
.Ic auto
renderer will heuristically guess the format,
either thanks to the MIME type,
or from the file being rendered itself.
.It Fl \-mime Ar MIME
MIME type of the content to parse.
.It Fl \-url Ar URL ...
original URL of the content.
.El
.
.Sh EXIT STATUS
.Ex -std
.
.Sh SEE ALSO
.Xr migrate-offpunk-cache 1 ,
.Xr netcache 1 ,
.Xr offpunk 1 ,
.Xr opnk 1 ,
.Lk https://sr.ht/~lioploum/offpunk/
.
.Sh AUTHORS
.An Lionel Dricot (Ploum) Aq Mt offpunk2 at ploum.eu
diff --git a/man/migrate-offpunk-cache.1 b/man/migrate-offpunk-cache.1
new file mode 100644
index 0000000..15696f0
--- /dev/null
+++ b/man/migrate-offpunk-cache.1
@@ -0,0 +1,44 @@
.Dd August 11, 2023
.Dt MIGRATE-OFFPUNK-CACHE 1
.Os
.
.Sh NAME
.Nm migrate-offpunk-cache
.Nd migrate offpunk cache to the newest version
.
.Sh SYNOPSIS
.Nm
.Op Ar CACHE_DIR
.Nm
.Fl h | \-help
.
.Sh DESCRIPTION
For each new version of offpunk that requires changes to the cache,
a migration function is provided.
All migration functions will be called by this script,
from the oldest to the newest version.
.Ss Positional arguments
.Bl -tag -width Ds -offset indent
.It CACHE_DIR
This is the path to the cache.
The default value will point to $XDG_CACHE_HOME,
or $HOME/.cache/offpunk if undefined.
.El
.Ss Keyword arguments
.Bl -tag -width Ds -offset indent
.It Fl h , \-help
Show a help message and exit
.El
.
.Sh EXIT STATUS
.Ex -std
.
.Sh SEE ALSO
.Xr ansicat 1 ,
.Xr netcache 1 ,
.Xr offpunk 1 ,
.Xr opnk 1 ,
.Lk https://sr.ht/~lioploum/offpunk/
.
.Sh AUTHORS
.An Lionel Dricot (Ploum) Aq Mt offpunk2 at ploum.eu
diff --git a/man/netcache.1 b/man/netcache.1
new file mode 100644
index 0000000..d17213b
--- /dev/null
+++ b/man/netcache.1
@@ -0,0 +1,63 @@
.Dd August 27, 2023
.Dt NETCACHE 1
.Os Debian
.
.Sh NAME
.Nm netcache
.Nd local Internet cache handler for offpunk
.
.Sh SYNOPSIS
.Nm
.Op Fl \-path
.Op Fl \-offline
.Op Fl \-max\-size Ar MAX_SIZE
.Op Fl \-timeout Ar TIMEOUT
.Op Ar URL ...
.Nm
.Fl h | \-help
.
.Sh DESCRIPTION
Netcache is the download and cache management engine of the browser
.Xr offpunk 1 .
It allows one to fetch a link and get its content,
writing the content through the local cache for ulterior reference.
Netcache can be forced into offline mode,
in order to only fetch resources from the local cache,
otherwise it would always refresh it from the version available online.
It is also useful for mapping a given URL to its location in the cache,
independently of whether it has been downloaded first.
.Pp
.Xr Offpunk 1
is a command-line browser and feed reader dedicated to browsing the Web,
Gemini, Gopher and Spartan.
.Ss Positional arguments
.Bl -tag -width Ds -offset indent
.It Ar URL
download the URL and output the content.
.El
.Ss Keyword arguments
.Bl -tag -width Ds -offset indent
.It Fl h , \-help
show a help message and exit.
.It Fl \-path
output the path to the cache instead of the content of the URL.
.It Fl \-max-size Ar MAX_SIZE
cancel download of items above that size.
The value is expressed in megabytes.
.It Fl \-timeout Ar TIMEOUT
time to wait before cancelling connection.
The value is expressed in seconds.
.El
.
.Sh EXIT STATUS
.Ex -std
.
.Sh SEE ALSO
.Xr ansicat 1 ,
.Xr migrate-offpunk-cache 1 ,
.Xr offpunk 1 ,
.Xr opnk 1 ,
.Lk https://sr.ht/~lioploum/offpunk/
.
.Sh AUTHORS
.An Lionel Dricot (Ploum) Aq Mt offpunk2 at ploum.eu
diff --git a/man/opnk.1 b/man/opnk.1
new file mode 100644
index 0000000..0e10214
--- /dev/null
+++ b/man/opnk.1
@@ -0,0 +1,53 @@
.Dd August 27, 2023
.Dt OPNK 1
.Os Debian
.
.Sh NAME
.Nm opnk
.Nd universal open (like a punk) for offpunk
.
.Sh SYNOPSIS
.Nm
.Op Ar INPUT ...
.Nm
.Fl h | \-help
.
.Sh DESCRIPTION
Opnk is the "universal open (like a punk)".
Opnk is a tool that will try to render any file or URL in the terminal,
using
.Xr netcache 1
and
.Xr ansicat 1 ,
and put them in
.Xr less 1 .
If that doesn’t work,
it will fallback to
.Xr xdg-open 1 .
.Pp
.Xr Offpunk 1
is a command-line browser and feed reader dedicated to browsing the Web,
Gemini, Gopher and Spartan.
.Ss Positional arguments
.Bl -tag -width Ds -offset indent
.It Ar INPUT
path to the file or URL to open.
.El
.Ss Keyword arguments
.Bl -tag -width Ds -offset indent
.It Fl h , \-help
Show a help message and exit
.El
.
.Sh EXIT STATUS
.Ex -std
.
.Sh SEE ALSO
.Xr ansicat 1 ,
.Xr migrate-offpunk-cache 1 ,
.Xr netcache 1 ,
.Xr offpunk 1 ,
.Lk https://sr.ht/~lioploum/offpunk/
.
.Sh AUTHORS
.An Lionel Dricot (Ploum) Aq Mt offpunk2 at ploum.eu
-- 
2.40.1

[PATCH 2/2] offpunk.1: cross reference other manual pages. Export this patch

Signed-off-by: Étienne Mollier <emollier@debian.org>
---
 man/offpunk.1 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/man/offpunk.1 b/man/offpunk.1
index 91af00e..0d942be 100644
--- a/man/offpunk.1
+++ b/man/offpunk.1
@@ -77,6 +77,10 @@ display available features and dependancies then quit
.Ex -std
.
.Sh SEE ALSO
.Xr ansicat 1 ,
.Xr migrate-offpunk-cache 1 ,
.Xr netcache 1 ,
.Xr opnk 1 ,
.Lk https://sr.ht/~lioploum/offpunk/
.
.Sh HISTORY
-- 
2.40.1