Last active
June 15, 2018 13:22
-
-
Save sideshowcoder/636db3538c8cc0062f352c964f028458 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use Mermaid (https://github.com/knsv/mermaid) and Markdown to create word docs | |
# with diagrams. | |
# Requires Pandoc and mermaid pandoc filter to process all md files in the | |
# current folder to html and the html to docx for word | |
# see https://github.com/raghur/mermaid-filter | |
SRC = $(wildcard *.md) | |
DIA = $(SRC:.md=.html) | |
DOCS = $(DIA:.html=.docx) | |
.PHONY: default | |
default: docs | |
docs: $(DOCS) | |
diagrams: $(DIA) | |
clean: | |
-@rm -f *.html *.docx *.png 2>/dev/null || true | |
%.html: %.md | |
pandoc -t html -F mermaid-filter -o $@ $< | |
%.docx: %.html | |
pandoc -s $< -o $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment