comparison core/magnatagatune/fm_retrieve_artist_tags.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function [tags, tag_weight] = fm_retrieve_artist_tags(artist_name,bymbid)
2 %[tags, tag_weight] = fm_get_artist_tags(artist_name,bymbid)
3 %
4 % artist_name: either artist name string, or
5 % musicbrainz artist id with bymbid == 1
6 %
7 % returns last.fm artist tags and tag weights for given artist
8 % this uses a lastpy python script to handle the REST data exchange
9
10 if nargin < 2
11 bymbid = '0';
12 else
13 bymbid = num2str(bymbid);
14 end
15
16 % call python function
17 tagstr = python('fm_retrieve_artist_tags.py',artist_name,bymbid);
18
19 % parse text function output
20 tags = textscan(tagstr,'%s %d','Delimiter',',');
21 tag_weight = tags{2};
22 tags = tags{1};