| 34 | return html.escape(str(value), quote=True) |
| 35 | |
| 36 | def parse_args(): |
| 37 | parser = argparse.ArgumentParser(description='Create LICENSE.html from manifest.csv and license information created by buildroot "make legal-info" command.') |
| 38 | parser.add_argument('--build-dir', required=True, type=str, default='', help='Path to build dir. For example: build-generic-x86_64') |
| 39 | parser.add_argument('--output', type=str, default='license.html', help='Path to output LICENSE.html file.') |
| 40 | parser.add_argument('--jar-license-info', action='append', type=str, help='Path to JAR license info file (JARLICENSEINFO.txt). Can be specified multiple times.') |
| 41 | return parser.parse_args() |
| 42 | |
| 43 | def parseManfifest(manifest_path): |
| 44 | entries = [] |