Ejemplo n.º 1
0
 def create_version(cls, version_json, singer, song):
     if version_json is None:
         return None
     
     # create the version object and save it to the store
     version = Version({"version" : version_json})
     if singer is not None:
         version.singer = singer
     if song is not None:
         version.song = song
     version.save()
     
     # call the indexing process, and index this object and all
     # related ones
     VersionIndex.by_id(version.id, cascade=True)
     
     return version
Ejemplo n.º 2
0
 def update_version(cls, version_id, version_json=None, singer=None, song=None):
     # retrieve and update the version object in the desired way
     version = Version().get(version_id, links=True)
     
     if version is None:
         raise NotFoundException()
     
     if version_json is not None:
         version.patch_version(version_json, replace_all=True, keep_id=True)
     if singer is not None:
         version.singer = singer
     if song is not None:
         version.song = song
     version.save()
     
     # call the indexing process, and index this object and all related ones
     VersionIndex.by_id(version.id, cascade=True)
     
     return version
Ejemplo n.º 3
0
LV2.2	Dumfries Hiring Fair			Scots	Peter Fairbairn	Sheila Douglas	1995	Come Gie's a Sang', Sheila Douglas, 1995, p. 31	Dumfries			11283					bothy; farm			
LV3.1	The Boreland of Balmaghie	Parker of the Boreland		Scots	Jack McCaig	James Brown	c. 2000	Footstompin' forum: http://www.footstompin.com/forum/1/21451/1	Castle Douglas	Boreland of Balmaghie							bothy; farm	http://www.footstompin.com/forum/1/21451/1	[YES]	
LV4.1	Andrew Lammie			Scots	Sheila Stewart	Hamish Henderson	1953	School of Scottish Studies Sound Archive, SA1953.238.A7	Fyvie	Mill of Tifty		98	1018	233		Fragment only. Other instances of same singer's version: [other urls]	love; tragedy; murder	http://www.tobarandualchais.co.uk/fullrecord/26090/1	 	
LV4.2	Andrew Lammie	Mill o Tifty's Annie		Scots	Jeannie Robertson	Hamish Henderson & Jean Ritchie	1953.09	School of Scottish Studies Sound Archive, SA1953.197.5	Fyvie	Mill of Tifty		98	1018	233		21 verses.	love; tragedy; murder	http://www.tobarandualchais.co.uk/fullrecord/24187/1  /  http://canmore.rcahms.gov.uk/en/site/19194/details/mill+of+tifty+waterwheel/	 	[Yes]
LV5.1	The Bonnie Hoose o Airlie			Scots	Jeannie Robertson	Hamish Henderson & Jean Ritchie	1952	School of Scottish Studies Sound Archive, SA1952.043.A10	Airlie, Angus			794	233	199		6 verses.	murder; castle; arson	http://www.tobarandualchais.co.uk/fullrecord/49656/1	 	
LV6.1	The Laird o Drum			Scots	Jeannie Robertson	Hamish Henderson & Jean Ritchie	1962.05	School of Scottish Studies Sound Archive, SA1962.013.A11	Drum Castle, Drumoak, Aberdeenshire			247	835	236		Fragment only.	marriage; social class	http://www.tobarandualchais.co.uk/fullrecord/23305/1	 	[Yes]
LV7.1	The Cauld Water Well			Scots / English	Hamish Robb	Local Voices	2013.08.24	Local Voices Sound Archive [local ref]	Dundee							No other source known. Also recorded but with fewer verses on Local Voices Sound Archive refs [refs.]	wishing well; river			
"""

# Falkirk Fair (LV1.1)

version = Version()
version.lv_id = "LV1.1"
version.title = "Falkirk Fair"
version.language = "Scots"
version.singer = singer_ids[0] # Rab Morrison
version.collector = "Hamish Henderson"
version.collected_date = "1962-05"
version.source = "School of Scottish Studies Sound Archive, SA1962.016.A9"
version.add_location(name="Falkirk")
version.add_reference("ROUD", "10368")
version.comments = "Fragments only"
version.tags = ["bothy", "farm", "bawdy"]
version.media_url = "http://www.tobarandualchais.co.uk/fullrecord/23006/1"
# version.lyrics = ""
# version.photo_url = ""
version.song = song_ids[0]
version.save(host=settings.ELASTIC_SEARCH_HOST, index=settings.ELASTIC_SEARCH_DB, refresh=True)
version_ids.append(version.id)

# Falkirk Fair (LV1.2)
Ejemplo n.º 4
0
 gae = _normalise(row[13])
 if gae == "TRUE":
     version.add_language("Gaelic")
 
 scots = _normalise(row[14])
 if scots == "TRUE":
     version.add_language("Scots")
 
 oth = _normalise(row[15])
 if oth == "TRUE":
     version.add_language("Other")
 
 singlv = _normalise(row[16])
 if singlv is not None:
     singid = SINGER_LV_ID_MAP.get(singlv)
     version.singer = singid
 
 # rows 17 to 24 are singer data which has already been imported
 collector = _normalise(row[25])
 if collector is not None:
     version.collector = collector
 
 cdate = _normalise(row[26])
 if cdate is not None:
     cdate = cdate.replace(".", "-")
     version.collected_date = cdate
 
 vsource = _normalise(row[27])
 if vsource is not None:
     version.source = vsource