diff options
| author | Petr Svenda | 2021-01-11 11:35:56 +0100 |
|---|---|---|
| committer | Petr Svenda | 2021-01-11 11:35:56 +0100 |
| commit | ddc875e5c43c2ba15d5149ed55fdf3f55ff20df1 (patch) | |
| tree | 486c875b94955fe4e809c03790fe6b7462f4a116 | |
| parent | 3fc8165a5da24ded392af8c90acbd89d1dd7ba8a (diff) | |
| download | sec-certs-ddc875e5c43c2ba15d5149ed55fdf3f55ff20df1.tar.gz sec-certs-ddc875e5c43c2ba15d5149ed55fdf3f55ff20df1.tar.zst sec-certs-ddc875e5c43c2ba15d5149ed55fdf3f55ff20df1.zip | |
add early saving of extracted data
| -rwxr-xr-x | process_certificates.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/process_certificates.py b/process_certificates.py index 96d9591a..2b63d70a 100755 --- a/process_certificates.py +++ b/process_certificates.py @@ -114,19 +114,18 @@ def main(directory, do_complete_extraction: bool, do_download_meta: bool, do_ext if do_extraction_certs: all_keywords = extract_certificates_keywords_parallel(walk_dir, fragments_dir, 'certificate', threads) - #all_keywords = extract_certificates_keywords(walk_dir, fragments_dir, 'certificate') - all_front = extract_certificates_frontpage(walk_dir) - all_pdf_meta = extract_certificates_pdfmeta_parallel(walk_dir, 'certificate', threads) - #all_pdf_meta = extract_certificates_pdfmeta(walk_dir, 'certificate', results_dir) + with open(results_dir / "certificate_data_keywords_all.json", "w") as write_file: + json.dump(all_keywords, write_file, indent=4, sort_keys=True) - # save joined results + all_front = extract_certificates_frontpage(walk_dir) with open(results_dir / "certificate_data_frontpage_all.json", "w") as write_file: json.dump(all_front, write_file, indent=4, sort_keys=True) - with open(results_dir / "certificate_data_keywords_all.json", "w") as write_file: - json.dump(all_keywords, write_file, indent=4, sort_keys=True) + + all_pdf_meta = extract_certificates_pdfmeta_parallel(walk_dir, 'certificate', threads) with open(results_dir / "certificate_data_pdfmeta_all.json", "w") as write_file: json.dump(all_pdf_meta, write_file, indent=4, sort_keys=True) + # if do_extraction_pp: # all_pp_csv = extract_protectionprofiles_csv(web_dir) # all_pp_front = extract_protectionprofiles_frontpage(pp_dir) |
