Automated Printing

Discussion in 'Mac Programming' started by hurleyint1386, Oct 13, 2017.

  1. hurleyint1386 macrumors member

    Joined:
    Sep 4, 2006
    #1
    I'm looking to set up a workflow for a photo gig coming up. Here's what I would like to do:
    • Take a photo with a camera (Canon 6D) wirelessly tethered to a MacBook Pro (using Kuuvik Capture).
    • Have a watch folder service using Automator on the session folder where the photos are being imported automatically.
    • There will be three printers (Canon PIXMA MG8220) connected.
    • Route the new image that was imported to the next available printer.
    Each print takes about 20–30 seconds, so ideally I'd like Automator to look at the print queue, then if the queue is empty, print the photo. If it's not, check the queue length of the others and put the photo into the next shortest queue.

    Is there an easy way of doing this? There will be an assistant, however, they would be doing other things and likely wouldn't be able to manually route the prints.

    Before jumping in and programming this all manually, I'd like to see if there's a simpler way first. Any help would be greatly appreciated!
     
  2. superscape macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #2
    Hi there,

    It's certainly do-able. Monitoring a watched folder is relatively simple.

    Routing to the least busy print queue is less simple. If I was doing it, I'd probably start off by having a play about with the lpstat Terminal command. There's a "Run Shell Script" action that'll let you do execute shell scripts from Automator.

    Good luck!
     
  3. DJLC macrumors 6502a

    DJLC

    Joined:
    Jul 17, 2005
    Location:
    North Carolina
    #3
    You may be able to accomplish this by using a printer pool —

    Add all 3 printers in System Preferences, then select all 3 and create a pool. Then have Automator route those print jobs to the pool. CUPS *should* automatically route the job to whichever printer in the pool is currently idle and/or has the shortest queue.

    More here: https://www.engadget.com/2014/08/05/mac-101-how-to-create-a-printer-pool-in-os-x/
     
  4. superscape macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #4

    Well, I didn't know that one! Every day's a school day...
     
  5. hurleyint1386 thread starter macrumors member

    Joined:
    Sep 4, 2006
    #5
    This is exactly what I'm looking for! I'll give it a shot and see how well it work!
     

Share This Page

4 October 13, 2017