From 21125502054f04818a639b021b96341243a9851b Mon Sep 17 00:00:00 2001 From: Andrea Pappacoda Date: Tue, 30 Aug 2022 23:52:32 +0200 Subject: [PATCH] docs: add a manual page This patch adds a small zarchive(1) manual page, mostly useful for Linux and BSD users. It's also possible to convert it into other formats, like HTML. --- CMakeLists.txt | 1 + zarchive.1 | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 zarchive.1 diff --git a/CMakeLists.txt b/CMakeLists.txt index ba34208..17cda6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,6 +49,7 @@ target_link_libraries(zarchiveTool PRIVATE zarchive) install(DIRECTORY include/zarchive/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/zarchive" FILES_MATCHING PATTERN "zarchive*.h") install(TARGETS zarchive) install(TARGETS zarchiveTool) +install(FILES "zarchive.1" TYPE MAN) # pkg-config include(JoinPaths) # can be replaced by cmake_path(APPEND) in CMake 3.20 diff --git a/zarchive.1 b/zarchive.1 new file mode 100644 index 0000000..b2601ee --- /dev/null +++ b/zarchive.1 @@ -0,0 +1,46 @@ +.\" SPDX-FileCopyrightText: 2022 Andrea Pappacoda +.\" SPDX-License-Identifier: ISC +.Dd 2022-08-30 +.Dt ZARCHIVE 1 +.Os +. +.Sh NAME +.Nm zarchive +.Nd create and read zstd-compressed file archives +. +.Sh SYNOPSIS +.Nm +.Ar input_path +.Op Ar output_path +. +.Sh DESCRIPTION +.Nm +allows you to create and read file archives in the ZArchive format (.zar). +.Pp +ZArchive is yet another file archive format. Think of zip, tar, 7z, etc. but +with the requirement of allowing random-access reads and supporting compression. +.Sh EXIT STATUS +.Ex -std +. +.Sh EXAMPLES +.Bd -literal +$ zarchive src +Outputting to: src.zar +Adding main.cpp +Adding zarchivereader.cpp +Adding zarchivewriter.cpp +Adding sha_256.c +Adding sha_256.h +.Ed +. +.Sh SEE ALSO +.Xr zstd 1 +. +.Sh AUTHORS +.An -nosplit +The ZArchive format, library and tool were written by +.An Exzap . +The +.Nm +manual page was written by +.An Andrea Pappacoda Aq Mt andrea@pappacoda.it .