QOwnNotes icon indicating copy to clipboard operation
QOwnNotes copied to clipboard

request : adding a graph view like the one in Obsidian

Open mlaarebi opened this issue 4 years ago • 31 comments

Expected behaviour

To have a graph view that enables to see the relations between notes, just like the one in Obsidian.

Actual behaviour

Qownnotes doesn't have one, yet.

Steps to reproduce

mlaarebi avatar Mar 19 '21 13:03 mlaarebi

Can you please elaborate on your request.

pbek avatar Mar 19 '21 13:03 pbek

a graph view enables the user to see a map of all the connections between his linked notes. A map that he can interact with to visualize every connection between his notes.

I uploaded a screenshot (as example) from the Obsidian app.

Screenshot_2021-03-19 Obsidian A knowledge base that works on local Markdown files

mlaarebi avatar Mar 19 '21 16:03 mlaarebi

Thank you. What, in your (or Obsidian's) eyes, are linked notes? Markdown link to other note file? Same Tag? Notes with the same parent tag linked (how many levels up)? Same sub-folder?

pbek avatar Mar 19 '21 19:03 pbek

They are Markdown files linked by internal links (just like in Qownnotes), the difference is the "graph view" that can help to visualize the relations between notes.

Meaning that Qownnotes already have everything needed for this future, it only needs the ability to preview the links visually. Now we can preview the markdown files, It would be nice to add an option to show a graph of all the links between notes in a sub folder.

mlaarebi avatar Mar 19 '21 20:03 mlaarebi

linked by internal links

What are "internal links"? 😁

The only information currently available are notes linked by tags. Are we talking about tags?

pbek avatar Mar 19 '21 20:03 pbek

you can link notes directly without tags, just by adding its link (the icon in the picture).

When you want to add a link, you can chose between a URL and an internal link.

Screenshot from 2021-03-19 22-21-25

mlaarebi avatar Mar 19 '21 21:03 mlaarebi

mindforger has something similar. https://mindforger.com/

fabianski7 avatar Mar 19 '21 21:03 fabianski7

you can link notes directly without tags, just by adding its link (the icon in the picture).

Yes, of course you can. 😁 But QON does not store that information other than by putting a file link (some text) into the note text file. So linking information needs to be gathered (parsed and evaluated) for all notes.

mindforger has something similar.

I can see a "tag navigator", are you talking about that, @fabianski7? There are people who "link" their notes just by tags.

pbek avatar Mar 20 '21 05:03 pbek

@mlaarebi, so what is in Obsidian a linked note? Or does obsidian have no tags?

pbek avatar Mar 20 '21 10:03 pbek

@pbek Obsidian uses tags too, but also links between them by internal links (like in Qownnotes).

And calls the "sub folders" : "vaults".

Obsidian's linked note = Qownnotes's linked notes. Obsidian's tags = Qownnotes's tags.

mlaarebi avatar Mar 20 '21 12:03 mlaarebi

I can see a "tag navigator", are you talking about that, @fabianski7?

no. it is called Knowledge Graph Navigator https://github.com/dvorka/mindforger-repository/blob/master/memory/mindforger/user-documentation.md#tayb-think-as-you-browse---knowledge-graph-navigator-

fabianski7 avatar Mar 20 '21 14:03 fabianski7

Thank you.

pbek avatar Mar 20 '21 15:03 pbek

Just adding a friendly +1 to this feature request, this would indeed be a helpful feature. Obsidian's graph view is excellent.

jg55 avatar Mar 20 '21 16:03 jg55

It's a lot simpler to do in web apps. 😁

pbek avatar Mar 20 '21 16:03 pbek

It's a lot simpler to do in web apps. grin

Obsidian is a desktop app (mobile too but in the future).

mlaarebi avatar Mar 20 '21 16:03 mlaarebi

Obsidian is a desktop app

Yes, but it looks like an Electron app (= web app) 😉 ...and closed source, so I can't look Mindforger is a Qt app. 👍🏻

pbek avatar Mar 20 '21 17:03 pbek

Hello,

Yes, but it looks like an Electron app (= web app) wink ...and closed source, so I can't look Mindforger is a Qt app. 👍🏻

I'm still shopping my "future-proof" note-taking application allowing me to use (neo)vim as external editor.

It would be nice to have graph-view and here is the Joplin plugin which does implement it, if it helps?

gour avatar Oct 09 '21 11:10 gour

and here is the Joplin plugin

Joplin is also a web-app 😅

pbek avatar Oct 09 '21 12:10 pbek

Joplin is also a web-app sweat_smile

Right, but, at least, there is a source of the plugin available. :wink:

gour avatar Oct 09 '21 12:10 gour

Maybe a compromise between difficulty in implementation and feature richness would be to make a DOT file https://en.wikipedia.org/wiki/DOT_(graph_description_language) and then let the user visualize the graph manually. Then the only job for QownNotes would be to parse the markdown files and whenever a tag refers to another note make a graph connection on the dot file

SpyrosMourelatos avatar Feb 08 '22 18:02 SpyrosMourelatos

You can manipulate the preview with the scripting engine...

pbek avatar Feb 08 '22 18:02 pbek

Is it possible to have something like this? https://github.com/treymo/joplin-link-graph

MAAliy avatar Jun 07 '22 08:06 MAAliy

Is it possible to have something like this? https://github.com/treymo/joplin-link-graph

Are we talking about https://github.com/pbek/QOwnNotes/issues/2074#issuecomment-939284072?

pbek avatar Jun 07 '22 08:06 pbek

Is it possible to have something like this? https://github.com/treymo/joplin-link-graph

Are we talking about #2074 (comment)?

ah yes well how about trillium or siyuan? They are both offline.

MAAliy avatar Jun 10 '22 15:06 MAAliy

Are those Qt apps?

pbek avatar Jun 11 '22 05:06 pbek

Both are web apps.

Graph drawing is pretty cool: https://en.wikipedia.org/wiki/Graph_drawing Just adding to the stack of links here, this looks interesting: https://github.com/ogdf/ogdf There is a QML binding available (9 years old :sweat_smile:) https://github.com/schulzch/qml-ogdf (fork from 2017)

Video here: https://www.youtube.com/watch?v=ZOw1eOYFumo&t=7s

louwers avatar Jun 28 '22 09:06 louwers

Both are web apps.

😅

There is a QML binding available (9 years old sweat_smile) https://github.com/schulzch/qml-ogdf (fork from 2017)

Looks like this would very hard to get running on all platforms and build systems... and to maintain!

pbek avatar Jun 28 '22 13:06 pbek

Maybe a compromise between difficulty in implementation and feature richness would be to make a DOT file https://en.wikipedia.org/wiki/DOT_(graph_description_language) and then let the user visualize the graph manually. Then the only job for QownNotes would be to parse the markdown files and whenever a tag refers to another note make a graph connection on the dot file

There is already a QON plugin to render DOT files: https://github.com/qownnotes/scripts/tree/master/render-plantuml. So, if someone can manage to generate a DOT file from .md files (a map of all the links inside the files), the rest is already done.

Beurt avatar Jul 17 '23 22:07 Beurt

@SpyrosMourelatos @pbek

I'm adding that there is already something that could help build the DOT graph of connections for a specific note. There is two scripts: One for wikilinks support [[notename]] and another for listing the backlinks using such format. The later output could be used to generate a DOT graph. However, the links between notes must use wikilinks (I think that proper MarkDown links [text](URL) are harder to use because the URL can use many paths such as relative, absolute, softlinks, etc.)

Beurt avatar Jul 19 '23 10:07 Beurt

The way to do this would be to create a database of all links by recursively parsing all notes. Every link would count as a forward link. Every page that is linked to would list the pages that link to them as backlinks.

And all the forward links could be used to create the graph. (How) The keyword for such graphs is force directed graph. There is a JS library called d3-force, and force-graph based on it for this purpose. But I haven't been able to find something for Qt.

Additionally, when using WikiLinks, anchor points could be supported to point to specific headings, or if there is a concept such as blocks in QOwnNotes. Or it could simply define a random marker (using an alphanumeric code by default, such as ^xyzz12. The links would be like [[note-filename^xyzz12]].

And we already have custom names in Wikilinks, which we can pair with it like [[note-filename^xyzz12|Note Name]].

blacklightpy avatar Mar 27 '24 10:03 blacklightpy