giuspen / cherrytree

cherrytree
https://www.giuspen.net/cherrytree/
Other
3.29k stars 457 forks source link

"Copy link to node" for external use [feature request] #2452

Closed jonathonmckay closed 2 days ago

jonathonmckay commented 3 months ago

I've been using CherryTree for a couple years now, and am completely loving it. That said, there are a couple thing I'd like to see added some day to make it even better. (I'll raise them separately. Apologies if there is already threads for them that I missed)

I find the "Copy link to node" super useful for cross referencing related notes. However, occasionally it'd like to copy a link or path to a node for pasting into another application (A task tracker, email, documents, etc). However, all that gets pasted into the other application is something like "node: 07 Thu"

I'd like to see a menu / tool bar option to "Copy node path" or something like that, that could copy to the the clipboard something along the lines of "\path\to\CTfile - path / through / the / nodes", basically as displayed at the top of the editor window, with the path and file its from (optionally) tacked on the front.

Extra awesome (but not at all necessary): Make it paste as some kind of link, that would trigger CherryTree to open the correct file and navigate to the correct node. This would likely require registering some kind of URI handling with the OS, I would expect.

gitvectors commented 3 months ago

When I do not find a built in feature I look for workarounds. I am considering CherryTree documents to interface with external apps .. as are you. I concluded that my route is to work on the internal structure in a .ctd mode. (Note: extension typo error later corrected to .ctd) Install XMLCopyEditor and open your *.ctd (it must be that, not SQL) in XMLCopyeditor. https://xml-copy-editor.sourceforge.io/ Explore the XML elements. Now we can begin to build API's to the XML structure. Also go to CherryTree Manual (F1) and read Command Line.

That is my approach. Research XML treeelement parsing in Python. I am using CherryTree as the hub of a number of processes.

giuspen commented 5 days ago

Hello @jonathonmckay I added more information to the link to node (and to the link to anchor) when pasted to a non rich text node or outside of cherrytree. For a command that automatically opens cherrytree to the specified node you would have to use command line arguments, but those are not working at the moment on the windows cherrytree.exe.

jonathonmckay commented 2 days ago

Excellent. This is exactly what I was hoping for. Thank you so much.