import difflib


def generate_diff(originalLicenseText, inputLicenseText):
    """Generate difference of the input license text with that of SPDX license.

    Arguments:
        originalLicenseText {string} -- SPDX license text of the closely matched license.
        inputLicenseText {string} -- license text input by the user.

    Returns:
        list -- list of lines containing the difference between the two license texts.
    """
    lines = []
    for line in difflib.unified_diff(originalLicenseText.splitlines(), inputLicenseText.splitlines()):
        lines.append(line)
    return lines