version.add_reference("ROUD", "11283") # version.comments = "" version.tags = ["bothy", "farm"] # version.media_url = "" # version.lyrics = "" # version.photo_url = "" version.song = song_ids[1] version.save(host=settings.ELASTIC_SEARCH_HOST, index=settings.ELASTIC_SEARCH_DB, refresh=True) version_ids.append(version.id) # The Boreland of Balmaghie (LV3.1) version = Version() version.lv_id = "LV3.1" version.title = "The Boreland of Balmaghie" version.alternative_title = "Parker of the Boreland" version.language = "Scots" version.singer = singer_ids[4] # Jack McCaig version.collector = "James Brown" version.collected_date = "c. 2000" version.source = "Footstompin' forum: http://www.footstompin.com/forum/1/21451/1" version.add_location(name="Castle Douglas") version.add_location(name="Boreland of Balmaghie") # version.add_reference("", "") # version.comments = "" version.tags = ["bothy", "farm"] version.media_url = "http://www.footstompin.com/forum/1/21451/1" # version.lyrics = "" # version.photo_url = "" version.song = song_ids[2] version.save(host=settings.ELASTIC_SEARCH_HOST, index=settings.ELASTIC_SEARCH_DB, refresh=True)
# now lift the version out of this row version = Version() vlv_id = _normalise(row[8]) version.lv_id = vlv_id sid = SONG_LV_ID_MAP.get(vlv_id.split(".")[0]) version.song = sid vtitle = _normalise(row[9]) if vtitle is not None: version.title = vtitle valt = _normalise(row[10]) if valt is not None: version.alternative_title = valt vsummary = _normalise(row[11]) if vsummary is not None: version.summary = vsummary eng = _normalise(row[12]) if eng == "TRUE": version.add_language("English") gae = _normalise(row[13]) if gae == "TRUE": version.add_language("Gaelic") scots = _normalise(row[14]) if scots == "TRUE":