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

Manual pages #131

Closed
wants to merge 2 commits into from
Closed

Manual pages #131

wants to merge 2 commits into from

Conversation

jamesog
Copy link

@jamesog jamesog commented Jun 28, 2020

Inspired by https://twitter.com/FiloSottile/status/1277084905428656129 I thought I'd quickly throw together a couple of man pages, based on the README. :-)

Copy link

@xorhash xorhash left a comment

Choose a reason for hiding this comment

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

I've got a few mostly minor nitpicks. Otherwise, looks like a solid job transitioning the README to a man page. Thanks for the effort!

.Pp
If the
.Fl o
flag is not specified the key is output to standard output with the public key
Copy link

Choose a reason for hiding this comment

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

Grammar nit: a comma after “specified” is required here due to the prefixed “if” clause as far as I know.

Comment on lines 15 to 18
If the
.Fl o
flag is not specified the key is output to standard output with the public key
as a comment.
Copy link

Choose a reason for hiding this comment

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

This leaves out what the happens with -o: What is stored where?

Experienced users will know that -o normally means “output file”, sure, but perhaps it'd be useful to specify what it does for all those who aren't familiar with this convention.

Maybe I'm being too pedantic here though.

Comment on lines 2 to 4
.Dt AGE-KEYGEN 1
.Sh NAME
Copy link

Choose a reason for hiding this comment

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

This may be invalid mdoc.

According to mdoc(7), .Os is the mandatory third macro for any mdoc file. groff_mdoc(7) is less clear about this; the “TITLE MACROS” section only seems to imply it as convention, rather than necessity.

Also affects age.1.

cmd/age/age.1 Outdated
.Op Fl o Ar output
.Op Ar input
.Sh DESCRIPTION
In the first synopsis form,
Copy link

Choose a reason for hiding this comment

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

Nit: Wouldn't “If --decrypt is not given” be easier to read and understand? That would avoid people having to refer back to the synopsis section.

Similarly for line 24.

.Bl -tag -width Ds -compact
.It Fl o , Fl -output Ar output
Write the result to the file at path
.Ar output .
Copy link

Choose a reason for hiding this comment

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

Something that people might want to know: Does this overwrite output or error out if the file already exists?

Just food for thought.

cmd/age/age.1 Outdated
is a path to a file with
.Nm
secret keys, one per line
(ignoring "#" prefixed comments and empty lines), or to an SSH key file.
Copy link

Choose a reason for hiding this comment

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

Did you mean to use .Qq here or .Sq since it's a single characters instead of ""?

cmd/age/age.1 Outdated
.Fl -recipient .
Every recipient will be able to decrypt the file.
.Ss Passphrases
Files can be encrypted by using
Copy link

Choose a reason for hiding this comment

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

“encrypted with a passphrase”? Without the heading, this sentence seems to imply that any other options don't encrypt files.

cmd/age/age.1 Outdated
.Fl -passphrase .
By default
.Nm
will automatically generate a secure passphrase. Passphrase protected files are
Copy link

Choose a reason for hiding this comment

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

Missed newline after period.

public key tag in the encrypted file, making it possible to track files that
are encrypted to a specific public key.
.Sh EXAMPLES
Generate a secret key, encrypt data, and decrypt:
Copy link

Choose a reason for hiding this comment

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

I'm not sure if this was secret brilliance on your part or just a coincidence of copying over the README, but this conveniently also encourages people just following the examples blindly to frequently generate new keys, which seems like a net win to me.

Copy link
Author

Choose a reason for hiding this comment

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

I shall attribute the brilliance here to Filippo. :-)

cmd/age/age.1 Outdated
Encrypt
.Pa example.jpg
to multiple recipients and output to
.Pa example.jpg.age:
Copy link

Choose a reason for hiding this comment

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

Did you mean to add a space in front of the colon?

Add section 1 manual pages for each of the command-line utilities.

The `age` manual page is based on the README.
@jamesog
Copy link
Author

jamesog commented Jun 28, 2020

Thanks @xorhash, great feedback! I've updated based on your suggestions. Let me know how it looks now.

@xorhash
Copy link

xorhash commented Jun 28, 2020

Looks shippable to me now. Thanks for sorting this out!

(Compare and contrast with #16 if you're bored.)

@benjojo
Copy link

benjojo commented Jun 28, 2020

This is awesome, thanks James

@johanfleury
Copy link

johanfleury commented Jul 31, 2020

FYI, while preparing a Debian package for age, I created man pages from the --help output, you can take inspiration from those if needed: https://salsa.debian.org/go-team/packages/age/-/tree/debian/sid/debian/man.

@Fastidious
Copy link

@johanfleury isn't AUTHOR information normally added at the end of man pages?

@IcedQuinn
Copy link

is there anything left that needs to be done for this?

@Fastidious
Copy link

Fastidious commented Jan 29, 2021

How does this works on platforms other than *nix?

@IcedQuinn
Copy link

IcedQuinn commented Feb 4, 2021

How does this works on platforms other than *nix?

Mandoc has options to output HTML files. One would use that for non-Unix distributions.

@FiloSottile FiloSottile added this to the v1.0.0 milestone Apr 23, 2021
FiloSottile added a commit that referenced this pull request May 25, 2021
FiloSottile added a commit that referenced this pull request May 25, 2021
FiloSottile added a commit that referenced this pull request May 25, 2021
FiloSottile added a commit that referenced this pull request May 25, 2021
@FiloSottile
Copy link
Owner

Thanks everyone! I finally expanded the man page and merged it!

FiloSottile added a commit that referenced this pull request Sep 7, 2021
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.

7 participants