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

[Documentation] Any interest in creating a man page? #697

Open
zarakshR opened this issue Jun 11, 2023 · 5 comments
Open

[Documentation] Any interest in creating a man page? #697

zarakshR opened this issue Jun 11, 2023 · 5 comments

Comments

@zarakshR
Copy link

Would there be any interest in writing a man page for fq? I would love to help as far as possible.

@wader
Copy link
Owner

wader commented Jun 11, 2023

Hey! yes that would be nice and i've done some experiments how to do it but nothing complete or decided yet.

I just pushed #698 with one way of doing it. I guess it depends a bit what we want to have in the man page, list for formats? my idea with #698 is to try share most of the content between cli, documentation and man page so it's less work to maintain.

What do you think? any help is appreciated! i'm new to how to write good and compatible (linux and BSD) man pages, so that would be very helpful.

@zarakshR
Copy link
Author

Hi! Sorry for the late reply, was caught up in school work.

The man(7) man-page lays out how to create man page for linux (I cannot run my FreeBSD system at the moment so not sure about how man works over there) The man command basically runs groff in the background with a special macro template called an and displays groff's output to the screen.

man(7) also lays out the basic structure required to define a man documentation page.

Here is a basic example of how it works. The window on the left is the source file which groff (called by man) processes into the output on the left.

I think I could write up a man source file pretty quickly, but where should I get the info from? Do I just get it from the README or do you have any other documentation source somehwere?

@wader
Copy link
Owner

wader commented Jul 19, 2023

Hey, no worries. As i noted in the comment above it would be nice to be able to share/generate part of the man page. Ideally i think i would like to generate the man page based on some sections from README.md and also generate support formats, options, env variables etc. In #698 i'm did a stab at having a jq script generate the man page, fq also has support for markdown so it should be possible to parser README.md and pick things out.

But maybe a first step could be to just have something static and start with that? maybe just copy text from README.md? that would help to have as base for for a script the generate.

@zarakshR
Copy link
Author

OK. I am starting work on writing a static version of the man page. I'll use the README.md and the usage.md as a starting point, is that OK?

P.S. Maybe look into using m4, the macro processor, it would probably simplify dynamically generating different kinds of documentations/accreditation/upstream contact information/maintainers list/etc

@wader
Copy link
Owner

wader commented Jul 19, 2023

Sounds great 👍 can also sneak peak at the diff for #698

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

No branches or pull requests

2 participants