Difference between revisions of "GT.M pipe for print DEVICE:"

From VistApedia
Jump to: navigation, search
m (2.) GT.M pipe for print DEVICE:)
(Added a glossary link to file~)
 
Line 9: Line 9:
 
                   TYPE: OTHER
 
                   TYPE: OTHER
 
    
 
    
Note: We use TYPE:Other rather than Host File Server. No host file needed; output will be "piped" to the default CUPS printer. Also the fancy stuff is in the PRE-OPEN EXECUTE. Thus one could do:  
+
Note: We use TYPE:Other rather than Host [[File~|file]] Server. No host [[file~|file]] needed; output will be "piped" to the default CUPS printer. Also the fancy stuff is in the PRE-OPEN EXECUTE. Thus one could do:  
  
 
       PRE-OPEN EXECUTE: X "o ""p"":(command=""lpr -P Photosmart_@192.168.5.103 -o cpi=12 -o lpi=8 -o page-left=72"")::""pipe"" s IO=""p"""
 
       PRE-OPEN EXECUTE: X "o ""p"":(command=""lpr -P Photosmart_@192.168.5.103 -o cpi=12 -o lpi=8 -o page-left=72"")::""pipe"" s IO=""p"""
  
In human (ok in geekspeak), this last PRE-OPEN EXECUTE says, "Open a pipe device named "p" with the command to print to the CUPS printer named "Photosmart_@192.168.5.103" with the previously mentioned details set, and then set IO to that device." FileMan will then send his output to IO. Finally the POST-CLOSE just closes the pipe. No Linux /tmp/print.txt file to clean up. No fuss, no muss. '''What's not to love?!?!'''
+
In human (ok in geekspeak), this last PRE-OPEN EXECUTE says, "Open a pipe device named "p" with the command to print to the CUPS printer named "Photosmart_@192.168.5.103" with the previously mentioned details set, and then set IO to that device." FileMan will then send his output to IO. Finally the POST-CLOSE just closes the pipe. No Linux /tmp/print.txt [[file~|file]] to clean up. No fuss, no muss. '''What's not to love?!?!'''
  
 
--[[User:JohnLeoZ|gra'pa Z]] 06:40, 13 Aug 2009 (EDT)
 
--[[User:JohnLeoZ|gra'pa Z]] 06:40, 13 Aug 2009 (EDT)

Latest revision as of 21:36, 5 July 2013

With the introduction of the pipe device to GT.M (version V5.3-003) this simpler, more secure, even elegant method can be used:

                  NAME: HP-PHOTOSMART                     
                    $I: <pipe>
      PRE-OPEN EXECUTE: X "o ""p"":(command=""lpr"")::""pipe"" s IO=""p"""
    POST-CLOSE EXECUTE: X "c ""p"""                  
               SUBTYPE: P-OTHER80
                  TYPE: OTHER
 

Note: We use TYPE:Other rather than Host file Server. No host file needed; output will be "piped" to the default CUPS printer. Also the fancy stuff is in the PRE-OPEN EXECUTE. Thus one could do:

      PRE-OPEN EXECUTE: X "o ""p"":(command=""lpr -P Photosmart_@192.168.5.103 -o cpi=12 -o lpi=8 -o page-left=72"")::""pipe"" s IO=""p"""

In human (ok in geekspeak), this last PRE-OPEN EXECUTE says, "Open a pipe device named "p" with the command to print to the CUPS printer named "Photosmart_@192.168.5.103" with the previously mentioned details set, and then set IO to that device." FileMan will then send his output to IO. Finally the POST-CLOSE just closes the pipe. No Linux /tmp/print.txt file to clean up. No fuss, no muss. What's not to love?!?!

--gra'pa Z 06:40, 13 Aug 2009 (EDT)