<commit_before># Use V=1 to see full verbosity
QUIET_  = @
QUIET   = $(QUIET_$(V))

# Initialise our content variables
html :=
extra_html :=
css :=
extra_css :=
js :=
extra_js :=
extra_site :=

include Makefile.private

#
# Site contents
#
#
# All html, css and js files are generated using the pattern rules defined
# below. If there are files which are not generated, then add them to a variable
# prefixed with extra_, for example, for a compressed jquery:
#
#	extra_js = assets/js/jquery.min.js
#
# Miscellaneous other assets should be added to $(extra_site).
html +=						\
	404.html				\
	index.html				\
	$(NULL)

css +=	assets/css/styles.css

js += 						\
	assets/js/impress.js			\
	assets/js/site.js			\
	$(NULL)

extra_js += assets/js/jquery-1.9.1.min.js

extra_site +=					\
	assets/img/arrows.png			\
	assets/img/facebook.png			\
	assets/img/favicon.ico			\
	assets/img/github.png			\
	assets/img/linkedin.png			\
	assets/img/my-face.png			\
	assets/img/screenshot-facebook.png	\
	assets/img/screenshot-github.png	\
	assets/img/screenshot-linkedin.png	\
	assets/img/screenshot-pictures.png	\
	assets/img/screenshot-soundcloud.png	\
	assets/img/screenshot-youtube.png	\
	assets/img/youtube.png			\
	$(NULL)

# site content
local_files = 					\
	$(html) $(extra_html)			\
	$(css)  $(extra_css)			\
	$(js)	$(extra_js)			\
	$(extra_site)				\
	$(NULL)

# absolute paths to server-side site content
server_files = $(patsubst %,$(SITE_PREFIX)/%,$(local_files))

# generated files
clean_files = $(html) $(css) $(js)

#
# Create and package generated files
#
all: $(local_files)

#
# Pack modified files into a tar and publish
#
TAR = .chriscummins.tar.gz

publish: $(TAR)

$(TAR): $(local_files)
	@for f in $?; do echo "  TAR      $$f"; done
	$(QUIET)tar -pczf $@ $?
	@echo '  SCP      $(SITE_PREFIX)/$(TAR)'
	$(QUIET)scp $(TAR) $(ADMIN)@$(ADDRESS):$(SITE_PREFIX)/ >/dev/null
	$(QUIET)ssh $(ADMIN)@$(ADDRESS) 'cd $(SITE_PREFIX)/ && \
				tar -zxf $(TAR) && \
				rm -f $(TAR) && \
				chown $(USER) $(server_files) && \
				chgrp $(USER) $(server_files)'

#
# Remove generated files
#
.PHONY: clean
clean:
	$(QUIET)rm -fv $(clean_files)

# See: https://developers.google.com/closure/compiler/
CLOSURE_COMPILER_JAR = ~/src/closure-compiler/build/compiler.jar

# See: http://yui.github.io/yuicompressor/
YUICOMPRESSOR_JAR = ~/src/yuicompressor/build/yuicompressor-2.4.8pre.jar

#
# Generate site content
#
%.js: %.js.in
	@echo '  JS       $@'
	$(QUIET)chmod 644 $<
	$(QUIET)java -jar $(CLOSURE_COMPILER_JAR) --js=$< --js_output_file=$@

%.css: %.css.in
	@echo '  CSS      $@'
	$(QUIET)chmod 644 $<
	$(QUIET)java -jar $(YUICOMPRESSOR_JAR)	--charset utf-8 -v \
						--type css $< >$@

%.html: %.html.in
	@echo '  HTML     $@'
	$(QUIET)chmod 644 $<
	$(QUIET) cp $< $@<commit_msg>build: Minify HTML files<commit_after># Use V=1 to see full verbosity
QUIET_  = @
QUIET   = $(QUIET_$(V))

# Initialise our content variables
html :=
extra_html :=
css :=
extra_css :=
js :=
extra_js :=
extra_site :=

include Makefile.private

#
# Site contents
#
#
# All html, css and js files are generated using the pattern rules defined
# below. If there are files which are not generated, then add them to a variable
# prefixed with extra_, for example, for a compressed jquery:
#
#	extra_js = assets/js/jquery.min.js
#
# Miscellaneous other assets should be added to $(extra_site).
html +=						\
	404.html				\
	index.html				\
	$(NULL)

css +=	assets/css/styles.css

js += 						\
	assets/js/impress.js			\
	assets/js/site.js			\
	$(NULL)

extra_js += assets/js/jquery-1.9.1.min.js

extra_site +=					\
	assets/img/arrows.png			\
	assets/img/facebook.png			\
	assets/img/favicon.ico			\
	assets/img/github.png			\
	assets/img/linkedin.png			\
	assets/img/my-face.png			\
	assets/img/screenshot-facebook.png	\
	assets/img/screenshot-github.png	\
	assets/img/screenshot-linkedin.png	\
	assets/img/screenshot-pictures.png	\
	assets/img/screenshot-soundcloud.png	\
	assets/img/screenshot-youtube.png	\
	assets/img/youtube.png			\
	$(NULL)

# site content
local_files = 					\
	$(html) $(extra_html)			\
	$(css)  $(extra_css)			\
	$(js)	$(extra_js)			\
	$(extra_site)				\
	$(NULL)

# absolute paths to server-side site content
server_files = $(patsubst %,$(SITE_PREFIX)/%,$(local_files))

# generated files
clean_files = $(html) $(css) $(js)

#
# Create and package generated files
#
all: $(local_files)

#
# Pack modified files into a tar and publish
#
TAR = .chriscummins.tar.gz

publish: $(TAR)

$(TAR): $(local_files)
	@for f in $?; do echo "  TAR      $$f"; done
	$(QUIET)tar -pczf $@ $?
	@echo '  SCP      $(SITE_PREFIX)/$(TAR)'
	$(QUIET)scp $(TAR) $(ADMIN)@$(ADDRESS):$(SITE_PREFIX)/ >/dev/null
	$(QUIET)ssh $(ADMIN)@$(ADDRESS) 'cd $(SITE_PREFIX)/ && \
				tar -zxf $(TAR) && \
				rm -f $(TAR) && \
				chown $(USER) $(server_files) && \
				chgrp $(USER) $(server_files)'

#
# Remove generated files
#
.PHONY: clean
clean:
	$(QUIET)rm -fv $(clean_files)

# See: https://developers.google.com/closure/compiler/
CLOSURE_COMPILER_JAR = ~/src/closure-compiler/build/compiler.jar

# See: http://yui.github.io/yuicompressor/
YUICOMPRESSOR_JAR = ~/src/yuicompressor/build/yuicompressor-2.4.8pre.jar

# See: https://code.google.com/p/htmlcompressor/
HTMLCOMPRESSOR_JAR = ~/src/htmlcompressor/target/htmlcompressor-1.5.3-SNAPSHOT.jar

#
# Generate site content
#
%.js: %.js.in
	@echo '  JS       $@'
	$(QUIET)chmod 644 $<
	$(QUIET)java -jar $(CLOSURE_COMPILER_JAR) --js=$< --js_output_file=$@

%.css: %.css.in
	@echo '  CSS      $@'
	$(QUIET)chmod 644 $<
	$(QUIET)java -jar $(YUICOMPRESSOR_JAR)	--charset utf-8 -v \
						--type css $< >$@

%.html: %.html.in
	@echo '  HTML     $@'
	$(QUIET)chmod 644 $<
	$(QUIET)java -jar $(HTMLCOMPRESSOR_JAR)	\
						$< >$@
{'fraction_non_alphanumeric': 0.17308027163503395, 'fraction_numerical': 0.007487375935921992, 'mean_word_length': 3.1896425966447848, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 8, 'https://': 3, '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': '5050975', 'n_tokens_mistral': 2531, 'n_tokens_neox': 2374, 'n_words': 472}