diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-06-30 20:05:23 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-06-30 20:05:23 -0400 |
commit | e46a74fe8a143936eee2b9be1fd6b5f963357d9d (patch) | |
tree | 457e959fc8bcdf1222092a29435e468c824bb697 /Makefile | |
parent | 57266bea1b5fd82c6cc199c538783306c668b661 (diff) |
work on it
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 29 |
1 files changed, 17 insertions, 12 deletions
@@ -1,24 +1,29 @@ +PATH:=$(CURDIR)/bin:$(PATH) +export PATH + all: each-cdx -ftp.json: cdx_json - ./cdx_json 'url=ftp.unicode.org/Public/*' 'collapse=urlkey' > $@ -www.json: cdx_json - ./cdx_json 'url=www.unicode.org/Public/*' 'collapse=urlkey' > $@ -urlkeys.txt: ftp.json www.json Makefile - cat $^ | cut -d '"' -f2,10 | sed -n 's/"200$$//p' | cut -d '?' -f1 | sed 's/,ftp)/)/' | sort -u | grep -i -e cvtutf -e convertutf > $@ -urlkeys.mk: urlkeys.txt - sed 's/^/urlkeys+=/' < $< > $@ +dat: + mkdir -p $@ +dat/ftp.txt: | dat + cdxget 'url=ftp.unicode.org/Public/*' 'fl=urlkey' 'filter=statuscode:200' 'filter=urlkey:.*(cvt|convert)utf.*' > $@ +dat/www.txt: | dat + cdxget 'url=www.unicode.org/Public/*' 'fl=urlkey' 'filter=statuscode:200' 'filter=urlkey:.*(cvt|convert)utf.*' > $@ +dat/urlkeys.txt: dat/ftp.txt dat/www.txt + cat $^ | cut -d '?' -f1 | sed 's/,ftp)/)/' | sort -u > $@ +dat/urlkeys.mk: dat/urlkeys.txt + cat $^ | sed 's/^/urlkeys+=/' < $< > $@ --include urlkeys.mk +-include dat/urlkeys.mk rp = ) c = , all_urlkeys = $(urlkeys) $(subst $(rp),$(c)ftp$(rp),$(urlkeys)) -each-cdx/%.json: cdx_json urlkey2url +dat/each-cdx/%.txt: mkdir -p '$(@D)' - ./cdx_json "url=$$(./urlkey2url '$*')" 'collapse=digest' > '$@' + cdxget "url=$$(urlkey2url '$*')" 'filter=statuscode:200' 'collapse=digest' 'fl=timestamp,original' > '$@' -each-cdx: $(addprefix each-cdx/,$(addsuffix .json,$(all_urlkeys))) +each-cdx: $(addprefix dat/each-cdx/,$(addsuffix .txt,$(all_urlkeys))) .PHONY: each-cdx .DELETE_ON_ERROR: |