commit 9a73ba354d5f0618367dc7c13d1ebbbe5e63149c
parent 94a5f86c7faa1d82488f2dad7269651ebd299d94
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 11 Apr 2025 16:47:13 +0200
Write the manual page for the sstl utility
Diffstat:
| M | Makefile | | | 9 | +++++++-- |
| M | README.md | | | 10 | +++++++--- |
| A | sstl.1 | | | 101 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
3 files changed, 115 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
@@ -119,15 +119,17 @@ install: library util pkg
}; \
install 755 "$(DESTDIR)$(LIBPREFIX)" $(LIBNAME); \
install 644 "$(DESTDIR)$(LIBPREFIX)/pkgconfig" sstl.pc; \
- install 755 "$(DESTDIR)$(BINPREFIX)" sstl; \
install 644 "$(DESTDIR)$(INCPREFIX)/star" src/sstl.h; \
+ install 755 "$(DESTDIR)$(BINPREFIX)" sstl; \
+ install 644 "$(DESTDIR)$(MANPREFIX)/man1/" sstl.1; \
install 644 "$(DESTDIR)$(PREFIX)/share/doc/star-stl" COPYING README.md
uninstall:
rm -f "$(DESTDIR)$(LIBPREFIX)/$(LIBNAME)"
rm -f "$(DESTDIR)$(LIBPREFIX)/pkgconfig/sstl.pc"
- rm -f "$(DESTDIR)$(BINPREFIX)/sstl"
rm -f "$(DESTDIR)$(INCPREFIX)/star/sstl.h"
+ rm -f "$(DESTDIR)$(BINPREFIX)/sstl"
+ rm -f "$(DESTDIR)$(MANPREFIX)/man1/sstl.1"
rm -f "$(DESTDIR)$(PREFIX)/share/doc/star-stl/COPYING"
rm -f "$(DESTDIR)$(PREFIX)/share/doc/star-stl/README.md"
@@ -135,6 +137,9 @@ clean: clean_test
rm -f $(OBJ) $(DEP) $(LIBNAME)
rm -f .config libsstl.o sstl.pc sstl-local.pc
+lint:
+ mandoc -Tlint sstl.1
+
################################################################################
# Tests
################################################################################
diff --git a/README.md b/README.md
@@ -1,6 +1,6 @@
# Star STereo Lithography
-Star-STL loads STL file format
+Star-StL loads StL file format
## Requirements
@@ -8,6 +8,7 @@ Star-STL loads STL file format
- POSIX make
- pkg-config
- [RSys](https://gitlab.com/vaplv/rsys/)
+- [mandoc](https://mandoc.bsd.lv)
## Installation
@@ -18,10 +19,13 @@ Edit config.mk as needed, then run:
## Release notes
### Version 0.5.1
+
- Fix issues when reading on stdin
-- Add a warning if trailing chars detected after the solid in ascii files.
+- Add a warning if trailing chars detected after the solid in ascii
+ files.
- Add the read data type in the descriptor.
-- Fix a false error log message (should have been an information message).
+- Fix a false error log message (should have been an information
+ message).
### Version 0.5
diff --git a/sstl.1 b/sstl.1
@@ -0,0 +1,101 @@
+.\" Copyright (C) 2015, 2016, 2019, 2021, 2023, 2025 |Méso|Star> (contact@meso-star.com)
+.\"
+.\" This program is free software: you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation, either version 3 of the License, or
+.\" (at your option) any later version.
+.\"
+.\" This program is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" GNU Lesser General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU Lesser General Public License
+.\" along with this program. If not, see <http://www.gnu.org/licenses/>.
+.Dd April 11, 2025
+.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.Dt SSTL 1
+.Os
+.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.Sh NAME
+.Nm sstl
+.Nd load and print information on StL files
+.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.Sh SYNOPSIS
+.Nm
+.Op Fl abhv
+.Op Ar file No ...
+.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.Sh DESCRIPTION
+.Nm
+loads StL files, whether ASCII or binary encoded, and displays
+information about them.
+If no file is provided, the StL is read from standard input.
+.Pp
+Its output is a list of lines, one for each file loaded, where each line
+contains a tab-separated list of values formatted as follows:
+.Bd -literal -offset Ds
+"%s\\t%s\\t%u\\t%u\\t%s\\n", type, name, ntriangles, nvertices, file
+.Ed
+.Pp
+with
+.Ar type
+the encoding of the file, i.e. either
+.Cm ascii
+or
+.Cm binary ,
+.Ar name
+the name of the geometry
+.Po Cm null
+if not defined
+.Pc ,
+.Ar ntriangles
+and
+.Ar nvertices
+the number of triangles and vertices in the loaded StL,
+and
+.Ar file
+the file loaded.
+.Pp
+The options are as follows:
+.Bl -tag -width Ds
+.It Fl a
+Assumes ASCII input files.
+.It Fl b
+Assumes binary input files.
+.It Fl h
+Output short help and exit.
+.It Fl v
+Make
+.Nm
+verbose.
+Multiple
+.Fl v
+options increase the verbosity.
+The maximum is 3.
+.El
+.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.Sh EXIT STATUS
+.Ex -std
+.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.Sh EXAMPLES
+Load all StL files into the current directory.
+Let
+.Nm
+defines their encoding and make the command as verbose as possible:
+.Bd -literal -offset Ds
+sstl -vvv *.stl
+.Ed
+.Pp
+Read a binary StL from standard input:
+.Bd -literal -offset Ds
+sstl -b < file.stl
+.Ed
+.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.Sh STANDARDS
+.Rs
+.%T The StL Format: Standard Data Format for Fabbers
+.%A Marshall Burns
+.%D 1993
+.%U https://www.fabbers.com/tech/STL_Format
+.Re