form Search Keyword comment Please enter the first two words in pinyin of the aria you're searching sentence keyword1 sentence keyword2 sentence keyword3 sentence keyword4 sentence keyword5 sentence keyword6 sentence keyword7 sentence keyword8 sentence keyword9 sentence keyword10 endform numOfSearch=0 for i from 1 to 10 if keyword'i'$!="" appendInfoLine(keyword'i'$) numOfSearch+=1 endif endfor #nor=num of results nor=0 check=0 writeInfo () printline searching 'numOfSearch' keyword printline ############################ yaml=do("Read Strings from raw text file...", "~/Desktop/trackInfo.yaml") numberOfLines=Get number of strings j=0 n=0 #store all the line numbers where the pinyin titles reside (stored in pinyin[0] to [j-1]) for k from 1 to numberOfLines select yaml line$=Get string... k begin$=left$(line$,9) if begin$=" title(p" pinyin[j]=k j+=1 endif if begin$=" artist(" artist[n]=k n+=1 endif endfor #search, value$ is pinyin, key[] is mbid for k from 1 to numOfSearch check=0 length=length(keyword'k'$) for l from 0 to j-1 select yaml line$=Get string... pinyin[l] first=index (line$, " :") value$=mid$(line$,first+3,length) if value$=keyword'k'$ check=1 if l=0 value$ [nor]=line$ key$ [nor]=Get string... 1 arti$[nor]=Get string... artist[l] nor+=1 else value$ [nor]=line$ key$ [nor]=Get string... pinyin[l-1]+1 arti$[nor]=Get string... artist[l] nor+=1 endif endif endfor if check=0 printline @@@@@@@@@@!!!!!!!!!!! appendInfoLine("ERROR:KEYWORD: '",keyword'k'$,"', aria is not found") printline @@@@@@@@@@!!!!!!!!!!! endif endfor appendInfoLine("AIRA IN PINYIN", " ", tab$,"MBID", tab$," ARTIST") for k from 0 to nor-1 appendInfoLine(value$[k], " ", tab$, key$[k], " ", tab$,"@@",arti$[k],"@@") endfor