Closed VatanaChhorn closed 3 years ago
Hey, thanks for bringing this up!
Please check if your Python version is upto date.
str.removeprefix()
and str.removesuffix()
functions are supported from v3.9 onwards.
I've worked it out!
Thanks for bare with me, and keep up the good work ; )
btw, do I need to create a new workspace every time I export the highlights to Notion, or the code is automatically ignoring the duplicate highlight?
btw, do I need to create a new workspace every time I export the highlights to Notion, or the code is automatically ignoring the duplicate highlight?
So the code checks for new highlights by comparing the total number of clippings under each book with the number of highlights listed on its respective Notion page. And replace the entire text under that page with the updated clippings. I did this to save the number of API calls. You would only have to create the workspace and set up the environment vars once. You may need to update your Notion token every couple months tho, which is normal. Hope this helps. Check out the code and let me know if it works out. Cheers!
I'm tryna running the script, but this error log has occurred.
python3 kindle2notion.py Notion page is found. Analyzing clippings file...
Found 328 notes and highlights.
'str' object has no attribute 'removeprefix' Exiting script... sh: pause: command not found