• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Man entry to pdf variant command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Man entry to pdf variant command


  • Subject: Re: Man entry to pdf variant command
  • From: Laine Lee via AppleScript-Users <email@hidden>
  • Date: Sun, 31 Jan 2021 14:22:19 -0600
  • Thread-topic: Man entry to pdf variant command


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

--display dialog z

if z contains ("" & space) then

                     set y to x & z

                     do shell script "{ echo '.ps 7

                     .ll 6i

                    .ce 600' ;" & space & y & space & "; } |
/usr/local/bin/groff -fC -dpaper=l -P-pl -P-p -ms -Tpdf | open -f -a
/Applications/Preview.app"

else

                     set x to z

                     do shell script "man -t" & space & x & space & "| open -f
-a /Applications/Preview.app"

end if



I should probably reiterate that I upgraded groff to GNU troff (groff) version
1.22.4 by installing groff using Homebrew. This AppleScript won’t work under
Mojave (possibly more recent systems, too) unless groff is upgraded to a
version that allows specifying the pdf device.



Laine



 _______________________________________________
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

References: 
 >Man entry to pdf variant command (From: Laine Lee via AppleScript-Users <email@hidden>)
 >Re: Man entry to pdf variant command (From: Bob Stern via AppleScript-Users <email@hidden>)
 >Re: Man entry to pdf variant command (From: Laine Lee via AppleScript-Users <email@hidden>)
 >Re: Man entry to pdf variant command (From: Axel Lüttgens via AppleScript-Users <email@hidden>)
 >Re: Man entry to pdf variant command (From: Laine Lee via AppleScript-Users <email@hidden>)
 >Re: Man entry to pdf variant command (From: Axel Lüttgens via AppleScript-Users <email@hidden>)
 >Re: Man entry to pdf variant command (From: Laine Lee via AppleScript-Users <email@hidden>)
 >Re: Man entry to pdf variant command (From: Axel Lüttgens via AppleScript-Users <email@hidden>)
 >Re: Man entry to pdf variant command (From: Laine Lee via AppleScript-Users <email@hidden>)

  • Prev by Date: Re: Man entry to pdf variant command
  • Previous by thread: Re: Man entry to pdf variant command
  • Next by thread: Re: Man entry to pdf variant command
  • Index(es):
    • Date
    • Thread