I have the following markdown document
Heading-a
==========
---text---
Heading-b
------------
--- text ---
Heading-c
----------
--- text---
Heading-d
=======
--- text----
Heading-e
---
...
I did not find a tool which makes me a click-able table of contents similarly as LaTex does.
This suggests me that we should build one.
The tool should collect 'H1' headings and 'H2' headings such that it assigns the number 1 to Heading-a and the number 1.1. to Heading-b, 1.2. to Heading-c, 2. to Heading-d, 2.1. to Heading-e and so on.
We should get the following Table of contens
1. Heading-a
1.1. Heading-b
1.2. Heading-c
2. Heading-d
2.1. Heading-e
How can you make such a table of contents by Python/AWK/SED?