Skip to content

Commit 5174435

Browse files
committed
fix for #26
1 parent 56bce3d commit 5174435

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

kindle2notion/parsing.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,12 @@ def _add_parsed_items_to_books_dict(books: Dict, title: str, author: str, highli
6767
def _parse_raw_author_and_title(raw_clipping_list: List) -> Tuple[str, str]:
6868
author = ""
6969
title = raw_clipping_list[0].replace(author, '').strip().replace(u'\ufeff', '').replace(' ()', '')
70-
<<<<<<< HEAD
7170

7271
if (re.findall(r'\(.*?\)', raw_clipping_list[0])):
7372
author = (re.findall(r'\(.*?\)', raw_clipping_list[0]))[-1]
7473
author = author.removeprefix('(').removesuffix(')')
7574
else:
7675
print("For"+ title + ", No author found. You can manually add the Author details in the Notion database.")
77-
=======
78-
if ((re.findall(r'\(.*?\)', raw_clipping_list[0]))):
79-
author = (re.findall(r'\(.*?\)', raw_clipping_list[0]))[0]
80-
# author comes in the format '(Lastname, Firstname)'
81-
author = author.removeprefix('(').removesuffix(')')
82-
else:
83-
print("For"+ title + ", no author was found in clippings file. You can manually edit your clippings file to add Author in the format: <Title: (Lastname, Firstname)>. For now continuing with empty author name")
84-
>>>>>>> de3716edaeeafd2a78acd4fb0153733b112f2dc8
8576
return author, title
8677

8778

0 commit comments

Comments
 (0)