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

doc: Add man page #764

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

doc: Add man page #764

wants to merge 3 commits into from

Conversation

zarakshR
Copy link

@zarakshR zarakshR commented Sep 8, 2023

This implements a man page as in #697

The man page file is doc/fq.1 formatted as a troff file using the man-pages project default man page template.

You can get a look at how the final man page will run by using man -l doc/fq.1

The structure of the man page is as follows -

NAME

SYNOPSIS

DESCRIPTION

INVOKING FQ
Command Line Arguments
* Decoding/Encoding Options (-o options)
Supported Formats

CONFIGURATION

THE FQ LANGUAGE
TYPES SPECIFIC TO FQ
Decoded Values
Binary
Binary Array
FUNCTIONS
Functions Added in fq
Naming Inconsistencies
ENCODING, SERIALIZATIONS, HASHES
USE AS SCRIPT INTERPRETER

BUGS (+ KNOWN ISSUES)

AUTHOR

SEE ALSO

Some notes -

"Use representation of a format" not added to examples -- not sure how I could fit it in

Have not included the details of each format (formats.md)

The section "Display Output" has been merged into "Functions"

The examples for each of the types in "types specific to fq" were not added -- not sure how I should format them

Only the first paragraph of "Encodings, Serializations, Hashes" was added; I couldn't figure out how to structure them

"Own decoders and use as library" section is TODO in usage.md and was not included

.RE
.RE
.SS Supported Formats
Use \fBfq --help formats\fR to get a list of supported formats
Copy link
Owner

@wader wader Sep 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're not going to auto generate this man page maybe this could instead give example how to list supported formats?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand this question, isn't fq --help formats the way to list supported formats?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry i totally missed that, only saw the list of formats :) and what i was wondering was if we should include the list in the man page or not as it will have to be manually kept up to date if we don't update/generate it with make doc etc.

fq \- jq for binary formats

.SH SYNOPSIS
\fBfq\fR [\fI\,OPTION\/\fR]... [--] \fI\,EXPR [\fI\,FILE\/\fR]...
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have some usage examples here i think. maybe same as shown for fq -h?

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.

None yet

2 participants