October 20, 2009

MediaRelay is a little Python tool I wrote that transfers new items from one FTP server to another. It can be useful when combined with a timer or possibly a folder action.

To use it, just modify config.yaml. Multiple sources and destinations can be defined under their own “name”. Anonymous connections haven’t been tested, but should be in the form “:@server/path”.

$ python 
-- checking default
<- getting Untitled_2.wmv
-> sending Untitled_2.wmv

The skiplist is stored in $CWD/.skiplist. Remove it to do a full transfer. The files are always relayed through the local machine (not sent from server to server) which is not terribly efficient but sometimes the only option. Folders are not trasfered - they throw an exception and are skipped on the next run.