<commit_before>
docs = $(shell find doc -name '*.md' \
				|sed 's|.md|.1|g' \
				|sed 's|doc/|man1/|g' \
				)
doc_subfolders = $(shell find doc -type d \
									|sed 's|doc/|man1/|g' \
									)

install:
	node cli.js install npm

dev:
	node cli.js install

link: uninstall
	node cli.js link

clean: uninstall

uninstall:
	node cli.js cache clean
	node cli.js rm npm

man: man1

man1: $(doc_subfolders)
	@if ! test -d man1 ; then mkdir -p man1 ; fi

doc: man1 $(docs)

# use `npm install ronn` for this to work.
man1/%.1: doc/%.md
	ronn --roff $< > $@

man1/%/: doc/%/
	@if ! test -d $@ ; then mkdir -p $@ ; fi

test:
	./test/run.sh

.PHONY: install install-dev link doc clean uninstall test man<commit_msg>Add a 'publish' make target<commit_after>
docs = $(shell find doc -name '*.md' \
				|sed 's|.md|.1|g' \
				|sed 's|doc/|man1/|g' \
				)
doc_subfolders = $(shell find doc -type d \
									|sed 's|doc/|man1/|g' \
									)

install:
	node cli.js install npm

dev:
	node cli.js install

link: uninstall
	node cli.js link

clean: uninstall

uninstall:
	node cli.js cache clean
	node cli.js rm npm

man: man1

man1: $(doc_subfolders)
	@if ! test -d man1 ; then mkdir -p man1 ; fi

doc: man1 $(docs)

# use `npm install ronn` for this to work.
man1/%.1: doc/%.md
	ronn --roff $< > $@

man1/%/: doc/%/
	@if ! test -d $@ ; then mkdir -p $@ ; fi

test:
	./test/run.sh

publish:
	[ "$(shell cat .git/HEAD)" = "ref: refs/heads/master" ] \
		&& git tag -s -m v$(shell npm -v) v$(shell npm -v) \
		&& git push origin master \
		&& npm publish

.PHONY: install install-dev link doc clean uninstall test man
{'fraction_non_alphanumeric': 0.16449410304158907, 'fraction_numerical': 0.013656114214773432, 'mean_word_length': 2.4967462039045554, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '577795', 'n_tokens_mistral': 747, 'n_tokens_neox': 677, 'n_words': 209}