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

Graph based upon database relations #33

Open
MrCredible opened this issue Feb 10, 2024 · 2 comments
Open

Graph based upon database relations #33

MrCredible opened this issue Feb 10, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@MrCredible
Copy link

It would be nice to see relations between both page references and database relations.

Most of my notion links are from database relations. This could help visualize project sizes and effort for those utilize notion as a project management tool.

@dominiquegarmier
Copy link
Owner

I currently don't have time to make these changes, maybe later... But here are my thoughts:

When parsing the result form the Notion API the parser generates an attribute called link_type (I just made a commit 4cbaeb5 to distinguish database and page, there was a bug previously).

link_type: Literal['page', 'database', 'mention', 'href']

We would have to pass this property to the frontend and render it. I.e. we have to change:

class DisplayLink:

def to_display_graph(graph: Graph) -> DisplayGraph:

and we have to change index.html to then render this data (different colors for each link type?). It would be nice to have the colors be configurable (via a constant in graph.py for now) so we would have to use a jinja template instead of just raw html.

Feel free to make changes and create a PR.

@dominiquegarmier
Copy link
Owner

also you will have to re-parse all your notes since the graph format changed. Maybe we could make this smarter in the future.

@dominiquegarmier dominiquegarmier added the enhancement New feature or request label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants