My dream is to use codebraid to write README.md files for all my
projects.
To achieve this I have come up with a Makefile to convert all .cbmd
files in a repository. This makes it much easier to get up and running
with a more automated workflow. I feel it is a must to convince all my
programmer friends that using Codebraid for this purpose is awesome. I
would love to see literate programming reach a wider audience.
I have been exploring the possibilites in this repo if you are curious.
Would you be interested in a PR with an example for this workflow?
Perhaps as a subfolder in the examples directory.
Makefile:
CODEBRAID_DOCS := $(shell find . -name '*.cbmd')
MARKDOWN_DOCS = $(CODEBRAID_DOCS:.cbmd=.md)
.PHONY: cbmd watch
# Must cd into the target file directory so Pandoc and Codebraid are
# able to use relative paths as one would expect
%.md : %.cbmd
cd $(@D); codebraid pandoc --from markdown --to gfm --filter=mermaid-filter --output $(notdir $@) --overwrite $(notdir $^)
cbmd : $(MARKDOWN_DOCS)
watch :
find . -name '*.cbmd' | entr make cbmd
My dream is to use codebraid to write
README.md
files for all my projects.To achieve this I have come up with a Makefile to convert all
.cbmd
files in a repository. This makes it much easier to get up and running with a more automated workflow. I feel it is a must to convince all my programmer friends that using Codebraid for this purpose is awesome. I would love to see literate programming reach a wider audience.I have been exploring the possibilites in this repo if you are curious.
Would you be interested in a PR with an example for this workflow? Perhaps as a subfolder in the examples directory.
Makefile: