#!/usr/bin/env python # -- IMPORTS ------------------------------------------------------------------ import sys import os arg = sys.argv thisfile = arg[0] IDX_KEY = arg[1] sourcefile = arg[2] targetpath = arg[3] (path, tail) = os.path.split (thisfile) sys.path.append( "%s/lib/python" % path) from interdubs_api import Interdubs # --- Interdubs settings ------------------------------------------------------ IDX_PATH = 'http://www.interdubs.com/api/' # ----------------------------------------------------------------------------- idx = Interdubs(IDX_PATH, IDX_KEY) idx.chkmkpath(targetpath) idx.uploadfile_into_path(sourcefile , targetpath)