<commit_before>default: lint

all: setup index

index:
	@echo "WARNING!"
	@echo "Index rebuilding is deprecated."
	@echo "You should not do it, unless you understand why you doing this."
	@echo
	@TLDRHOME=`pwd` ./scripts/build_index.rb
	@echo "Index rebuilt."

setup: hooks deps

hooks:
	@cp ./scripts/pre-commit .git/hooks
	@chmod +x .git/hooks/pre-commit
	@echo "Git pre-commit hook installed."

deps:
	@bundle
	@echo "OK"

lint:
	@bundle exec mdl --style ./scripts/markdown-style.rb pages

.PHONY: default index setup hooks deps lint<commit_msg>Add prerequisites task to Makefile which warns about installation of Ruby and bundler<commit_after>default: lint

index:
	@echo "WARNING!"
	@echo "Index rebuilding is deprecated."
	@echo "You should not do it, unless you understand why you doing this."
	@echo
	@TLDRHOME=`pwd` ./scripts/build_index.rb
	@echo "Index rebuilt."

setup: prerequisites hooks deps

prerequisites:
	@echo
	@echo "IMPORTANT!"
	@echo "Before setting up hooks, make sure you have read Contributing Guidelines"
	@echo "https://github.com/tldr-pages/tldr/blob/master/CONTRIBUTING.md#submitting-a-pull-request"
	@echo
	@echo "TL;DR:"
	@echo "1. Install Ruby suitable for your system"
	@echo "2. Run 'gem install bundler'"
	@echo

hooks:
	@cp ./scripts/pre-commit .git/hooks
	@chmod +x .git/hooks/pre-commit
	@echo "Git pre-commit hook installed."

deps:
	@bundle
	@echo "OK"

lint:
	@bundle exec mdl --style ./scripts/markdown-style.rb pages

.PHONY: default index setup prerequisites hooks deps lint
{'fraction_non_alphanumeric': 0.1184990125082291, 'fraction_numerical': 0.0013166556945358788, 'mean_word_length': 4.205479452054795, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '7399249', 'n_tokens_mistral': 545, 'n_tokens_neox': 529, 'n_words': 176}