As with the Imported Cvars automation was used to generate the Cvar Matrix. This is here to document how that was done so it can be repeated if needed. Flag A (Archive) is deliberately left off as almost all cvars have it set.
#!/usr/bin/perl -W
use strict;
sub trunc
{
my ($str) = @_;
if (length($str) > 20)
{
return (substr($str, 0, 17) . "...");
}
return ($str);
}
while(my $line = <STDIN>)
{
if ($line =~ /^(.)(.)(.)(.)(.)(.)(.) ([^ ]+) "([^"]*)"$/)
{
# SURIALC
# S=serverinfo
# U=userinfo
# R=readonly
# I=initilisation only or something.
# A=archive
# L=latched
# C=cheat
print "|-\n";
print "| [[$8]] || " . ($9 eq "" ? "None" : trunc($9)) . " || {{unk}} || ";
print $1 eq "S" ? "{{yes|[[Cvars#Serverinfo_Cvars|Yes]]}}" : "{{no|[[Cvars#Serverinfo_Cvars|No]]}}";
print " || ";
print $2 eq "U" ? "{{yes|[[Cvars#Userinfo_Cvars|Yes]]}}" : "{{no|[[Cvars#Userinfo_Cvars|No]]}}";
print " || ";
print $3 eq "R" ? "{{yes|[[Cvars#Readonly_Cvars|Yes]]}}" : "{{no|[[Cvars#Readonly_Cvars|No]]}}";
print " || ";
print $4 eq "I" ? "{{yes|[[Cvars#Initialization_Only_Cvars|Yes]]}}" : "{{no|[[Cvars#Initialization_Only_Cvars|No]]}}";
print " || ";
print $5 eq "A" ? "{{yes|[[Cvars#Archived_Cvars|Yes]]}}" : "{{no|[[Cvars#Archived_Cvars|No]]}}";
print " || ";
print $6 eq "L" ? "{{yes|[[Cvars#Latched_Cvars|Yes]]}}" : "{{no|[[Cvars#Latched_Cvars|No]]}}";
print " || ";
print $7 eq "C" ? "{{yes|[[Cvars#Cheat_Cvars|Yes]]}}" : "{{no|[[Cvars#Cheat_Cvars|No]]}}";
print "\n";
}
else
{
print STDERR "Unable to parse line: " . $line;
}
}