From 8560384517ed529f8f9f28201e6c2cfcb70dbe45 Mon Sep 17 00:00:00 2001 From: pdbg Date: Tue, 27 Dec 2022 13:34:43 -0500 Subject: [PATCH 1/2] Fixed database reference issue --- kindle2notion/exporting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kindle2notion/exporting.py b/kindle2notion/exporting.py index 25bee93..da4e5f9 100644 --- a/kindle2notion/exporting.py +++ b/kindle2notion/exporting.py @@ -4,7 +4,7 @@ import notional from notional.blocks import Paragraph, TextObject from notional.query import TextCondition -from notional.types import Date, ExternalFile, Number, RichText, Title +from notional.types import Date, ExternalFile, Number, RichText, Title, DatabaseRef from requests import get # from notional.text import Annotations @@ -119,7 +119,7 @@ def _add_book_to_notion( # Add a new book to the database if not title_exists: new_page = notion.pages.create( - parent=notion.databases.retrieve(notion_database_id), + parent=DatabaseRef(database_id=notion_database_id), properties={ "Title": Title[title], "Author": RichText[author], From 25b9ea71ba3e49b592db855b0dd51194d93f8286 Mon Sep 17 00:00:00 2001 From: pdbg Date: Sat, 31 Dec 2022 16:18:02 -0500 Subject: [PATCH 2/2] Updated minimum required notional lib --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 0a6047a..a4b2693 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ click>=8.0.0 -notional>=0.4.1 +notional>=0.5.1 pathlib dateparser>=1.0.0 -requests>=2.25.0 \ No newline at end of file +requests>=2.25.0