wgetpaste icon indicating copy to clipboard operation
wgetpaste copied to clipboard

Create wgetpaste.1

Open JensKorte opened this issue 3 years ago • 4 comments

man file mostly created from wgetpaste -h with help2man

JensKorte avatar Nov 29 '21 09:11 JensKorte

Can we create this completely automatically with help2man? If so, I'd rather invoke help2man during the build to keep the file up to date. If not, I think writing the man page with scdoc would be nicer to keep the file maintainable.

Cogitri avatar Dec 12 '21 10:12 Cogitri

Can we create this completely automatically with help2man? If so, I'd rather invoke help2man during the build to keep the file up to date. If not, I think writing the man page with scdoc would be nicer to keep the file maintainable.

How about updating the help and using help2man? Btw., I didn't find the tex info file mentioned at the end of the help.

If the description "manual page for wgetpaste, version 2.30" cannot be replaced by content in the --help, I suggest using e.g. an automatic sed script to replace it.

The differences between automatic help2man and the edited man page are:

Edited:

NAME wgetpaste - paste content to pastebin services from commandline

SYNOPSIS wgetpaste [options] [file[s]] wgetpaste [options] -c COMMAND

DESCRIPTION wgetpaste automates pasting to a number of pastebin services and returns the URL.

  Important: Don't paste sensitive or private data, most services create public links.

Automatic:

NAME wgetpaste, - manual page for wgetpaste, version 2.30

SYNOPSIS wgetpaste [options] [file[s]]

At the end I removed:

SEE ALSO The full documentation for wgetpaste, is maintained as a Texinfo manual. If the info and wget‐ paste, programs are properly installed at your site, the command

          info wgetpaste,

   should give you access to the complete manual.

JensKorte avatar Dec 12 '21 16:12 JensKorte

The man page of stenc uses the github CI facility and is based on pandoc. It works fine. You can copy and paste the workflow, if you want https://github.com/scsitape/stenc/tree/master/man

jonasstein avatar Jan 13 '23 20:01 jonasstein

help2man has some useful options (see help2man(1) for more details):

  • -n/--name to set the description in the NAME section
  • -i/--include to include bits of groff (including [SYNOPSIS] replaces the SYNOPSIS section)
  • -N/--no-info to leave out the SEE ALSO section about Texinfo manual

So your edits could be done with something like:

help2man -n 'paste content to pastebin services from commandline' -i include.txt -N wgetpaste

where include.txt contains:

[SYNOPSIS]
.B wgetpaste
[\fI\,options\/\fR] [\fI\,file\/\fR[\fI\,s\/\fR]]
.br
.B wgetpaste
[\fI\,options\/\fR] \fI\,-c COMMAND

[DESCRIPTION]
wgetpaste automates pasting to a number of pastebin services and returns the URL.

.B Important:
Don't paste sensitive or private data, most services create public links.

xxc3nsoredxx avatar Jan 14 '23 20:01 xxc3nsoredxx