<commit_before># merge_mind

Processes a Freemind mindmap file, replacing nodes linked to external files with the content of
those files


## Requirements

python3
python3-lxml


## Usage

Let's say you have the following files:

	CommonNodes.mm
	MainFile.mm

and let's say that MainFile has a node which links to the CommonNodes.mm file.


Then running:

	merge_mind Mainfile.mm > MergedFile.mm

Will create a file containing combined node tree, with nodes from both files.

In the merged file, the id of the linked node will become the id of the top-level node in the
linked file.


## To do

It would probably make sense to support linking to sub-nodes within the linked file.  For my
purposes (single-sourcing documents), linking to the top-level node in the linked file gets
the job done.


## License

Affero GPL, version 3.0 or higher<commit_msg>A little more readme<commit_after># merge_mind

Processes a Freemind mindmap file, replacing nodes linked to external files with the content of
those files


## Use-cases

### Single-sourcing documents / designs / project files

It's possible to write documents entirely in freemind, and then export them to OpenOffice, HTML,
etc.

With this tool and Freeminds' linking feature, you can share common content (for example,
legal disclaimers, "About the author" sections, tutorials, definitions, common web-pages (say,
contact pages) across multiple sites and documents, etc.

It may be especially handy for various documents ABOUT your sites / projects.  For example,
external/customer-level design specifications and internal/developer-level technical
specifications can both share content using this tool.

### Others?

If you're using this tool for anything else, please fire me off an email and let me know.  That
way, I can be inspired to work on it more, and can also bear your use cases in mind during
future changes.


## Requirements

python3
python3-lxml


## Usage

Let's say you have the following files:

	CommonNodes.mm
	MainFile.mm

and let's say that MainFile has a node which links to the CommonNodes.mm file.


Then running:

	merge_mind Mainfile.mm > MergedFile.mm

Will create a file containing combined node tree, with nodes from both files.

In the merged file, the id of the linked node will become the id of the top-level node in the
linked file.



## To do

It would probably make sense to support linking to sub-nodes within the linked file, as documented here:

	http://freemind.sourceforge.net/wiki/index.php/FreeMind_0.9.0:_The_New_Features#Linking_to_nodes_in_another_mm-file

This is kind of a half-baked feature in Freemind right now though, since you have to manually enter the
node id into the link path.

For my (current) purposes (single-sourcing documents with chapters elsewhere), linking to the top-level
node in the linked file gets the job done.


## License

Affero GPL, version 3.0 or higher
{'fraction_non_alphanumeric': 0.051264288188430894, 'fraction_numerical': 0.0038101835815725666, 'mean_word_length': 4.231884057971015, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6752266', 'n_tokens_mistral': 829, 'n_tokens_neox': 779, 'n_words': 414}