Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a markdown index generator #3

Open
jofaval opened this issue Aug 12, 2022 · 2 comments
Open

Create a markdown index generator #3

jofaval opened this issue Aug 12, 2022 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@jofaval
Copy link
Owner

jofaval commented Aug 12, 2022

Currently, whenever I'm creating/modifying a README, I'm almost all of the time creating/updating an index, while when adding or removing a section, updating even, is not as tedious, creating a bunch of sections and then updating the README, with the indentation level, it's kind of a pain in the booty. Something I could automate.

My idea is that it can generate the index in a separate file, as to not bother myself too much with replacing it's content.

But, as an improvement, or idea even, I could define a region (as with dot.net):

<!-- #[index-start] -->

1. [Title](#title)
2. [Product](#product)
    1. [Product Roadmap](#product-roadmap)

<!-- #[index-end] -->

Add an ignore section:

<!-- [ignore] -->
### This is just for visualization purposes

Example user call

python3 markdown-index-generator.py --indent-level=3

indent-level being the max indent level you want to index. 0 by default which would mean, every single level

Optional

  • Create a configuration file and implement an observer so that the index cn be automatically taken care of while you're writting docs?
  • Adding a back to index, contents
  • As an extra, make it indent sensitive, meaning, only first level gets a reference to the contents index table, the rest get a reference (Back to...) the parent's section

Proposed regex

/[\w\s]+/igu
@jofaval jofaval added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 12, 2022
@jofaval jofaval self-assigned this Aug 12, 2022
@jofaval
Copy link
Owner Author

jofaval commented Jun 16, 2023

Implement an option for ordered and unordered list.

<!-- [ordered list] -->
1. [Title](#title)
    1. [Subtitle](s#ubtitle)

<!-- [unordered list] -->
* [Title](#title)
    * [Subtitle](s#ubtitle)

@jofaval
Copy link
Owner Author

jofaval commented Jun 17, 2023

worked on commit e08efb1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant