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

Create wgetpaste.1 #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Create wgetpaste.1 #31

wants to merge 1 commit into from

Conversation

JensKorte
Copy link

man file mostly created from wgetpaste -h with help2man

man file mostly created from wgetpaste -h with help2man
@Cogitri
Copy link
Collaborator

Cogitri commented Dec 12, 2021

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
Copy link
Author

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
Copy link
Contributor

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
Copy link
Contributor

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.

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.

4 participants