![]() The terms of the GNU General Public License as published by the Free Md-toc is free software: you can redistribute it and/or modify it under Like: pandoc -from =commonmark -to =html -o a.html README.md Generate an HTML output starting from a markdown file. Section of the documentation to learn how this program parsers markdownįiles and builds a correct output. read (), end = '' ) # Table of contents - ( #table-of-contents) - ( #this) - ( #is) - ( #a) - ( #foo) - ( #foo-1) - ( #file) - ( #bye) - ( #bye-1) # this # is # a # foo # booo # foo # file Test # bye # bye Documentation write_string_on_file_between_markers ( 'foo.md', toc, '' ) > f = open ( 'foo.md' ) > print ( f. read (), end = '' ) # Table of contents # this # is # a # foo # booo # foo # file Test # bye # bye > toc = md_toc. You can also write the TOC in place: > import md_toc > f = open ( 'foo.md' ) > print ( f. read (), end = '' ) # this # is # a # foo # booo # foo # file # bye # bye > print ( md_toc. The easiest way to build one for a markdown file is: > import md_toc > f = open ( 'foo.md' ) > print ( f. This means for example that you can you easily build a TOC within another Python # this # is # a # foo # booo # foo # file # bye # bye API examples $ md_toc -in-place github -header-levels 6 foo.md # or: md_toc -p github -l6 foo.md # this # is # a # foo # booo # foo # file # bye # bye TOC so md-toc is useful for this purpose.Ī very common use case is this: $ cat foo.md Most markdown renderers do not provide a way to automatically generate a I also use it in most repositories where README.md files are present. You can use md-toc in your blog, documentation based on markdown, GitHub pages,
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |