Standard Finishing
Xerox

Announcement

Collapse
No announcement yet.

Antfarm - a simple file automation framework written in Node

Collapse
Canon
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Antfarm - a simple file automation framework written in Node

    Hi guys,

    For some time, I've been working on a little personal project to make file automation a little simpler. To summarize, you can use this to create hotfolders, download and move files to FTP or Amazon S3, and even trigger advanced workflows with HTTP requests. It's designed to be used for programmers but is very simple to get running and incorporate your own code.

    Here is an antfarm workflow that sorts PDFs from other filetypes with a hotfolder:

    Code:
    const    Antfarm = require('antfarm'),
             af = new Antfarm();
    
    let hotfolder_a = af.createFolderNest("/var/hotfolders/a");
    let pdf_folder = af.createFolderNest("/var/out/pdf");
    let other_folder = af.createFolderNest("/var/out/others");
    
    let tunnel = af.createTunnel("Simple pdf sorting workflow");
    
    tunnel.watch(hotfolder_a);
    
    tunnel.run((job, nest) => {
       if(job.extension == "pdf"){
          job.move(pdf_folder);
       } else {
          job.move(other_folder);
       }
    });
    Get it and read the documentation here: https://github.com/dominickp/antfarm

    I'm happy to discuss antfarm or give automation advice in this thread or in Open Automation.
    Last edited by gabrielp; 12-15-2016, 01:28 PM.
CanonKBAAvantiSmartsoft (Presswise)DuploEnfocusXerox

Free Download

Collapse

Trade Show Survey=
Instant October Trade Show Survey
Come On! Only 5 Questions

PRINT 19 and PRINTING United are squaring off in October.
Will you be at one of them?
Both? Neither?
Please take our 1-Minute survey to tell us about your plans for the two big fall shows!

Take The Survey.

CanonSmartsoft (Presswise)AvantiGraph ExpoKBAAvantiEnfocusGraph ExpoDuploXerox

What's Going On

Collapse

There are currently 4781 users online. 93 members and 4688 guests.

Most users ever online was 6,855 at 12:33 PM on 06-06-2019.

Working...
X