yannick-cw / notionfy

Syncing kindle highlights to notion
BSD 3-Clause "New" or "Revised" License
138 stars 7 forks source link

Parsing Clippings file problem #3

Closed yannick-cw closed 4 years ago

yannick-cw commented 4 years ago

Hi, thanks for this! Super excited that you're supporting this on Windows. Unfortunately, I tried this out but I'm getting this error and I'm not sure if I'm doing something wrong: ParsErr "(line 3364, column 180):\nunexpected \" \"\nexpecting \"==========\\n\""

I'm pretty sure my token value, page ID, and Kindle drive are correct. Is there an issue with MyClippings maybe? Appreciate your input and work on this. This is also my first time commenting on Git so let me know if I should be posting elsewhere.

Originally posted by @airsylph in https://github.com/yannick-cw/notionfy/issues/1#issuecomment-565914474

yannick-cw commented 4 years ago

Hey @airsylph thanks for giving it a try. Is it maybe possible that you modified the file by hand? If yes I guess you might be missing a ========== and a newline after that at the end of the file. Otherwise would you mind sharing your clippings file or the part at around line 3364 with me? You can also just send it to me via my email you find on my profile if you want to keep it private.

crispycaspr commented 4 years ago

Hi @yannick-cw , thanks for such a quick helpful response. I checked specifically line 3364 and it is as below: The Fogg Behavior Model states that for a behavior (B) to occur, three things must be present at the same time: motivation (M), ability (A), and a trigger (T). More succinctly, B = MAT.

I suspect that the quote having a "=" may have affected the script. However, just in case it isn't, here's lines 3360 to 3370 for more clarity:

==========
Indistractable (Nir Eyal;)
- Your Highlight on page 69 | Location 1051-1052 | Added on Friday, October 11, 2019 8:50:35 AM

The Fogg Behavior Model states that for a behavior (B) to occur, three things must be present at the same time: motivation (M), ability (A), and a trigger (T). More succinctly, B = MAT.
==========
Indistractable (Nir Eyal;)
- Your Highlight on page 71 | Location 1084-1085 | Added on Friday, October 11, 2019 9:02:49 AM

Is this trigger serving me, or am I serving it?
==========

My Clippings go all the way to line 6566, just in case that is useful.

Technically, I can test this out by manually removing the "=" from the quote and testing the script again, but I'm not sure what will happen if I manually edit "My Clippings" so I didn't do so, but let me know if you want me to try that :) Thanks so much!!

yannick-cw commented 4 years ago

Perfect, I am going to try to reproduce the problem with the snippet you provided.

yannick-cw commented 4 years ago

@airsylph you were spot on with the = problem! I am looking for a fix now

crispycaspr commented 4 years ago

Take your time and thanks so much again for helping to create this script and quickly sourcing this issue. Looking forward to using this to handle my highlights in Notion!! :)

yannick-cw commented 4 years ago

Okay give it a shot with the 0.1.1 release!

yannick-cw commented 4 years ago

@airsylph did it work out for you in the end? Then I would close this issue :)