<commit_before>#!/bin/sh

THISDIR=$(dirname $(readlink -f "$0"))
LOGDIR=$THISDIR/logs
HTMLDIR=$THISDIR/html

GREEN="#2ecc71"
GREY="#bdc3c7"
RED="#e74c3c"

for i in $LOGDIR/*; do
	distro=`basename $i`
	for m in $LOGDIR/$distro/*; do
		machine=`basename $m`
		mkdir -p $HTMLDIR/$distro/$machine
		index=$HTMLDIR/$distro/$machine/index.html
		cat > $index << EOF
<html>
<head><title>meta-debian Status</title>
<style>
.sortable table {
    counter-reset: rowNumber;
}.sortable tr {
    counter-increment: rowNumber;
}.sortable tr td:first-child::before {
    content: counter(rowNumber);
}
</style>
</head>

<body>
<h1>meta-debian Status</h1>
<br>
Built distro : $distro<br>
Built machine: $machine<br>
<br>
<br><table>
<tr bgcolor="$GREY">
<th></th>
<th>Recipe</th>
<th>Version</th>
<th>Build Status</th>
<th>Ptest Status</th>
</tr>
EOF
		while read -r line; do
			recipe=`echo $line | awk '{print $1}'`
			version=`echo $line | awk '{print $2}'`
			build_status=`echo $line | awk '{print $3}'`
			ptest_status=`echo $line | awk '{print $4}'`

			if echo $build_status | grep -iq "PASS"; then
				color=$GREEN
			else
				color=$RED
			fi

			echo "<tr bgcolor=\"$color\"><td></td><td>$recipe</td><td>$version</td><td>$build_status</td><td>$ptest_status</td></tr>" >> $index
		done < $LOGDIR/$distro/$machine/result.txt

		echo "</table></body></html>" >> $index
	done
done<commit_msg>generate_html.sh: Correct table class name<commit_after>#!/bin/sh

THISDIR=$(dirname $(readlink -f "$0"))
LOGDIR=$THISDIR/logs
HTMLDIR=$THISDIR/html

GREEN="#2ecc71"
GREY="#bdc3c7"
RED="#e74c3c"

for i in $LOGDIR/*; do
	distro=`basename $i`
	for m in $LOGDIR/$distro/*; do
		machine=`basename $m`
		mkdir -p $HTMLDIR/$distro/$machine
		index=$HTMLDIR/$distro/$machine/index.html
		cat > $index << EOF
<html>
<head><title>meta-debian Status</title>
<style>
.main_table table {
    counter-reset: rowNumber;
} tr {
    counter-increment: rowNumber;
} tr td:first-child::before {
    content: counter(rowNumber);
}
</style>
</head>

<body>
<h1>meta-debian Status</h1>
<br>
Built distro : $distro<br>
Built machine: $machine<br>
<br>
<br><table class="main_table">
<thead>
<tr bgcolor="$GREY">
<th></th>
<th>Package</th>
<th>Version</th>
<th>Build Status</th>
<th>Ptest Status</th>
</tr></thead>
EOF
		while read -r line; do
			recipe=`echo $line | awk '{print $1}'`
			version=`echo $line | awk '{print $2}'`
			build_status=`echo $line | awk '{print $3}'`
			ptest_status=`echo $line | awk '{print $4}'`

			if echo $build_status | grep -iq "PASS"; then
				color=$GREEN
			else
				color=$RED
			fi

			echo "<tr bgcolor=\"$color\"><td></td><td>$recipe</td><td>$version</td><td>$build_status</td><td>$ptest_status</td></tr>" >> $index
		done < $LOGDIR/$distro/$machine/result.txt

		echo "</table></body></html>" >> $index
	done
done
{'fraction_non_alphanumeric': 0.2088809946714032, 'fraction_numerical': 0.010657193605683837, 'mean_word_length': 4.510763209393346, 'pattern_counts': {'":': 0, '<': 97, '<?xml version=': 0, '>': 101, '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': '318894', 'n_tokens_mistral': 1206, 'n_tokens_neox': 1090, 'n_words': 243}