<commit_before>SCRIPT=		dnssec_ta_tool.py

VENV=		env
MODULES=	pylint iso8601 xmltodict dnspython

TMPFILES=	root-anchors.xml root-anchors.p7s icannbundle.pem


all:
	
lint:
	pep8 --max-line-length=132 $(SCRIPT)
	pylint --reports=no -d line-too-long $(SCRIPT)

virtualenv:
	virtualenv -p python3 $(VENV)
	$(VENV)/bin/pip install 

root-anchors.p7s:
	curl -o $@ https://data.iana.org/root-anchors/root-anchors.p7s

icannbundle.pem:
	curl -o $@ http://data.iana.org/root-anchors/icannbundle.pem

root-anchors.xml: root-anchors.p7s icannbundle.pem
	curl -o root-anchors.tmp https://data.iana.org/root-anchors/root-anchors.xml
	openssl smime -verify -inform der \
		-CAfile icannbundle.pem \<commit_msg>add demo target<commit_after>SCRIPT=		dnssec_ta_tool.py

VENV=		env
MODULES=	pylint iso8601 xmltodict dnspython

TMPFILES=	root-anchors.xml root-anchors.p7s icannbundle.pem


all:
	
lint:
	pep8 --max-line-length=132 $(SCRIPT)
	pylint --reports=no -d line-too-long $(SCRIPT)

virtualenv:
	virtualenv -p python3 $(VENV)
	$(VENV)/bin/pip install 

demo: root-anchors.xml
	python dnssec_ta_tool.py --format dnskey --verbose

root-anchors.p7s:
	curl -o $@ https://data.iana.org/root-anchors/root-anchors.p7s

icannbundle.pem:
	curl -o $@ http://data.iana.org/root-anchors/icannbundle.pem

root-anchors.xml: root-anchors.p7s icannbundle.pem
	curl -o root-anchors.tmp https://data.iana.org/root-anchors/root-anchors.xml
	openssl smime -verify -inform der \
		-CAfile icannbundle.pem \
{'fraction_non_alphanumeric': 0.13685636856368563, 'fraction_numerical': 0.017615176151761516, 'mean_word_length': 3.9069767441860463, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 9}, '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': '2900897', 'n_tokens_mistral': 664, 'n_tokens_neox': 626, 'n_words': 113}