From 5e26d7a97dcedc7e5d33240f6ae2cc89a5057c2e Mon Sep 17 00:00:00 2001 From: Mkranj Date: Sun, 6 Nov 2022 17:29:08 +0100 Subject: [PATCH] Create a single main() argument excluding phrases --- PapersCited.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PapersCited.py b/PapersCited.py index 7b460d2..8bd6bec 100644 --- a/PapersCited.py +++ b/PapersCited.py @@ -328,7 +328,7 @@ def write_excel(list_of_matches, filename): # Using the defined lists of phrases/characters as arguments -def main(characters_to_remove, phrases_to_adjust, croatian_excluded_phrases, english_excluded_phrases): +def main(characters_to_remove, phrases_to_adjust, phrases_to_exclude): filename = get_file() check_file(filename) document = read_document(filename) @@ -337,11 +337,11 @@ def main(characters_to_remove, phrases_to_adjust, croatian_excluded_phrases, eng matches, characters_to_remove, phrases_to_adjust) matches = remove_duplicates(matches) matches = exclude_phrases( - matches, croatian_excluded_phrases + english_excluded_phrases) + matches, phrases_to_exclude) matches = sort_citations(matches) write_excel(matches, filename) if __name__ == "__main__": main(characters_to_remove, phrases_to_adjust, - croatian_excluded_phrases, english_excluded_phrases) + phrases_to_exclude = croatian_excluded_phrases + english_excluded_phrases)