<commit_before>PHONY:=ucd.nounihan.flat.xml
EXTRA_JSON:=$(shell find unicode -type f -name \*.json)
CURRENT_GIT:=$(shell git describe --long --tags --always --dirty 2> /dev/null|| echo unknown)

run: http-pub/data.json
	(cd http-pub; python -m SimpleHTTPServer)

# Set up git pages
# (cd gh-pages; git checkout --orphan gh-pages; git rm -rf .)
gh-pages:
	git clone <EMAIL>:msiebuhr/unicodefinder.git gh-pages

commit-gh-pages: http-pub/data.json gh-pages
	cp http-pub/* gh-pages/
	(cd gh-pages; git add .; git commit --edit --message="Publish master@$(CURRENT_GIT).")

push-gh-pages:
	(cd gh-pages; git push origin gh-pages)

ucd.nounihan.flat.xml:
	wget -c http://www.unicode.org/Public/6.1.0/ucdxml/ucd.nounihan.flat.zip -O /tmp/ucd.nounihan.flat.zip
	unzip -p /tmp/ucd.nounihan.flat.zip > $@

w3c-unicode.xml:
	wget -c http://www.w3.org/2003/entities/2007xml/unicode.xml -O $@

unicode/01-w3c-unicode.json: w3c-unicode.xml w3c-xml2json.js
	./w3c-xml2json.js -i $< -o $@

unicode/00-base-unicode.json: ucd.nounihan.flat.xml ucd-xml2json.js
	./ucd-xml2json.js -i $< -o $@<commit_msg>Fix 'gh-pages'-target in makefile.<commit_after>PHONY:=ucd.nounihan.flat.xml
EXTRA_JSON:=$(shell find unicode -type f -name \*.json)
CURRENT_GIT:=$(shell git describe --long --tags --always --dirty 2> /dev/null|| echo unknown)

run: http-pub/data.json
	(cd http-pub; python -m SimpleHTTPServer)

# Set up git pages
# (cd gh-pages; git checkout --orphan gh-pages; git rm -rf .)
gh-pages:
	git clone <EMAIL>:msiebuhr/unicodefinder.git gh-pages
	(cd gh-pages; git checkout gh-pages)

commit-gh-pages: http-pub/data.json gh-pages
	cp http-pub/* gh-pages/
	(cd gh-pages; git add .; git commit --edit --message="Publish master@$(CURRENT_GIT).")

push-gh-pages:
	(cd gh-pages; git push origin gh-pages)

ucd.nounihan.flat.xml:
	wget -c http://www.unicode.org/Public/6.1.0/ucdxml/ucd.nounihan.flat.zip -O /tmp/ucd.nounihan.flat.zip
	unzip -p /tmp/ucd.nounihan.flat.zip > $@

w3c-unicode.xml:
	wget -c http://www.w3.org/2003/entities/2007xml/unicode.xml -O $@

unicode/01-w3c-unicode.json: w3c-unicode.xml w3c-xml2json.js
	./w3c-xml2json.js -i $< -o $@

unicode/00-base-unicode.json: ucd.nounihan.flat.xml ucd-xml2json.js
	./ucd-xml2json.js -i $< -o $@
{'fraction_non_alphanumeric': 0.1778176919622811, 'fraction_numerical': 0.02334979793444095, 'mean_word_length': 3.429423459244533, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 24}, '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': '149628', 'n_tokens_mistral': 1010, 'n_tokens_neox': 945, 'n_words': 192}