Skip to content

Add man papis and other manpage improvements#1126

Draft
tuurep wants to merge 1 commit into
papis:mainfrom
tuurep:man-papis
Draft

Add man papis and other manpage improvements#1126
tuurep wants to merge 1 commit into
papis:mainfrom
tuurep:man-papis

Conversation

@tuurep

@tuurep tuurep commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

Draft for #1096

Motivation

  • make the manpages discoverable, currently papis(1) doesn't exist, which easily makes it seem there are no manpages
  • get to config options as easy as possible:
    • man 5 papis instead of man papis-config-settings

Todos/notes

I think it would be best to rework papis-default(1) into papis(1)

Could take example from git(1)

Or have essentially the papis --help message but in manpage form with additional linkages to other pages?

To be investigated:

#1096 (comment)

Section 7 should also be more appropriate for the library structure description and whatnot.

If there are many pages that could go into section 7, should they be combined into one?

Edit: probably not, look at how git does the section 7 pages:

image

I think adding a SEE ALSO section at the bottom just like that would be great, with also the papis(5) (config page) mentioned there.

WIP:
    - Make the entry point papis(1) more like a typical introduction
      manpage
    - Maybe mimic the relevant parts in git(1)?
@tuurep tuurep changed the title docs(wip): add manpages papis(1) and papis(5) Add man papis and other manpage improvements Jan 8, 2026
@alexfikl

alexfikl commented Jan 8, 2026

Copy link
Copy Markdown
Collaborator

Or have essentially the papis --help message but in manpage form with additional linkages to other pages?

There'a already a Command-line Interface section that's essentially just papis --help slightly reformatted. Is that not enough? Or?

I think adding a SEE ALSO section at the bottom just like that would be great, with also the papis(5) (config page) mentioned there.

I'm definitely in favor of that! Using .. only:: man should make it rather painless.

If there are many pages that could go into section 7, should they be combined into one?

It's also easier to just have separate files for each one 😁 I would prefer that + a nice SEE ALSO section (this would also nicely match the online docs, which are separate).

EDIT: Was looking at man git and that SYNOPSIS section looks pretty nifty. No idea how to get it though..

@tuurep

tuurep commented Jan 8, 2026

Copy link
Copy Markdown
Contributor Author

Oops sorry for wiping the message, I was about to move the todos around. I edited all of them back 😄

@tuurep

tuurep commented Jan 8, 2026

Copy link
Copy Markdown
Contributor Author

It's like papis-default does have all the correct info in it, but in a bit of an awkward order for the manpage and this:

image

Looks so much worse than this:

image

Agree on the SYNOPSIS, could start with just substituting this for it:

papis [OPTIONS] COMMAND [ARGS]...

if getting it just like that is too hard to achieve

@alexfikl

alexfikl commented Jan 8, 2026

Copy link
Copy Markdown
Collaborator

Looks so much worse than this:

Yeah, it kind of does :( I've never played with Sphinx manpage generation though, so I'm not sure how much of that can be styled differently. If you make any progress, that would be amazing! 😁

EDIT: The styling might also come from sphinx-click.

@tuurep

tuurep commented Jan 8, 2026

Copy link
Copy Markdown
Contributor Author

Yeah it will take some experimentation

I was also thinking should we link to the subcommands' pages similar to this:

image

Which would only make sense for a manpage, so a large section would have to be written separately for docs/manpage 🤔

@jghauser

jghauser commented Jan 8, 2026

Copy link
Copy Markdown
Member

Always happy to see work on the docs ❤️! More than happy to help with this!

Which would only make sense for a manpage, so a large section would have to be written separately for docs/manpage 🤔

What do you mean by this? That we'd have to write a page detailing how to find all the subcommand specific pages? That doesn't seem so bad to me...

@alexfikl

alexfikl commented Jan 8, 2026

Copy link
Copy Markdown
Collaborator

What do you mean by this? That we'd have to write a page detailing how to find all the subcommand specific pages? That doesn't seem so bad to me...

Yeah, agreed, that doesn't seem too bad.. it would just be a one time thing. Maybe we can even automate it somehow using a special directive + some magic in papis/sphinx_ext.py.

@tuurep

tuurep commented Jan 8, 2026

Copy link
Copy Markdown
Contributor Author

Yep I was just saying if we want the list of commands to double as refs to their manpages:

  • papis-add(1)

Only makes sense in the manpage version

But that was just inspiration from the git manpage, those refs can be on a separate list also

But yeah it's just that one word/representation that has to vary that's true

But this is thinking a bit too far ahead 😄

That we'd have to write a page detailing how to find all the subcommand specific pages?

With this approach, they could just be generated into the SEE ALSO part or have like one SEE ALSO for all subcommands pages, and another for the misc pages

Or a general note saying "The subcommands man pages are in papis-<command>(1)"

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.

3 participants