<commit_before>#!/bin/sh

# Construct an HTML document from the postgres query

# dir locations
ROOT_DIR=`dirname $0`

# source the config file
. ${ROOT_DIR}/config.sh

# HTML and table header
echo \
"<html>
<head>
<style type=\"text/css\">
${EMAIL_CSS}
</style>
</head>
<body>
<table>
<tr> <th>Project</th> <th>Issue</th> <th>Assignee</th> <th>Spent time</th> </tr>"

# separator used by psql
IFS='|'

# alternating row colors
EVEN=0

# parse variables and construct table lines
while read -r PROJ I_ID I_SUB P_ID P_SUB A_FIRST A_LAST TIME
do
    if [ ${EVEN} -eq 1 ]
    then
        echo "<tr class=\"even\"> <td>${PROJ}</td>"
	EVEN=0
    else
        echo "<tr> <td>${PROJ}</td>"
	EVEN=1
    fi

    LEN=`echo ${P_ID} | wc -c`
    if [ ${LEN} -ge 2 ]
    then
        echo "<td><small><i><a href=\"${REDMINE_URL}/issues/${P_ID}\">${P_SUB}</a></i></small><br />&gt; <a href=\"${REDMINE_URL}/issues/${I_ID}\">${I_SUB}</a></td> "
    else
        echo "<td><a href=\"${REDMINE_URL}/issues/${I_ID}\">${I_SUB}</a></td>"
    fi

    echo "<td>${A_FIRST} ${A_LAST}</td> <td>${TIME}</td> </tr>"
done << EOT
`cat $1`
EOT

# table and HTML footer
echo \
'</table>
</body>
</html>'

exit 0
<commit_msg>Cosmetics<commit_after>#!/bin/sh

# Construct an HTML document from the postgres query

# dir locations
ROOT_DIR=`dirname $0`

# source the config file
. ${ROOT_DIR}/config.sh

# HTML and table header
echo \
"<html>
<head>
<style type=\"text/css\">
${EMAIL_CSS}
</style>
</head>
<body>
<table>
<tr> <th>Project</th> <th>Issue</th> <th>Assignee</th> <th>Spent time</th> </tr>"

# separator used in our queries
IFS='|'

# alternating row colors
EVEN=0

# parse variables and construct table lines
while read -r PROJ I_ID I_SUB P_ID P_SUB A_FIRST A_LAST TIME
do
    if [ ${EVEN} -eq 1 ]
    then
        echo "<tr class=\"even\"> <td>${PROJ}</td>"
	EVEN=0
    else
        echo "<tr> <td>${PROJ}</td>"
	EVEN=1
    fi

    LEN=`echo ${P_ID} | wc -c`
    if [ ${LEN} -ge 2 ]
    then
        echo "<td><small><i><a href=\"${REDMINE_URL}/issues/${P_ID}\">${P_SUB}</a></i></small><br />&gt; <a href=\"${REDMINE_URL}/issues/${I_ID}\">${I_SUB}</a></td> "
    else
        echo "<td><a href=\"${REDMINE_URL}/issues/${I_ID}\">${I_SUB}</a></td>"
    fi

    echo "<td>${A_FIRST} ${A_LAST}</td> <td>${TIME}</td> </tr>"
done << EOT
`cat $1`
EOT

# table and HTML footer
echo \
'</table>
</body>
</html>'

exit 0

{'fraction_non_alphanumeric': 0.22398662766402005, 'fraction_numerical': 0.006686167989970748, 'mean_word_length': 3.32129963898917, 'pattern_counts': {'":': 0, '<': 99, '<?xml version=': 0, '>': 95, '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': '1898362', 'n_tokens_mistral': 1002, 'n_tokens_neox': 977, 'n_words': 245}