Skip to content

Add detailed man page documentation and minor fixes#124

Merged
davidallendj merged 30 commits into
mainfrom
allend/man-pages
Oct 1, 2025
Merged

Add detailed man page documentation and minor fixes#124
davidallendj merged 30 commits into
mainfrom
allend/man-pages

Conversation

@davidallendj

@davidallendj davidallendj commented Sep 26, 2025

Copy link
Copy Markdown
Collaborator

This PR adds man pages documentation as well as some minor fixes to the cobra CLI help strings. Each man page helps to further document the behavior of the CLI detailing more about how each flag works with information that is not included in the help strings (i.e. documentation from --help).

Edit: This PR also adds a couple of minor fixes, such as scan not writing to the database properly.

To generate and view the docs:

  1. Install scdoc using package manager
  2. Generate the docs
scdoc < man/magellan.1.sc > docs/magellan.1
scdoc < man/magellan-scan.1.sc > docs/magellan-scan.1
scdoc < man/magellan-list.1.sc > docs/magellan-list.1
scdoc < man/magellan-collect.1.sc > docs/magellan-collect.1
scdoc < man/magellan-crawl.1.sc > docs/magellan-crawl.1
scdoc < man/magellan-send.1.sc > docs/magellan-send.1
scdoc < man/magellan-update.1.sc > docs/magellan-update.1
scdoc < man/magellan-secrets.1.sc > docs/magellan-secrets.1
  1. View the docs using man:
man docs/magellan.1

TODO:

  • Add rule to Makefile to generate docs
  • Fix syntax issues of *.sc docs

@davidallendj davidallendj self-assigned this Sep 26, 2025
@davidallendj davidallendj added the documentation Improvements or additions to documentation label Sep 26, 2025
@synackd

synackd commented Sep 27, 2025

Copy link
Copy Markdown
Contributor

Let me know if you would like help with the Makefile. I think the one for the ochami CLI is pretty tuned.

@davidallendj

Copy link
Copy Markdown
Collaborator Author

@synackd I had already started copying from the ochami Makefile, but if you want to take over that would be appreciated.

Signed-off-by: Devon Bautista <17506592+synackd@users.noreply.github.com>
Signed-off-by: Devon Bautista <17506592+synackd@users.noreply.github.com>
Signed-off-by: Devon Bautista <17506592+synackd@users.noreply.github.com>
Signed-off-by: Devon Bautista <17506592+synackd@users.noreply.github.com>
The config.env file was removed in favor of setting variables on the
command line e.g:

make prefix=/my/install/path install

Recipes also have been reordered alphabetically based on the target.

Signed-off-by: Devon Bautista <17506592+synackd@users.noreply.github.com>
Comment thread man/magellan-secrets.1.sc
Comment thread man/magellan.1.sc
Signed-off-by: Devon Bautista <17506592+synackd@users.noreply.github.com>

@synackd synackd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Initial manual pages look good! Just caught a few things to be addressed. I also refactored the Makefile and included a target to build the man pages.

make man
make clean-man

You can also build individual ones:

make man/magellan.1

Comment thread cmd/update.go Outdated
Comment thread man/magellan-collect.1.sc
Comment thread man/magellan-secrets.1.sc
Comment thread man/magellan.1.sc
Comment thread man/magellan-scan.1.sc Outdated
Comment thread man/magellan-send.1.sc Outdated
Comment thread man/magellan-send.1.sc
Comment thread man/magellan-update.1.sc Outdated
Comment thread pkg/scan.go
Comment thread man/magellan-scan.1.sc Outdated
@davidallendj davidallendj changed the title Add detailed man page documentation Add detailed man page documentation and minor fixes Sep 30, 2025

@synackd synackd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Largely looks good, there are just a few small things and an scdoc compilation error that needs addressing.

Comment thread man/magellan.1.sc Outdated
Comment thread man/magellan.1.sc Outdated
Comment thread man/magellan.1.sc Outdated
Comment thread man/magellan.1.sc Outdated
Comment thread man/magellan.1.sc
Comment thread pkg/scan.go

@synackd synackd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed some newline issues I saw in magellan(1). Other than that, LGTM.

@davidallendj davidallendj merged commit fa12333 into main Oct 1, 2025
4 checks passed
@davidallendj davidallendj deleted the allend/man-pages branch October 1, 2025 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants