How can I make use of man pages with the snap-package?

Hi,

when using the snap-package it seems there are no manuals installed anymore. Any way to get those? Is there an alternative to the manuals other than lxc help <command> and friends? What I am looking for is a browsable documentation of all options for all commands on one page - offline.

Thanks!

The LXD documentation is written in markdown

LXD has been configured so that it automatically uploads to ReadTheDocs (LXD)a fresh set of generated HTML documentation (markdown→HTML) upon a new commit.

ReadTheDocs (LXD) has a section to download the HTML files at https://readthedocs.org/project/lxd/downloads/ but those tarballs with HTML files have not been updated since 2016. It appears there is some issue there because those HTML files are successfully generated and uploaded to the online HTML website. There is just an issue with compressing them into a ZIP file and uploading them to https://readthedocs.org/project/lxd/downloads/
@stgraber mentioned that there has been a technical issue with generating PDFs, so PDFs are not available.

Having said that, it is always possible to setup a container to generate offline documentation for you, whether that is HTML files (see the commands to generate the documentation) or even man pages.

Also, there are several projects on github that can convert from markdown to PDF.

Thanks @simos. But there’s no way to get the offline documentation with the snap-package then, correct?

Currently, the snap package does not include documentation.
I suppose that if there was documentation, it would probably be placed in `/snap/lxd/current/share/.

My view is that most users would use the online documentation, so they would be covered by https://readthedocs.org/projects/lxd/
If there is need, it should be possible to create a snap package lxd-docs that has offline documentation in HTML, PDF and possible man pages. Should be quite doable.

If you want the manpages, the lxc manpage command will generate them, but the text is the exact same as just running --help for the various commands.

1 Like

Awesome! Thanks @stgraber!

It’s fine that the text is the same, but having an overview on one page - I’ve found - sometimes makes all the difference.

By the way, on Ubuntu 18.04 I am getting:

WARNING: go-md2man does not handle node type HTMLSpan

but my guess is that the Unix version doesn’t matter as much as the snap package version, so here you go:

$ snap list
Name   Version    Rev   Tracking  Publisher   Notes
core   16-2.36.3  6130  stable    canonical✓  core
lxd    3.9        9919  stable    canonical✓  -

Since this is a warning I decided to ignore it.

Yeah, just ignore the warning, we get the same during the package builds.