nnako / freeplane-python-io

a Python library to directly access Freeplane mindmap files
GNU General Public License v3.0
12 stars 5 forks source link

Interface to access nodes arrow-linked to another node seems to be missing #8

Closed kraghuprasad closed 1 month ago

kraghuprasad commented 1 month ago

I am writing a tool to convert a freeplane mindmap into a well-formatted PDF. I needed to create section-links in the PDF based on the arrow-links present in the mindmap. While going through the documentation, I am still unable to find a property or method which can give me all the nodes to which a node is pointing to using arrow-links. Similarly.

Similarly I also need the list of nodes which is referring to a particular node (to which the arrows terminate).

Is it possible using freeplane-python-io?

nnako commented 1 month ago

Hi @kraghuprasad and thank you for your request.

Unfortunately, arrow links can currently only be added to a specific node using the node's method add_arrowlink(). And this arrow link will always be an outgoing link. Other methods have not been implemented concerning arrow links, yet.

The ideas for methods are:

Would these methods be a solution for you?

nnako commented 1 month ago

I just pushed the implementation of the two methods:

the last method will follow when I got time again ;-) . If you are able to update the source code or if you were running the sources anyway (not installing via pip), you can update your sources and try the solution. If you installed using pip, you will have to wait for the next "official" release, which may come very soon.

nnako commented 1 month ago

uploaded release 0.10.0 containing the new arrowlink attributes and methods. closing this issue.

kraghuprasad commented 1 month ago

Sorry for the delayed response, as I am on vacation and Net-access is not a strong point for this place.

The two properties node.arrowlinks and node.arrowlinked seem to be perfect for me right now. I'll check them out soon. What I needed was a list of nodes to which outgoing arrows point to, from the source-node; and a list of the same from where incoming ones land up on the chosen node. From that angle, the names seem perfect.

regards, Raghu

On Sat, Oct 26, 2024 at 9:03 PM nnako @.***> wrote:

Hi @kraghuprasad https://github.com/kraghuprasad and thank you for your request.

Unfortunately, arrow links can currently only be added to a specific node using the node's method add_arrowlink(). And this arrow link will always be an outgoing link. Other methods have not been implemented concerning arrow links, yet.

The ideas for methods are:

  • .arrowlinks to retrieve a list of nodes which are arrow-connected from the
  • .arrowlinked to retrieve a list of nodes which are arrow-linking the (incoming arrows)
  • .del_arrowlink( ) to remove an existing outgoing arrow link. will have to start from 0 and would be respecting the sequence returned by the arrowlinks method.

Would these methods be a solution for you?

— Reply to this email directly, view it on GitHub https://github.com/nnako/freeplane-python-io/issues/8#issuecomment-2439623128, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQJXCHZJDSPUOFZZVKFIOTZ5OY3HAVCNFSM6AAAAABQO2E7SOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZZGYZDGMJSHA . You are receiving this because you were mentioned.Message ID: @.***>

kraghuprasad commented 2 weeks ago

I would like to confirm that the newly added features of accessing arrow-linked nodes are working perfectly.

Thanks.