<commit_before><?php

require_once 'include/util.php';

$taps = array();
$db = new SQLite3('db/db.db');

$r = $db->query("select * from taps order by number");
while ($tap = $r->fetchArray(SQLITE3_ASSOC)) {
  $taps[$tap['number']] = $tap;
  $taps[$tap['number']]['servingSize'] = $tap['servingSizeValue'] . " " . $tap['servingSizeUnits'];
  $taps[$tap['number']]['abv'] = calcAbv($tap);
  $taps[$tap['number']]['kcal'] = calcKcal($tap);
  $taps[$tap['number']]['unitsEth'] = calcUnitsEth($tap);
  $taps[$tap['number']]['rgb'] = srmToRgb($tap['srm']);
}
$numberOfTaps = sizeof($taps);
$colWidth = floor(100/$numberOfTaps);
?>
<html>
<head>
  <title>Tap List</title>
  <meta http-equiv="refresh" content="300">
  <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<table class="mainTable">
<?php for($i=1; $i<=$numberOfTaps; $i++) { ?>
<col width="<?php echo $colWidth; ?>%" />
<?php } ?>
<tr>
 <?php for($i=1; $i<=$numberOfTaps; $i++) { ?>
 <td><span class="tapcircle"><?php echo $i; ?></span></td>
 <?php } ?>
</tr><tr>
 <?php for($i=1; $i<=$numberOfTaps; $i++) { $val = ($taps[$i]['name'] == "") ? "Empty" : $taps[$i]['name'] ?>
 <td><h2><?php echo $val; ?></h2></td>
 <?php } ?>
</tr><tr>
 <?php for($i=1; $i<=$numberOfTaps; $i++) { $val = (isset($taps[$i])) ? $taps[$i]['style'] : "--"; ?>
 <td><?php echo $val; ?></td>
 <?php } ?>
</tr><tr>
 <?php for($i=1; $i<=$numberOfTaps; $i++) { $val = ($taps[$i]['brewDate'] !="") ? "Brewed ".$taps[$i]['brewDate'] : "--"; ?>
 <td><span><?php echo $val; ?></span></td>
 <?php } ?>
</tr><tr>
 <?php for($i=1; $i<=$numberOfTaps; $i++) { 
         $container = ($taps[$i]['name'] != "") ? $taps[$i]['container'] : "standardpint&empty=yes";
  ?>
 <td>
   <img src="img/containerSvg.php?container=<?php echo $container; ?>&rgb=<?php echo $taps[$i]['rgb']; ?>" />
 </td>
 <?php } ?>
</tr><tr>
 <?php for ($i=1;$i<=$numberOfTaps; $i++) {
         $og = number_format($taps[$i]['og'],3);
         $fg = number_format($taps[$i]['fg'],3);
 ?>
 <td><?php echo "$og - $fg"; ?></td>
 <?php } ?>
</tr><tr>
 <?php for ($i=1;$i<=$numberOfTaps; $i++) { ?>
 <td><?php echo $taps[$i]['srm'] . " SRM"; ?></td>
 <?php } ?>
</tr><tr>
 <?php for($i=1; $i<=$numberOfTaps; $i++) { ?><commit_msg>minor tweak for epiphany to render the containers correctly<commit_after><?php

require_once 'include/util.php';

$taps = array();
$db = new SQLite3('db/db.db');

$r = $db->query("select * from taps order by number");
while ($tap = $r->fetchArray(SQLITE3_ASSOC)) {
  $taps[$tap['number']] = $tap;
  $taps[$tap['number']]['servingSize'] = $tap['servingSizeValue'] . " " . $tap['servingSizeUnits'];
  $taps[$tap['number']]['abv'] = calcAbv($tap);
  $taps[$tap['number']]['kcal'] = calcKcal($tap);
  $taps[$tap['number']]['unitsEth'] = calcUnitsEth($tap);
  $taps[$tap['number']]['rgb'] = srmToRgb($tap['srm']);
}
$numberOfTaps = sizeof($taps);
$colWidth = floor(100/$numberOfTaps);
?>
<html>
<head>
  <title>Tap List</title>
  <meta http-equiv="refresh" content="300">
  <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<table class="mainTable">
<?php for($i=1; $i<=$numberOfTaps; $i++) { ?>
<col width="<?php echo $colWidth; ?>%" />
<?php } ?>
<tr>
 <?php for($i=1; $i<=$numberOfTaps; $i++) { ?>
 <td><span class="tapcircle"><?php echo $i; ?></span></td>
 <?php } ?>
</tr><tr>
 <?php for($i=1; $i<=$numberOfTaps; $i++) { $val = ($taps[$i]['name'] == "") ? "Empty" : $taps[$i]['name'] ?>
 <td><h2><?php echo $val; ?></h2></td>
 <?php } ?>
</tr><tr>
 <?php for($i=1; $i<=$numberOfTaps; $i++) { $val = (isset($taps[$i])) ? $taps[$i]['style'] : "--"; ?>
 <td><?php echo $val; ?></td>
 <?php } ?>
</tr><tr>
 <?php for($i=1; $i<=$numberOfTaps; $i++) { $val = ($taps[$i]['brewDate'] !="") ? "Brewed ".$taps[$i]['brewDate'] : "--"; ?>
 <td><span><?php echo $val; ?></span></td>
 <?php } ?>
</tr><tr>
 <?php for($i=1; $i<=$numberOfTaps; $i++) { 
         $container = ($taps[$i]['name'] != "") ? $taps[$i]['container'] : "standardpint&empty=yes";
  ?>
 <td>
   <img width="100%" src="img/containerSvg.php?container=<?php echo $container; ?>&rgb=<?php echo $taps[$i]['rgb']; ?>" />
 </td>
 <?php } ?>
</tr><tr>
 <?php for ($i=1;$i<=$numberOfTaps; $i++) {
         $og = number_format($taps[$i]['og'],3);
         $fg = number_format($taps[$i]['fg'],3);
 ?>
 <td><?php echo "$og - $fg"; ?></td>
 <?php } ?>
</tr><tr>
 <?php for ($i=1;$i<=$numberOfTaps; $i++) { ?>
 <td><?php echo $taps[$i]['srm'] . " SRM"; ?></td>
 <?php } ?>
</tr><tr>
 <?php for($i=1; $i<=$numberOfTaps; $i++) { ?>
{'fraction_non_alphanumeric': 0.32987414440273793, 'fraction_numerical': 0.009935968204901745, 'mean_word_length': 5.1716621253406, 'pattern_counts': {'":': 0, '<': 167, '<?xml version=': 0, '>': 153, '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': '6105480', 'n_tokens_mistral': 1934, 'n_tokens_neox': 1906, 'n_words': 331}