change_color_subtitle - change color of subtitles in a html file
tt = change_color_subtitle(htmf,colorn)
- htmf : string. the path+name of the html file
- colorn : string. the color which must be apply
- tt : vector of strings. the text of the new html file.
//change_font_subtitle_color
//Fonction qui change la couleur des sous-titres
//d'une page d'aide html
//Entrée : htmf : un nom de fichier à modifier
// colorn : chaine de caractère la couleur à appliquer
//Sortie : tt le texte du fichier htm
function tt=change_color_subtitle(htmf,colorn)
if fileinfo(htmf(1,1))<>[] then
tt=mgetl(htmf(1,1));
if tt<>[] then
flagb='<H2>';
flage='</H2>';
printf("Change color of subtitles... ")
for i=1:size(tt,1)
a=strindex(tt(i),flagb);
//disp(a)
//pause
if a<>[] then
for j=1:size(a,1)
//disp(tt(i))
tt(i)=strsubst(tt(i),flagb,flagb+'<font color="""+colorn+""">')
//disp(tt(i))
end
end
b=strindex(tt(i),flage);
if b<>[] then
for j=1:size(b,1)
tt(i)=strsubst(tt(i),flage,'</font>'+flage)
end
end
end
printf("Done\n")
end
else
tt=[]
end
endfunction
IRCOM Group
Alan Layec