This script add a markmap inside index.md
where have the comment <!-- Map site insert -->
.
Read all markdown, taking all headers to create a mind map.
This was designed to work together mkdocs
and mkdocs-markmap
.
No dependencies
You can view where to used:
Run script inside the project, the script looking for folder ./docs
index.md
# Index file
## Here gonna stay the mind map autogenerated
<!-- Map site insert -->
# Capítulo 1
## [Introducción a Electrónica básica](00_introduccion#introduccion-a-electronica-basica)
### [Conceptos básicos](00_introduccion#conceptos-basicos)
### [Conductor y Aislante](00_introduccion#conductor-y-aislante)
### [Voltaje](00_introduccion#voltaje)
### [Corriente](00_introduccion#corriente)
### [Resistencia](00_introduccion#resistencia)
---
File 00_introduccion.md
# Introducción a Electrónica básica
## Conceptos básicos
## Conductor y Aislante
### Conductor
Es un elemento el cual tiene la capacidad para conducir electricidad. Fluye fácilmente la corriente sobre él, sin poner resistencia a su paso.
...
Add this modules to mkdocs
or mkdocs-material
addmap --help
usage: cli.py [-h] [-p PATH] [-v] [-e paths/to/exclude [paths/to/exclude ...]]
Command to add markmap to index to all folders, search all index.md with a flag where insert information
optional arguments:
-h, --help show this help message and exit
-p PATH, --path PATH Path from folder to have inside docs folder. Default: Here (.)
-v, --verbose Show all logs
-e paths/to/exclude [paths/to/exclude ...], --exclude paths/to/exclude [paths/to/exclude ...]
Exclude directories or folders inside PATH. Ex: -e path/to/exclude path/to/exclude2
- If not exist the folder
docs
not throw error