-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (46 loc) · 1.78 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
all: final README.pdf
final: data/target/daten_berlin_de.searchterms.json
data/target/daten_berlin_de.searchterms.json: data/temp/daten_berlin_de.searchterms.filtered.json
@echo "building final version ..."
@echo "writing to $@ ..."
@cp $< $@
data/target/daten_berlin_de.searchterms.%.csv:
@echo "converting to CSV ..."
@echo "writing to $@ ..."
@bin/csv_for.sh data/target/daten_berlin_de.searchterms.json $@
filtered: data/temp/daten_berlin_de.searchterms.filtered.json
.PHONY: data/temp/daten_berlin_de.searchterms.filtered.json
data/temp/daten_berlin_de.searchterms.filtered.json: data/temp
@echo "extracting search terms with filtering ..."
@echo "writing to $@ ..."
@python bin/extract_searchterms.py -o $@
unfiltered: data/temp/daten_berlin_de.searchterms.unfiltered.json
.PHONY: data/temp/daten_berlin_de.searchterms.unfiltered.json
data/temp/daten_berlin_de.searchterms.unfiltered.json: data/temp
@echo "extracting search terms ..."
@echo "writing to $@ ..."
@python bin/extract_searchterms.py -o $@
README.pdf: README.md
@echo "generate README.pdf from README.md"
@pandoc -o README.pdf README.md
.PHONY: README.md
README.md: data/temp/date.txt
@echo "update README.md with current date"
@sed '$$ d' README.md > _README.md
@cat _README.md $< > README.md
@rm _README.md
data/temp/terms_%.json:
@echo "extracting list of searchterms from data/temp/daten_berlin_de.searchterms.unfiltered.json ..."
@echo "writing to $@ ..."
@bin/terms_for.sh data/temp/daten_berlin_de.searchterms.unfiltered.json $@
.PHONY: data/temp/date.txt
data/temp/date.txt: | data/temp
@echo "write current date ..."
@date "+Last changed: %Y-%m-%d" > $@
clean: clean-temp
clean-temp:
@echo "deleting temp folder ..."
@rm -rf data/temp
data/temp:
@echo "creating temp directory ..."
@mkdir -p data/temp