inputfile = args['inputfile'] identifier_column = args['identifier'] data_dir = args['download_cache'] if args["quietly"]: logger.setLevel(30) csv_data = CSVData(inputfile) csv_data.get_items() for collection in csv_data.collections: id = collection.id title = collection.title print id if id != None: collection_id = omeka_client.get_collection_id_by_dc_identifier(id, name=title, create=args['create_collections'], public=args["public"]) print "Collection ID", collection_id uploaded_item_ids = [] for item in csv_data.items: print item.type id = item.id if id != None: title = item.title type = item.type previous_id = omeka_client.get_item_id_by_dc_identifier(id) omekaize(item) jsonstr = json.dumps(item.omeka_data) # Upload it