Add a man page for the chardetect command

This commit is contained in:
Benjamin A. Beasley 2022-06-25 10:08:20 -04:00
parent fd71cc4645
commit f47b6c6309
2 changed files with 27 additions and 0 deletions

23
chardetect.1 Normal file
View File

@ -0,0 +1,23 @@
.TH CHARDETECT "1" "June 2022" "" "User Commands"
.SH NAME
.B chardetect
\(en takes one or more file paths and reports their detected encodings
.SH SYNOPSIS
.B chardetect
.RB [ \-h ]
.RB [ \-\-version ]
.RI [ input \ ...]
.SH OPTIONS
.SS "POSITIONAL ARGUMENTS"
.TP
.I input
File whose encoding we would like to determine.
(default:
.IR stdin )
.SS "OPTIONAL ARGUMENTS"
.TP
.B \-h\fR, \fB\-\-help
show a help message and exit
.TP
.B \-\-version
show program\(cqs version number and exit

View File

@ -15,6 +15,8 @@ Summary: Character encoding auto-detection in Python
License: LGPLv2+
URL: https://github.com/chardet/chardet
Source0: %{pypi_source chardet}
# Hand-written for Fedora in groff_man(7) format based on --help output
Source1: chardetect.1
BuildArch: noarch
@ -59,6 +61,7 @@ grep -lr "^#\!/usr/bin/env python" chardet/ | xargs sed -i "1d"
%install
%pyproject_install
%pyproject_save_files chardet
install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 '%{SOURCE1}'
%if %{with tests}
@ -71,6 +74,7 @@ grep -lr "^#\!/usr/bin/env python" chardet/ | xargs sed -i "1d"
%license LICENSE
%doc README.rst
%{_bindir}/chardetect
%{_mandir}/man1/chardetect.1*
%changelog