<commit_before>##  Makefile (for maintainance purpose)
##

PACKAGE=pdfminer
PREFIX=/usr/local

PYTHON=python
RM=rm -f
CP=cp -f

all:

install:
	$(PYTHON) setup.py install --prefix=$(PREFIX)

clean:
	-$(PYTHON) setup.py clean
	-$(RM) -r build dist MANIFEST
	-cd $(PACKAGE) && $(MAKE) clean
	-cd tools && $(MAKE) clean

distclean: clean test_clean cmap_clean

pack: distclean MANIFEST
	$(PYTHON) setup.py sdist
register: distclean MANIFEST
	$(PYTHON) setup.py sdist upload register

WEBDIR=$$HOME/Site/unixuser.org/python/$(PACKAGE)
publish:
	$(CP) docs/*.html $(WEBDIR)

CONV_CMAP=$(PYTHON) tools/conv_cmap.py
CMAPSRC=cmaprsrc
CMAPDST=pdfminer/cmap
cmap: $(CMAPDST)/to-unicode-Adobe-CNS1.pickle.gz $(CMAPDST)/to-unicode-Adobe-GB1.pickle.gz \
	$(CMAPDST)/to-unicode-Adobe-Japan1.pickle.gz $(CMAPDST)/to-unicode-Adobe-Korea1.pickle.gz
cmap_clean:
	cd $(CMAPDST) && make cmap_clean
$(CMAPDST)/to-unicode-Adobe-CNS1.pickle.gz:
	$(CONV_CMAP) $(CMAPDST) Adobe-CNS1 $(CMAPSRC)/cid2code_Adobe_CNS1.txt cp950 big5
$(CMAPDST)/to-unicode-Adobe-GB1.pickle.gz:
	$(CONV_CMAP) $(CMAPDST) Adobe-GB1 $(CMAPSRC)/cid2code_Adobe_GB1.txt cp936 gb2312
$(CMAPDST)/to-unicode-Adobe-Japan1.pickle.gz:
	$(CONV_CMAP) $(CMAPDST) Adobe-Japan1 $(CMAPSRC)/cid2code_Adobe_Japan1.txt cp932 euc-jp
$(CMAPDST)/to-unicode-Adobe-Korea1.pickle.gz:
	$(CONV_CMAP) $(CMAPDST) Adobe-Korea1 $(CMAPSRC)/cid2code_Adobe_Korea1.txt cp949 euc-kr

test: cmap
	cd samples && $(MAKE) test CMP=cmp
test_clean:
	-cd samples && $(MAKE) clean

SED=sed
FIND=find . '(' -name .git -o -name .svn -o -name CVS -o -name dev -o -name dist -o -name build ')' -prune -false -o
SORT=sort
TOUCH=touch
MANIFEST:
	$(TOUCH) MANIFEST
	$(FIND) -type f '!' -name '.*' | $(SED) 's:./::' | $(SORT) > MANIFEST
<commit_msg>change install path for testing<commit_after>##  Makefile (for maintainance purpose)
##

PACKAGE=pdfminer

PYTHON=python
RM=rm -f
CP=cp -f

all:

install:
	$(PYTHON) setup.py install --home=$(HOME)

clean:
	-$(PYTHON) setup.py clean
	-$(RM) -r build dist MANIFEST
	-cd $(PACKAGE) && $(MAKE) clean
	-cd tools && $(MAKE) clean

distclean: clean test_clean cmap_clean

pack: distclean MANIFEST
	$(PYTHON) setup.py sdist
register: distclean MANIFEST
	$(PYTHON) setup.py sdist upload register

WEBDIR=$$HOME/Site/unixuser.org/python/$(PACKAGE)
publish:
	$(CP) docs/*.html $(WEBDIR)

CONV_CMAP=$(PYTHON) tools/conv_cmap.py
CMAPSRC=cmaprsrc
CMAPDST=pdfminer/cmap
cmap: $(CMAPDST)/to-unicode-Adobe-CNS1.pickle.gz $(CMAPDST)/to-unicode-Adobe-GB1.pickle.gz \
	$(CMAPDST)/to-unicode-Adobe-Japan1.pickle.gz $(CMAPDST)/to-unicode-Adobe-Korea1.pickle.gz
cmap_clean:
	cd $(CMAPDST) && make cmap_clean
$(CMAPDST)/to-unicode-Adobe-CNS1.pickle.gz:
	$(CONV_CMAP) $(CMAPDST) Adobe-CNS1 $(CMAPSRC)/cid2code_Adobe_CNS1.txt cp950 big5
$(CMAPDST)/to-unicode-Adobe-GB1.pickle.gz:
	$(CONV_CMAP) $(CMAPDST) Adobe-GB1 $(CMAPSRC)/cid2code_Adobe_GB1.txt cp936 gb2312
$(CMAPDST)/to-unicode-Adobe-Japan1.pickle.gz:
	$(CONV_CMAP) $(CMAPDST) Adobe-Japan1 $(CMAPSRC)/cid2code_Adobe_Japan1.txt cp932 euc-jp
$(CMAPDST)/to-unicode-Adobe-Korea1.pickle.gz:
	$(CONV_CMAP) $(CMAPDST) Adobe-Korea1 $(CMAPSRC)/cid2code_Adobe_Korea1.txt cp949 euc-kr

test: cmap
	cd samples && $(MAKE) test CMP=cmp
test_clean:
	-cd samples && $(MAKE) clean

SED=sed
FIND=find . '(' -name .git -o -name .svn -o -name CVS -o -name dev -o -name dist -o -name build ')' -prune -false -o
SORT=sort
TOUCH=touch
MANIFEST:
	$(TOUCH) MANIFEST
	$(FIND) -type f '!' -name '.*' | $(SED) 's:./::' | $(SORT) > MANIFEST

{'fraction_non_alphanumeric': 0.17335243553008595, 'fraction_numerical': 0.021203438395415473, 'mean_word_length': 4.7417763157894735, 'pattern_counts': {'":': 0, '<': 3, '<?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': '839571', 'n_tokens_mistral': 1656, 'n_tokens_neox': 1580, 'n_words': 297}