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

Add a '--roff' option to 'um read' #32

Open
ernstki opened this issue Aug 20, 2020 · 0 comments
Open

Add a '--roff' option to 'um read' #32

ernstki opened this issue Aug 20, 2020 · 0 comments

Comments

@ernstki
Copy link

ernstki commented Aug 20, 2020

OK, maybe I'm old-school, but I like printing things.

Also, I've put enough effort into my rsync um page that it's a genuinely useful resource I want to share it with co-workers as a PDF, all of whom use rsync, but not all of whom can be bothered to install um itself.

I'm OK with implementing this and doing a PR, but thought I would open an issue to solicit feedback from people about how they'd like this to work.

I can see exactly where man is getting called (libexec/um-read.rb#L42), and it looks like it would be no sweat to skip man and call groff (troff, roff, whatever) to produce roff source instead, or output for one of the devices supported by groff, like PostScript.

I was thinking of keeping it pretty minimal; just:

  • add a --roff switch to um read
  • and a config setting where you can customize the command to run instead of man (e.g., groff -man -Tps)
  • and leaving it up to the user to redirect that output into a file or pipe it to a2ps, lpr, whatever you gotta do

Thoughts?

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

No branches or pull requests

1 participant