Suppose we have a file, myfile.ext that has just completed downloading. It would be nice to be able to invoke an external program to process this new file after the download is complete.
Pehraps something like...
putio-sync ... --postprocess='cmdline'
Where cmdline would have the full path to the file that was just completed tacked onto the end. So, if my command where 'python postprocess.py -v -d /home/posborne/blah', the final command that would be executed would be something like python postprocess.py -v -d /home/posborne/blah /path/to/myfile.ext1. We could have the user specify a python format string or similar, but I think this satisfies the basic need. Some users might need a shell shim if there is a mismatch with whatever tool they are using doesn't work with this model.
Suppose we have a file,
myfile.ext
that has just completed downloading. It would be nice to be able to invoke an external program to process this new file after the download is complete.Pehraps something like...
Where cmdline would have the full path to the file that was just completed tacked onto the end. So, if my command where 'python postprocess.py -v -d /home/posborne/blah', the final command that would be executed would be something like
python postprocess.py -v -d /home/posborne/blah /path/to/myfile.ext1
. We could have the user specify a python format string or similar, but I think this satisfies the basic need. Some users might need a shell shim if there is a mismatch with whatever tool they are using doesn't work with this model.