From b072f29f069127a47c920f60895917de551f7280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20F=2E=20Aasen?= Date: Sun, 17 Dec 2023 19:14:53 +0100 Subject: [PATCH] Update man-page to inivar and rewrite it in asciidoc This includes information about all command-line arguments. The section 'SEE ALSO' has been removed. --- docs/man/.gitignore | 3 +- docs/man/man1/inivar.1 | 61 ---------------------------- docs/src/man/man1/inivar.1.adoc | 72 +++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 62 deletions(-) delete mode 100644 docs/man/man1/inivar.1 create mode 100644 docs/src/man/man1/inivar.1.adoc diff --git a/docs/man/.gitignore b/docs/man/.gitignore index 6c9dd6b8eef..9581c02da99 100644 --- a/docs/man/.gitignore +++ b/docs/man/.gitignore @@ -6,9 +6,11 @@ cat1/ cat3/ cat9/ +man1/emccalib.1 man1/emccalib.tcl.1 man1/halstreamer.1 man1/hy_gt_vfd.1 +man1/inivar.1 man1/linuxcnc.1 man1/mqtt-publisher.1 man1/pi500_vfd.1 @@ -17,7 +19,6 @@ man1/svd-ps_vfd.1 man1/thermistor.1 man1/wj200_vfd.1 man1/xhc-whb04b-6.1 -man1/emccalib.1 man3/hm2_pktuart.3 diff --git a/docs/man/man1/inivar.1 b/docs/man/man1/inivar.1 deleted file mode 100644 index 50aaa0bc6da..00000000000 --- a/docs/man/man1/inivar.1 +++ /dev/null @@ -1,61 +0,0 @@ -.\" Copyright (c) 2020 andypugh -.\" -.\" This is free documentation; 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 2 of -.\" the License, or (at your option) any later version. -.\" -.\" The GNU General Public License's references to "object code" -.\" and "executables" are to be interpreted as the output of any -.\" document formatting or typesetting system, including -.\" intermediate and printed output. -.\" -.\" This manual 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 General Public License for more details. -.\" -.\" You should have received a copy of the GNU General Public -.\" License along with this manual; if not, write to the Free -.\" Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -.\" USA. -.\" -.\" -.\" -.TH INIVAR "1" "2020-08-26" "LinuxCNC Documentation" "The Enhanced Machine Controller" -.SH NAME -inivar \- Query an INI file -.SH SYNOPSIS -.B inivar -var {-sec \fI
\fR} {-ini \fI\fR} - -.SH DESCRIPTION -\fBinivar\fR does stuff for LinuxCNC - -Prints to stdout the INI file result of a variable-in-section -search, useful for scripts that want to pick things out of INI files. - -syntax: inivar -var {-sec
} {-ini \fI\fR} - -Uses emc.ini as default. needs to be supplied. If
-is omitted, first instance of will be looked for in any -section. Otherwise only a match of the variable in
will -be returned. - -.SH "SEE ALSO" -\fBLinuxCNC(1)\fR - -Much more information about LinuxCNC and HAL is available in the LinuxCNC -and HAL User Manuals, found at /usr/share/doc/LinuxCNC/. - -.SH BUGS -None known at this time. -.PP -.SH AUTHOR -This man page written by andypugh, as part of the LinuxCNC project. -.SH REPORTING BUGS -Report bugs at https://github.com/LinuxCNC/linuxcnc/issues -.SH COPYRIGHT -Copyright \(co 2020 andypugh. -.br -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/docs/src/man/man1/inivar.1.adoc b/docs/src/man/man1/inivar.1.adoc new file mode 100644 index 00000000000..334b9c93e72 --- /dev/null +++ b/docs/src/man/man1/inivar.1.adoc @@ -0,0 +1,72 @@ +// Copyright (c) 2020 andypugh +// SPDX-License-Identifier: GPL-2.0-or-later + += INIVAR(1) +:docdate: 2023-12-17 + +== NAME + +inivar - Query an INI file + +== SYNOPSIS + +*inivar* *-var* _variable_ [*-sec* _section_] [*-num* _occurrence_number_] [*-tildeexpand*] [*-ini* _FILE_] + +== DESCRIPTION + +Prints to stdout the INI file result of a variable-in-section search, useful for scripts that want +to pick things out of INI files. + +Uses _emc.ini_ as default filename. _variable_ needs to be supplied. If _section_ is omitted, first +instance of _variable_ will be looked for in any section. Otherwise, only a match of the variable in +_section_ will be returned. + +== OPTIONS + +*-var* _variable_:: + The variable to search for, if multiple matches exists and *-num* is not specified, the first + match is returned. + +*-sec* _section_:: + The section to search in, if omitted, all sections are searched. + +*-num* _occurrence_number_:: + The occurrence number specifies which instance of the variable within the _FILE_, and _section_ + if provided, should be returned. If omitted, the first matching occurrence is returned. + +*-tildeexpand*:: + Replace the tilde (~) with the home directory path (equivalent to *$(HOME)*) in the value + obtained from _variable_ in _FILE_. + +*-ini* _FILE_:: + The INI file to search in, defaults to _emc.ini_. + +== EXIT STATUS + +*0*:: + Success. + +*1*:: + _variable_ was not found. + +*-1*:: + Failure. + +== BUGS + +None known at this time. + +== AUTHOR + +This man page written by andypugh, as part of the LinuxCNC project. + +== REPORTING BUGS + +Report bugs at https://github.com/LinuxCNC/linuxcnc/issues + +== COPYRIGHT + +Copyright (c) 2020 andypugh. + +This is free software; see the source for copying conditions. There is NO warranty; not even for +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.