#1 2006-06-14 22:35

Qkid
Member
Registered: 2006-06-14
Posts: 20

Uppercase Meta tags?

Is there anyway to make the meta tags uppercase?

Would like to add CRC32 in [ ] brackets as uppercase. I'm guessing there is a way to do this with the other rules too but i'm outta touch with Regex atm ..hehe. Time to read up.

Might be worth adding someway to make meta tag values uppercase if it's not already there.

cheers

Offline

#2 2006-06-15 10:20

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,374

Re: Uppercase Meta tags?

Hi Qkid,

Just paste this into the PascalScript rule, and that should do it smile
Don't forget to insert the CRC32 first, in the [] brackets!

var
  PosStart, PosEnd: Integer;
begin
  PosStart := Pos('[', FileName);
  PosEnd := Pos(']', FileName);
  if (PosStart > 0) and (PosEnd > PosStart) then
    begin
    FileName := 
      Copy(FileName, 1, PosStart-1) +
      UpperCase(Copy(FileName, PosStart, PosEnd-PosStart)) +
      Copy(FileName, PosEnd, Length(FileName));
    end;
end.

Mostly, people use the hash in lower case, so thats why I use it in lower case as well.. so I don't think there is a need to implement an option of upper/lower case for hash tags, since this piece of code can do it easily wink

Offline

#3 2006-06-15 11:50

Qkid
Member
Registered: 2006-06-14
Posts: 20

Re: Uppercase Meta tags?

Thanks for the fast reply and knocking up the code.

I have used Pascalscript in another application, The Godfather but am a bit out of practise with it. I guessed i could have done it with that.

Offline

Board footer

Powered by FluxBB