<commit_before>PANDOC = pandoc
IFORMAT = markdown
MATHJAX = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
FLAGS = --standalone --toc --toc-depth=2 --mathjax=$(MATHJAX) --highlight-style pygments
STYLE = css/style.css
FILTER = includes.hs
TEMPLATE_HTML = template.html
TEMPLATE_TEX = template.latex

#SRC = $(wildcard *.md)
SRC = 000_introduction.md \
      001_basics.md \
      002_parsers.md \
      003_lambda_calculus.md \
      004_type_systems.md \
      005_evaluation.md \
      006_hindley_milner.md \
      007_path.md \
      008_extended_parser.md \
      #009_datatypes.md \
      #010_renamer.md \
      #011_pattern_matching.md \
      #012_systemf.md
      #026_llvm.md
OBJ = $(SRC:.md=.html)

all: $(OBJ) top

%.html: %.md $(FILTER)
	$(PANDOC) -c $(STYLE) --filter ${FILTER} --template $(TEMPLATE_HTML) -s -f $(IFORMAT) -t html $(FLAGS) -o $@ $<

%.pdf: %.md $(FILTER)
	$(PANDOC) --filter ${FILTER} -f $(IFORMAT)  --template $(TEMPLATE_TEX) --latex-engine=xelatex $(FLAGS) -o $@ $<

%.epub: %.md $(FILTER)
	$(PANDOC) --filter ${FILTER} -f $(IFORMAT) $(FLAGS) -o $@ $<

pdf: $(FILTER)
	# $(PANDOC) --filter ${FILTER} -f $(IFORMAT) --template $(TEMPLATE_TEX) --latex-engine=xelatex $(FLAGS) -o WYAH.pdf title.md 0*.md contributing.md
	$(PANDOC) --filter ${FILTER} -f $(IFORMAT) --template $(TEMPLATE_TEX) --latex-engine=xelatex $(FLAGS) -o WYAH.pdf title.md $(SRC)

epub: $(FILTER)
	$(PANDOC) --filter ${FILTER} -f $(IFORMAT) $(FLAGS) -o WYAH.epub 0*.md

top: $(FILTER)
	$(PANDOC) -c $(STYLE) --filter ${FILTER} --template $(TEMPLATE_HTML) -s -f $(IFORMAT) -t html $(FLAGS) -o tutorial.html index.md

clean:<commit_msg>custom command for building index<commit_after>PANDOC = pandoc
IFORMAT = markdown
MATHJAX = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
FLAGS = --standalone --toc --toc-depth=2 --mathjax=$(MATHJAX) --highlight-style pygments
STYLE = css/style.css
FILTER = includes.hs
TEMPLATE_HTML = template.html
TEMPLATE_TEX = template.latex

#SRC = $(wildcard *.md)
SRC = 000_introduction.md \
      001_basics.md \
      002_parsers.md \
      003_lambda_calculus.md \
      004_type_systems.md \
      005_evaluation.md \
      006_hindley_milner.md \
      007_path.md \
      008_extended_parser.md \
      #009_datatypes.md \
      #010_renamer.md \
      #011_pattern_matching.md \
      #012_systemf.md
      #026_llvm.md
OBJ = $(SRC:.md=.html)

all: $(OBJ) top

index: index.html

%.html: %.md $(FILTER)
	$(PANDOC) -c $(STYLE) --filter ${FILTER} --template $(TEMPLATE_HTML) -s -f $(IFORMAT) -t html $(FLAGS) -o $@ $<

%.pdf: %.md $(FILTER)
	$(PANDOC) --filter ${FILTER} -f $(IFORMAT)  --template $(TEMPLATE_TEX) --latex-engine=xelatex $(FLAGS) -o $@ $<

%.epub: %.md $(FILTER)
	$(PANDOC) --filter ${FILTER} -f $(IFORMAT) $(FLAGS) -o $@ $<

pdf: $(FILTER)
	# $(PANDOC) --filter ${FILTER} -f $(IFORMAT) --template $(TEMPLATE_TEX) --latex-engine=xelatex $(FLAGS) -o WYAH.pdf title.md 0*.md contributing.md
	$(PANDOC) --filter ${FILTER} -f $(IFORMAT) --template $(TEMPLATE_TEX) --latex-engine=xelatex $(FLAGS) -o WYAH.pdf title.md $(SRC)

epub: $(FILTER)
	$(PANDOC) --filter ${FILTER} -f $(IFORMAT) $(FLAGS) -o WYAH.epub 0*.md

top: $(FILTER)
	$(PANDOC) -c $(STYLE) --filter ${FILTER} --template $(TEMPLATE_HTML) -s -f $(IFORMAT) -t html $(FLAGS) -o tutorial.html index.md

clean:
{'fraction_non_alphanumeric': 0.19318518518518518, 'fraction_numerical': 0.02666666666666667, 'mean_word_length': 3.257250945775536, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1574431', 'n_tokens_mistral': 1476, 'n_tokens_neox': 1345, 'n_words': 291}