Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate manpage as part of build #83

Merged
merged 2 commits into from
Jan 16, 2024
Merged

Conversation

lafrenierejm
Copy link
Contributor

@lafrenierejm lafrenierejm commented Dec 24, 2023

Fixes #73 by generated a manpage via clap_mangen.

This is the output nroff I get when building locally.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.TH ripsecrets 1  "ripsecrets 0.1.7" 
.SH NAME
ripsecrets \- A command\-line tool to prevent committing secret keys into your source code
.SH SYNOPSIS
\fBripsecrets\fR [\fB\-\-install\-pre\-commit\fR] [\fB\-\-strict\-ignore\fR] [\fB\-\-only\-matching\fR] [\fB\-\-additional\-pattern\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR] [\fISource files\fR] 
.SH DESCRIPTION
ripsecrets searches files and directories recursively for secret API keys.
It\*(Aqs primarily designed to be used as a pre\-commit to prevent committing
secrets into version control.
.SH OPTIONS
.TP
\fB\-\-install\-pre\-commit\fR
Install `ripsecrets` as a pre\-commit hook automatically in git directory provided
.TP
\fB\-\-strict\-ignore\fR
If you pass a path as an argument that\*(Aqs ignored by .secretsignore it will be scanned by default. \-\-strict\-ignore will override this behavior and not search the paths passed as arguments that are excluded by the .secretsignore file. This is useful when invoking secrets as a pre\-commit
.TP
\fB\-\-only\-matching\fR
Print only the matched (non\-empty) parts of a matching line, with each such part on a separate output line
.TP
\fB\-\-additional\-pattern\fR=\fIADDITIONAL_PATTERNS\fR
Additional regex patterns used to find secrets. If there is a matching group in the regex the matched group will be tested for randomness before being reported as a secret
.TP
\fB\-h\fR, \fB\-\-help\fR
Print help (see a summary with \*(Aq\-h\*(Aq)
.TP
\fB\-V\fR, \fB\-\-version\fR
Print version
.TP
[\fISource files\fR]
Source files. Can be files or directories. Defaults to \*(Aq.\*(Aq
.SH VERSION
v0.1.7

@lafrenierejm
Copy link
Contributor Author

@sirwart Any opinions on this PR?

@sirwart sirwart merged commit 07e705b into sirwart:main Jan 16, 2024
1 check passed
@sirwart
Copy link
Owner

sirwart commented Jan 16, 2024

It looks good, thanks!

@lafrenierejm lafrenierejm deleted the docs/manpage branch February 11, 2024 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include a manpage in release artifacts
2 participants