From 5174435ab8c9994394e428e1713ec6c93fa8e1b1 Mon Sep 17 00:00:00 2001 From: paperboi Date: Tue, 25 May 2021 18:33:26 +0530 Subject: [PATCH] fix for #26 --- kindle2notion/parsing.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/kindle2notion/parsing.py b/kindle2notion/parsing.py index 7dd9335..d66cbb1 100644 --- a/kindle2notion/parsing.py +++ b/kindle2notion/parsing.py @@ -67,21 +67,12 @@ def _add_parsed_items_to_books_dict(books: Dict, title: str, author: str, highli def _parse_raw_author_and_title(raw_clipping_list: List) -> Tuple[str, str]: author = "" title = raw_clipping_list[0].replace(author, '').strip().replace(u'\ufeff', '').replace(' ()', '') -<<<<<<< HEAD if (re.findall(r'\(.*?\)', raw_clipping_list[0])): author = (re.findall(r'\(.*?\)', raw_clipping_list[0]))[-1] author = author.removeprefix('(').removesuffix(')') else: print("For"+ title + ", No author found. You can manually add the Author details in the Notion database.") -======= - if ((re.findall(r'\(.*?\)', raw_clipping_list[0]))): - author = (re.findall(r'\(.*?\)', raw_clipping_list[0]))[0] - # author comes in the format '(Lastname, Firstname)' - author = author.removeprefix('(').removesuffix(')') - else: - print("For"+ title + ", no author was found in clippings file. You can manually edit your clippings file to add Author in the format: . For now continuing with empty author name") ->>>>>>> de3716edaeeafd2a78acd4fb0153733b112f2dc8 return author, title