<commit_before>CLOUDFRONT_DISTRIBUTION_ID=E372HNY0DNX3PN
TOOLS=src/tools
PLANTUML=deps/plantuml.jar

UML_SRCS=$(shell find src/_uml -name '*.uml.txt')
UMLS=$(UML_SRCS:src/_uml/%.uml.txt=src/generated/uml/%.svg)

DRAFT_SRCS=$(shell find src/_drafts -name '*.md')
DRAFTS_PDF=$(DRAFT_SRCS:src/_drafts/%.md=target/drafts/%.pdf)
DRAFTS_HTML=$(DRAFT_SRCS:src/_drafts/%.md=target/drafts/%.html)

PANDOC_DRAFT_OPTS = -V date:'$(shell date --iso-8601) (draft)'
PANDOC_DRAFT_PDF_OPTS = -H src/draft-header.tex \
												-V urlcolor:blue \
												--highlight-style=monochrome \
												--number-sections \
												-V geometry:paperwidth=6.125in \
												-V geometry:paperheight=9.25in \
												-V geometry:margin=.25in

build: $(PLANTUML) $(UMLS)
	make -C src/_posts/pandoc-beamer-examples all
	cabal new-build
	rm -rf src/generated/diagrams
	cd src && bundle exec jekyll build --destination ../target/html

serve: $(PLANTUML) $(UMLS)
	make -C src/_posts/pandoc-beamer-examples all
	cabal new-build
	rm -rf src/generated/diagrams
	(cd src && bundle exec jekyll serve --host '0.0.0.0' --drafts --destination ../target/html --unpublished --config=_config.yml,_local_config.yml)

target/drafts/%.pdf: src/_drafts/%.md src/draft-header.tex
	mkdir -p $(shell dirname $@)
	cat $< | sed 's/\/assets/assets/g' | pandoc -f markdown --resource-path=.:src $(PANDOC_DRAFT_OPTS) $(PANDOC_DRAFT_PDF_OPTS) -o $@

target/drafts/%.html: src/_drafts/%.md
	mkdir -p $(shell dirname $@)
	cat $< | sed 's/\/assets/assets/g' | pandoc -s --resource-path=.:src $(PANDOC_DRAFT_OPTS) -o $@

drafts: $(DRAFTS_PDF) $(DRAFTS_HTML)

clean:
	rm -rf target

deploy: build
	aws s3 sync --region=eu-west-1 target/html s3://wickstrom.tech --acl=public-read
	aws cloudfront create-invalidation --distribution-id $(CLOUDFRONT_DISTRIBUTION_ID) --paths '/*'
<commit_msg>Explicit profile for AWS<commit_after>CLOUDFRONT_DISTRIBUTION_ID=E372HNY0DNX3PN
TOOLS=src/tools
PLANTUML=deps/plantuml.jar

UML_SRCS=$(shell find src/_uml -name '*.uml.txt')
UMLS=$(UML_SRCS:src/_uml/%.uml.txt=src/generated/uml/%.svg)

DRAFT_SRCS=$(shell find src/_drafts -name '*.md')
DRAFTS_PDF=$(DRAFT_SRCS:src/_drafts/%.md=target/drafts/%.pdf)
DRAFTS_HTML=$(DRAFT_SRCS:src/_drafts/%.md=target/drafts/%.html)

PANDOC_DRAFT_OPTS = -V date:'$(shell date --iso-8601) (draft)'
PANDOC_DRAFT_PDF_OPTS = -H src/draft-header.tex \
												-V urlcolor:blue \
												--highlight-style=monochrome \
												--number-sections \
												-V geometry:paperwidth=6.125in \
												-V geometry:paperheight=9.25in \
												-V geometry:margin=.25in

build: $(PLANTUML) $(UMLS)
	make -C src/_posts/pandoc-beamer-examples all
	cabal new-build
	rm -rf src/generated/diagrams
	cd src && bundle exec jekyll build --destination ../target/html

serve: $(PLANTUML) $(UMLS)
	make -C src/_posts/pandoc-beamer-examples all
	cabal new-build
	rm -rf src/generated/diagrams
	(cd src && bundle exec jekyll serve --host '0.0.0.0' --drafts --destination ../target/html --unpublished --config=_config.yml,_local_config.yml)

target/drafts/%.pdf: src/_drafts/%.md src/draft-header.tex
	mkdir -p $(shell dirname $@)
	cat $< | sed 's/\/assets/assets/g' | pandoc -f markdown --resource-path=.:src $(PANDOC_DRAFT_OPTS) $(PANDOC_DRAFT_PDF_OPTS) -o $@

target/drafts/%.html: src/_drafts/%.md
	mkdir -p $(shell dirname $@)
	cat $< | sed 's/\/assets/assets/g' | pandoc -s --resource-path=.:src $(PANDOC_DRAFT_OPTS) -o $@

drafts: $(DRAFTS_PDF) $(DRAFTS_HTML)

clean:
	rm -rf target

deploy: build
	aws s3 sync --region=eu-west-1 target/html s3://wickstrom.tech --acl=public-read --profile wickstrom.tech
	aws cloudfront create-invalidation --distribution-id $(CLOUDFRONT_DISTRIBUTION_ID) --paths '/*' --profile wickstrom.tech

{'fraction_non_alphanumeric': 0.16511318242343542, 'fraction_numerical': 0.013315579227696404, 'mean_word_length': 3.514423076923077, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '1125112', 'n_tokens_mistral': 1703, 'n_tokens_neox': 1512, 'n_words': 273}