def run(args): """ Upload the pages to SMW """ files = args.file hostname = socket.gethostname() G.info("this is: %s" % hostname) for f in files: full_path = os.path.abspath(f) md = metadata.Metadata(f) G.info("Processing file %s" % f) md.metadata['Hostname'] = hostname md.metadata['FileLocation'] = full_path pfridge.save(md)
def hook_pre_metadata_save(md): pfridge.save(md)