mindm.mindmanager module

Platform-independent interface for MindManager operations.

This module provides a unified interface for working with MindManager across different platforms (Windows and MacOS) by delegating to the appropriate platform-specific implementation.

class mindm.mindmanager.Mindmanager(charttype='auto')

Bases: object

__init__(charttype='auto')

Initialize a Mindmanager instance and delegate to the platform-specific implementation.

Parameters:

charttype (any) – The type of chart to initialize with.

add_document(max_topic_level: int) None

Add a new mind map document with a specified maximum topic level.

Parameters:

max_topic_level (int) – The maximum depth of topics in the document.

Returns:

None

add_relationship(guid1: any, guid2: any, label: str = '') None

Add a relationship between two topics.

Parameters:
  • guid1 (any) – The GUID of the first topic.

  • guid2 (any) – The GUID of the second topic.

  • label (str, optional) – Optional label for the relationship. Defaults to ‘’.

Returns:

None

add_subtopic_to_topic(topic: any, topic_text: str) any

Add a subtopic with the provided text to an existing topic.

Parameters:
  • topic (any) – The parent topic.

  • topic_text (str) – The text for the new subtopic.

Returns:

The newly created subtopic.

Return type:

any

add_tag_to_topic(topic: any, tag_text: str, topic_guid: str) None

Add a tag to the specified topic.

Parameters:
  • topic (any) – The topic to update.

  • tag_text (str) – The tag text to add.

Returns:

None

Create a link between two topics.

Parameters:
  • guid1 (any) – The GUID of the source topic.

  • guid2 (any) – The GUID of the target topic.

  • label (str, optional) – Optional label for the link. Defaults to ‘’.

Returns:

None

create_map_icons(map_icons: any) None

Create map icons based on the provided mapping.

Parameters:

map_icons (any) – The icons mapping.

Returns:

None

create_tags(tags: list[str], DUPLICATED_TAG: str) None

Create tags for the mind map.

Parameters:
  • tags (list[str]) – A list of tag names to create.

  • DUPLICATED_TAG (str) – The tag used in case of duplication.

Returns:

None

document_exists() bool

Check if a document exists in the current context.

Returns:

True if the document exists, False otherwise.

Return type:

bool

finalize(max_topic_level: int) None

Finalize and process the mind map document.

Parameters:

max_topic_level (int) – The maximum depth of topics processed.

Returns:

None

get_active_document_object() any

Retrieve the active document object.

Returns:

The active document object.

Return type:

any

get_central_topic() any

Retrieve the central topic of the mind map.

Returns:

The central topic.

Return type:

any

get_guid_from_topic(topic: any) str

Retrieve the GUID (Globally Unique Identifier) of the topic.

Parameters:

topic (any) – The topic to extract the GUID from.

Returns:

The GUID of the topic.

Return type:

str

get_icons_from_topic(topic: any) list

Retrieve all icons associated with the topic.

Parameters:

topic (any) – The topic to extract icons from.

Returns:

A list of icons.

Return type:

list

get_image_from_topic(topic: any) any

Retrieve the image associated with the topic.

Parameters:

topic (any) – The topic to extract the image from.

Returns:

The image object or path.

Return type:

any

get_level_from_topic(topic: any) any

Get the level of the given topic within the mind map hierarchy.

Parameters:

topic (any) – The topic to evaluate.

Returns:

The level of the topic.

Return type:

any

get_library_folder() str

Retrieve the library folder path for the MindManager application.

Returns:

The library folder path.

Return type:

str

Retrieve all links associated with the specified topic.

Parameters:

topic (any) – The topic to extract links from.

Returns:

A list of links.

Return type:

list

get_mindmanager_object() any

Retrieve the MindManager application object.

Returns:

The MindManager application object.

Return type:

any

get_notes_from_topic(topic: any) any

Retrieve the notes for the specified topic.

Parameters:

topic (any) – The topic to extract notes from.

Returns:

The notes of the topic.

Return type:

any

get_parent_from_topic(topic: any) any

Retrieve the parent topic of the given topic.

Parameters:

topic (any) – The topic to find the parent for.

Returns:

The parent topic.

Return type:

any

get_references_from_topic(topic: any) list

Retrieve all references associated with the topic.

Parameters:

topic (any) – The topic to extract references from.

Returns:

A list of references.

Return type:

list

get_selection() list

Get the currently selected topics.

Returns:

A list of selected topics.

Return type:

list

get_subtopics_from_topic(topic: any) list

Retrieve all subtopics for the specified topic.

Parameters:

topic (any) – The parent topic.

Returns:

A list of subtopics.

Return type:

list

get_tags_from_topic(topic: any) list

Retrieve all tags attached to the topic.

Parameters:

topic (any) – The topic to extract tags from.

Returns:

A list of tags.

Return type:

list

get_text_from_topic(topic: any) str

Retrieve the text content of a topic.

Parameters:

topic (any) – The topic to extract text from.

Returns:

The text content of the topic.

Return type:

str

get_title_from_topic(topic: any) str

Retrieve the title of a topic.

Parameters:

topic (any) – The topic to extract the title from.

Returns:

The title of the topic.

Return type:

str

get_topic_by_id(id: any) any

Retrieve a topic by its identifier.

Parameters:

id (any) – The identifier of the topic.

Returns:

The topic corresponding to the given id.

Return type:

any

get_version() str

Retrieve the version of the MindManager application.

Returns:

The version of the application.

Return type:

str

merge_windows() None

Merge multiple windows into a single window.

Returns:

None

set_document_background_image(path: str) None

Set the background image for the document.

Parameters:

path (str) – The path to the background image.

Returns:

None

set_text_to_topic(topic: any, topic_text: str) None

Set the text content for the specified topic.

Parameters:
  • topic (any) – The topic to update.

  • topic_text (str) – The new text content.

Returns:

None

set_title_to_topic(topic: any, topic_rtf: str) None

Set the title (as RTF) for the specified topic.

Parameters:
  • topic (any) – The topic to update.

  • topic_rtf (str) – The new title in RTF format.

Returns:

None

set_topic_from_mindmap_topic(topic: any, mindmap_topic: any, map_icons: any) any

Update or create a topic based on the provided mindmap topic and icons.

Parameters:
  • topic (any) – The current topic to update.

  • mindmap_topic (any) – The reference mindmap topic data.

  • map_icons (any) – Icons mapping for the topic.

Returns:

The updated topic.

Return type:

any