<commit_before><body style="margin:20;padding:0">
<?php
include("header.php");

include("$lib_path/view-tabs.php");

?>


<h4>W/A/J source view:</h4>Reformats the key/values into the format for the Willem/Axel/Jerre ".cmacc" implementation. Replaces "." in any key name with an underscore "_".<br><br>

<div id="tab-source">

<!--table formatting for the document -->
<!--<table class="TFtable";>-->
<?php 
foreach($contents as $n) {
        list($k, $v) = array_pad( explode ("=", $n, 2), 2, null);

if(preg_match('/\[(.+?)\]/', $v, $matches)) {
 
   if(strlen($k) > 0){
     $vlink = "{\"/\": \"<a href=$_SERVER[PHP_SELF]?action=ipld&file=$matches[1]>$matches[1]</a>\"}" ;//don't wrap in link for IPLD view
	  echo "\"$k\" : $vlink , <br><br>"; 
   }
   else{ 
     $vlink = "{\"/\": \"<a href=$_SERVER[PHP_SELF]?action=ipld&file=$matches[1]>$matches[1]</a>\"}"; //don't wrap in link for IPLD view
     echo "$vlink , <br><br>"; 
   }
}


elseif(isset($v)) { 
	  $vhtml =  htmlspecialchars(json_encode($v));
   $k = str_replace('.', '_', $k);

  $vhtml = str_replace('{', '{{', $vhtml);
  $vhtml = str_replace('}', '}}', $vhtml);
  $vhtml = str_replace('\/', '/', $vhtml);

	  echo "\$ $k = $vhtml; <br><br>"; 
	}

        else { 
	  echo "<th height='10' style='text-align:right'></th><td width='20'></td><td>$k</td>"; 
	}
        echo "</tr>";
}


?>
</table>

</div>


</div>
<commit_msg>waj view handles the links, too<commit_after><body style="margin:20;padding:0">
<?php
include("header.php");

include("$lib_path/view-tabs.php");

?>


<h4>W/A/J source view:</h4>Reformats the key/values into the format for the Willem/Axel/Jerre ".cmacc" implementation. Replaces "." in any key name with an underscore "_".<br><br>

<div id="tab-source">

<!--table formatting for the document -->
<!--<table class="TFtable";>-->
<?php 
foreach($contents as $n) {
        list($k, $v) = array_pad( explode ("=", $n, 2), 2, null);

if(preg_match('/\[(.+?)\]/', $v, $matches)) {
 
   if(strlen($k) > 0){
     $vlink = "[<a href=$_SERVER[PHP_SELF]?action=waj&file=$matches[1]>$matches[1]</a>]" ;//don't wrap in link for IPLD view
 	  echo "\$ $k = $vlink;<br><br>"; 
   }
   else{ 
     $vlink = "[<a href=$_SERVER[PHP_SELF]?action=waj&file=$matches[1]>$matches[1]</a>]"; //don't wrap in link for IPLD view
     echo "\$ xx = $vlink;<br><br>"; 
   }
}


elseif(isset($v)) { 
	  $vhtml =  htmlspecialchars(json_encode($v));
   $k = str_replace('.', '_', $k);

  $vhtml = str_replace('{', '{{', $vhtml);
  $vhtml = str_replace('}', '}}', $vhtml);
  $vhtml = str_replace('{{_', '{{_.', $vhtml);
  $vhtml = str_replace('\/', '/', $vhtml);

	  echo "\$ $k = $vhtml;<br><br>"; 
	}

        else { 
	  echo "<th height='10' style='text-align:right'></th><td width='20'></td><td>$k</td>"; 
	}
        echo "</tr>";
}


?>
</table>

</div>


</div>

{'fraction_non_alphanumeric': 0.2667844522968198, 'fraction_numerical': 0.011307420494699646, 'mean_word_length': 3.595779220779221, 'pattern_counts': {'":': 2, '<': 65, '<?xml version=': 0, '>': 67, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7016471', 'n_tokens_mistral': 1203, 'n_tokens_neox': 1129, 'n_words': 228}