<commit_before><commit_msg>template for side-by-side diffs<commit_after><?xml version='1.0' encoding='UTF-8'?>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://purl.org/kid/ns#"
      py:extends="'../layout.kid'">
<?python
#
# Copyright (c) 2005-2007 rPath, Inc.
#
# All Rights Reserved
#
from mint.helperfuncs import truncateForDisplay, splitVersionForDisplay
?>
    <head>
        <title>${formatTitle('Diff of: %s' % path)}</title>
    </head>
    <body>
        <div id="main">
        <h2 style="text-align: center;">${path}</h2>
        <p py:if="diffinfo" style="text-align: center;" class="help">Below is a side-by-side comparision of ${path} from ${t}=${oldV} and ${t}=${newV}. Lines that are different between the two files are highlighted.</p>
        <p class="help" py:if="not diffinfo">${message}</p>
        <table py:if="diffinfo" style="width: 100%;">
                <tr>
                    <td style="font-weight: bold;"></td>
                    <td style="font-weight: bold; text-align: center;">Parent Version</td>
                    <td style="font-weight: bold;"></td>
                    <td style="font-weight: bold; text-align: center;">Current Version</td>
                </tr>
                <tr>
                    <td style="font-weight: bold;">Line</td>
                    <td style="font-weight: bold;text-align: center; width: 46%;">${splitVersionForDisplay(str(oldV))}</td>
                    <td style="font-weight: bold;">Line</td>
                    <td style="font-weight: bold; text-align: center; width: 46%;">${splitVersionForDisplay(str(newV))}</td>
                </tr>
                    
            <tr py:for="i in range(len(diffinfo['leftFile']))" style="background: ${i in diffinfo['diffedLines'] and '#c7d7ff' or '#f3f3f3'};">
                <td style="font-weight: ${i in diffinfo['diffedLines'] and 'bold' or 'normal'};">${i in diffinfo['diffedLines']  and '**' or ''}${diffinfo['leftLineNums'][i]}</td>
                <td style="background: ${i in diffinfo['diffedLines'] and '#c7d7ff' or '#E9E9E9'};">${diffinfo['leftFile'][i].replace('  ', '&nbsp;&nbsp;')}</td>
                <td style="font-weight: ${i in diffinfo['diffedLines'] and 'bold' or 'normal'};">${i in diffinfo['diffedLines'] and '**' or ''}${diffinfo['rightLineNums'][i]}</td>
                <td style="background: ${i in diffinfo['diffedLines'] and '#c7d7ff' or '#e9e9e9'};">${diffinfo['rightFile'][i].replace('  ', '&nbsp;&nbsp;')}</td>
            </tr>
        </table>

        <table py:if="not diffinfo" style="width: 100%">
            <tr>
                <th>Contents of ${path}:</th>
            </tr>
            <tr py:for="line in contents">
                <td>${line.replace('  ', '&nbsp;&nbsp;')}</td>
            </tr>
        </table>
        </div>
    </body>
</html>
{'fraction_non_alphanumeric': 0.20641070799577316, 'fraction_numerical': 0.01514617823177175, 'mean_word_length': 2.527950310559006, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 1, '>': 63, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 3}, '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': '6188768', 'n_tokens_mistral': 966, 'n_tokens_neox': 920, 'n_words': 193}