zyedidia / Literate

A literate programming tool for any language
https://zyedidia.github.io/literate/
Other
671 stars 46 forks source link

Output markdown instead of HTML #50

Open bas080 opened 3 years ago

bas080 commented 3 years ago

Most opensource projects nowadays have a README in markdown format. It would be great to be able to have Literate generate this README for me.

To achieve this I need Literate to output markdown.

Although I agree that a README should not contain all source code, it would be nice to be able to reference certain code blocks in the README. Usage examples and performing project related tasks.

Also, if Literate outputs markdown, it would play nicer with other tools like pandoc and many other tools that allow markdown as input.

Maybe it's already possible to do this but I haven't been able to get it to work.

brikis98 commented 3 years ago

+1

bas080 commented 3 years ago

I've experimented with the literate programming idea for a while now. I have added a concept of evaluating markdown code-blocks. With that feature I am able to also enable code weaving.

See: https://github.com/bas080/markatzea - allows evaluating markdown code-blocks https://github.com/bas080/memplate - a template language for working with code

Both tools are written in Perl.

I have used markatzea in many of my projects. One feature I like is that I'm able to evaluate my usage examples and test if they are still valid and working, while at the same time rendering the output of those processes.

Not trying to steal Literate's thunder here. Just trying to explore the world of literate programming and share my findings.