zlin / wgetpaste

MIT License
34 stars 16 forks source link

Create wgetpaste.1 #31

Open JensKorte opened 2 years ago

JensKorte commented 2 years ago

man file mostly created from wgetpaste -h with help2man

Cogitri commented 2 years ago

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.

JensKorte commented 2 years ago

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.
jonasstein commented 1 year ago

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

xxc3nsoredxx commented 1 year ago

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

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.