From 8ab85686700d19ada329c1ddd20babeaa802825d Mon Sep 17 00:00:00 2001 From: Tyler Danstrom Date: Thu, 6 Jul 2017 10:57:30 -0500 Subject: [PATCH] issue #2; added looking for keyword field in pdf metadata --- bin/extractor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/extractor.py b/bin/extractor.py index 6135312..e6aebdf 100644 --- a/bin/extractor.py +++ b/bin/extractor.py @@ -28,11 +28,11 @@ def main(): total_files = 0 with open(args.output_file, "w", encoding="utf-8") as csv_file: - csvfieldnames = ["title", "author", "creationDate", "subject", "filePath"] + csvfieldnames = ["title", "author", "creationDate", "subject", "keywords", "filePath"] writer = csv.DictWriter(csv_file, fieldnames=csvfieldnames) writer.writeheader() for n_file in a_generator: - parsed = Parser(n_file, ['author', 'subject', 'title', 'creationDate']) + parsed = Parser(n_file, ['author', 'subject', 'keywords', 'title', 'creationDate']) total_files += 1 info = parsed.get_metadata() info["filePath"] = basename(n_file)