Copyright (c) 2020, Qualcomm Innovation Center, Inc. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
Library that provides license text normalization functionality in Python.
A javascript implementation is also available: https://github.com/quic/license-text-normalizer-js
- Python 3.6+
pip
,setuptools
from license_text_normalizer import normalize_license_text
text = "/* Copyright 2010 Google Inc. All Rights Reserved.\n */"
normalized_text = normalize_license_text(text)
assert normalized_text == "Copyright 2010 Google Inc. All Rights Reserved."
from license_text_normalizer import normalize_license_text
text = " XXX Copyright 2010 Google Inc. All Rights Reserved."
normalized_text = normalize_license_text(text, delimiters=["XXX"])
assert normalized_text == "Copyright 2010 Google Inc. All Rights Reserved."
See CONTRIBUTING.md for more information.
License Text Normalizer is licensed under the BSD 3-clause “New” or “Revised”. License See LICENSE for the full license text.