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 #206

Closed
wants to merge 4 commits into from
Closed

[doc] add man page #206

wants to merge 4 commits into from

Conversation

lguist
Copy link
Contributor

@lguist lguist commented Feb 3, 2022

Related to: #87
The man.rs file can generate the manpage with this command:
cargo run --bin man > /tmp/fw.man; man /tmp/fw.man
I generate this draft by copying from the --help info.
Although I think it would be also usefull to have a fw man that calls the manpage, i don't know if fw is shipped to a package mannager and if that's the case, what's the best option ?
Question:
The author should be brocode or bomgar ?

@lguist lguist marked this pull request as ready for review February 3, 2022 01:36
@bomgar
Copy link
Member

bomgar commented Feb 3, 2022

Thanks. I should have some time on the weekend to review this. The only maintained package I know of is this one: https://aur.archlinux.org/packages/fw

Author or contact (or whatever is available) should be bros@brocode.sh

@bomgar
Copy link
Member

bomgar commented Feb 5, 2022

I looked at it. Looks nice for a first draft. My suggestion would be to automate the creation during the github build and publish it with the release binary. I don't think it should be available with fw man. People building packages could just add the prebuild page to the package. I will do this for the archlinux package.

For that reason I don't like that the man dependency is now part of the main build file. I would suggest to move everything related to the man page to a subdirectory.

As for content: I think a lot of the readme could be included.

@lguist
Copy link
Contributor Author

lguist commented Feb 5, 2022

Thanks for the feedback, I will work on these changes.

@lguist lguist closed this Feb 5, 2022
@lguist lguist deleted the man-page branch February 5, 2022 16:47
@lguist lguist restored the man-page branch February 5, 2022 16:48
@lguist lguist reopened this Feb 5, 2022
@lguist
Copy link
Contributor Author

lguist commented Feb 5, 2022

I added the Readme and Usage section to the man page, i think (if you like to) i can make a custom formatting for make a section split between Readme and Usage. I splitted every paragraph in a hope it will be easier to an future update in the man page.

I also tried to write the github workflow to build the man page, although I'm not used to github action so i don't know if it works and i didn't get it to run on my fork (that's why i accidentally close this pull, sorry). Anyway if you think it's better do this other way or something new to add, let me know.

- uses: docker://messense/rust-musl-cross:x86_64-musl
with:
run: cd src/man
args: cargo run >> ../../fw.1
Copy link
Member

Choose a reason for hiding this comment

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

mixing run and args looks wrong to me. I'm a bit busy a the moment so I'll test this later.

@bomgar
Copy link
Member

bomgar commented Feb 8, 2022

merged

@bomgar bomgar closed this Feb 8, 2022
@bomgar
Copy link
Member

bomgar commented Feb 8, 2022

The github actions are super annoying. I merged it to be able to test this easier.

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