man is a handy terminal command for looking up how to use other bits of macOS Unix subsystems
Usually though I end up opening 2 terminal since man pipes its output through a pager - which is handy and to at the same time
It means you CAN scroll forwards & backwards but you can have the command docs and type at the same time
One you end the output its no longer on screen
So a recent question prompted me to go peek at how to use man better
And I found pman
A command you can add to your shell and it pops up Preview with a nice formatted document
The entire command is
man -t <THE SPECIFIC MAN ITEM OR FILE YOU WANT TO SHOW HERE> | open -f -a Preview
and of course you an add it to zsh by opening .zshrc
edit the file and add
@JeanYves you can use the ‘pstopdf’ command line tool to convert postScript format files to PDF’s.
And then you can open the created PDF document with the ‘Preview.app’.
This is an example based on Normans script, but made as an AppleScript.
set toolName to "ls"
set manPDFPath to "/tmp/" & toolName & ".pdf"
set manPDFFile to do shell script ("man -t " & toolName & " | pstopdf -i -o " & manPDFPath)
set openManPDFFile to do shell script "open " & manPDFPath & " -a Preview"
@MonkeybreadSoftware Norman’s forum post was about easily accessing the man pages of a command line tools.
As far as I can tell, it has nothing to do with using Xojo.
So why would anyone consider paying for irrelevant and unnecessary plugins ?
When there is a free readily available tool built into the operating system.
@MonkeybreadSoftware Norman was sharing his method using a shell script, to open man pages as a PDF in Preview.
A Xojo automation project was never mentioned or implied.
Dave like myself codes in Swift for Apple platforms, and like myself thinks Xojo sucks.
And his project as shown was being written in Swift, so sgain no Xojo needed there either.
So it seems to me like your simply hijacking this thread to flog your irrelevant plugins.
@MonkeybreadSoftware I’m not on Ventura, I was simply trying to show a free easy way of converting Postscript files to PDF’s.
And unlike you, I’m not looking to fleece people of there money, for any help I offer on forums.
And if I where on Ventura, I would still find a free native way to do it, without nonsense plugins.
So my point here is, your irrelevant plugins are not needed for anything related to this thread.
I found out today after conversations with @HalGumbert (who is running Ventura)
that Apple has drastically changed the CLI arguments for the MAN command.
Luckily we found an easy alternative so my app can move forward
The “man -wK” doesn’t work and you need to use “manpath” instead. And I’m sure that is not the ONLY change Apple made.
Yeah the ‘pstopdf’ shell script does work on Catalina Big Sur and Monterey.
Dave said that the man command line tool has changed on Ventura, but I’m sure there is a way to create a similar shell script to do the same thing on Ventura.
But until I upgrade to Ventura, I can’t speculate how the shell script would need to change.