Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed database reference issue #86

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions kindle2notion/exporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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],
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
requests>=2.25.0