Re: Man entry to pdf variant command
Re: Man entry to pdf variant command
- Subject: Re: Man entry to pdf variant command
- From: Laine Lee via AppleScript-Users <email@hidden>
- Date: Thu, 11 Feb 2021 13:11:48 -0600
- Thread-topic: Man entry to pdf variant command
At Axel Lüttgens’ suggestion, I’ve updated my script so that specific
documentation requests are opened in Safari rather than in Preview. It’s then a
trivial matter to save as a pdf, if desired. I’ve tested with two specific help
commands: “ffmpeg -h full” and “other-transcode --help full”. Please let me
know if it fails with others. Thanks.
try
set z to the clipboard
on error
set z to ""
end try
set x to "/usr/local/bin/"
display dialog "Specify the executable name or the documentation request
command:" default answer z
set z to text returned of result
if z contains ("" & space) then
set y to x & z
do shell script y & space & "| open -f -a
/Applications/Safari.app"
else
set x to z
do shell script "man -t" & space & x & space & "| open -f
-a /Applications/Preview.app"
end if
Laine Lee
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden