• Best Wishes to all for a Wonderful, Joyous & Beautiful Holiday Season, and a Joyful New Year!

Antfarm - a simple file automation framework written in Node

gabrielp

Member
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:

InSoft Automation

InSoft Automation Unveils Imp Version 14

Revolutionizing Layout Planning and Automation

InSoft Automation announces the launch of Imp Version 14, the latest iteration of its industry-leading cost-based layout planning software. Packed with cutting-edge features, this release redefines efficiency, automation, and workflow optimization for printing and finishing processes.


Learn more…….

   
Back
Top