notionfy icon indicating copy to clipboard operation
notionfy copied to clipboard

Custom styles for the highlights

Open sidc9 opened this issue 4 years ago • 2 comments

Hi, first of all, I really liked using this app!

I was wondering if it is possible to customise the page design/layout for the highlights.

For example, currently each highlight extracted into Notion contains the book title and author name. I would like to have Book title as h1 , author as h2 and then the highlights as bullet points. This is just one example, I have other preferences too, so I was hoping this can be customised by the user.

As a side note, I tried to clone your app in Go but couldn't figure out the Notion API. Would you mind sharing the API request format or pointing me to some resources which might have it?

Thanks!

sidc9 avatar Feb 22 '21 06:02 sidc9

Hey, yes that sounds like a lot of customization, not possible within this app. You could either fork it and write some Scala, might be the easiest :)

Unfortunately there are no API resource anywhere, I found out through analyzing the network traffic.

Creating a highlight happens through this endpont: https://www.notion.so/api/v3/submitTransaction

And you can find the case classes (basically a 1:1 mapping of the JSON structure) here: https://github.com/yannick-cw/notionfy/blob/d353d310b3e10b708beda0b82d26cf0918ad9aee/src/main/scala/notionfys/Notion.scala#L182

It gets constructed here: https://github.com/yannick-cw/notionfy/blob/d353d310b3e10b708beda0b82d26cf0918ad9aee/src/main/scala/notionfys/Notion.scala#L31

In the same file you find the equivalent for getting the data out of notion.

yannick-cw avatar Feb 22 '21 07:02 yannick-cw

Ah all right. Thanks a lot for the explanation!

sidc9 avatar Feb 22 '21 08:02 sidc9