コード例 #1
0
ファイル: albumpage.py プロジェクト: Auzzy/personal
def parse_track_names(track_section):
	all_titles = []
	lines = track_section.text.splitlines()
	for line in lines:
		line = line.strip()
		if is_list_item(line):
			line = line[1:].strip()
			name = split_track_entry(line)[0]
			name = name.strip().strip('"')
			link,text = extract_link(name)
			all_titles.append(text)
	return all_titles
コード例 #2
0
ファイル: albumpage.py プロジェクト: Auzzy/personal
def parse_tracklist_templates(templates):
	all_titles = []
	for template in templates:
		template_entries = split_tracklist(template)
		
		titles = []
		for entry in template_entries:
			label,value = split_tracklist_entry(entry)
			if is_title_entry(label):
				link,text = extract_link(value.strip())
				titles.append(text)
		
		all_titles.extend(titles)
	return all_titles