-
Notifications
You must be signed in to change notification settings - Fork 2
/
makefile
64 lines (40 loc) · 1.66 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
58
59
60
61
62
63
64
SHELL=/bin/bash
PYTHON_VENV = source .venv/bin/activate &&
install: .venv
data: scp scp_int goi
fresh: clean data
clean:
rm -Rf ./data/*
.venv:
python -m venv .venv
$(PYTHON_VENV) python -m pip install .
crawl: scp scp_int goi
scp: scp_crawl scp_postprocess
scp_crawl: data/scp_titles.json data/scp_hubs.json data/scp_items.json data/scp_tales.json data/goi.json
data/scp_titles.json: .venv
$(PYTHON_VENV) python -m scrapy crawl scp_titles -o data/scp_titles.json
data/scp_items.json: .venv
$(PYTHON_VENV) python -m scrapy crawl scp -o data/scp_items.json
data/scp_hubs.json: .venv
$(PYTHON_VENV) python -m scrapy crawl scp_hubs -o data/scp_hubs.json
data/scp_tales.json: .venv
$(PYTHON_VENV) python -m scrapy crawl scp_tales -o data/scp_tales.json
goi: data/goi.json
data/goi.json: .venv
$(PYTHON_VENV) python -m scrapy crawl goi -o data/goi.json
scp_postprocess: scp_crawl data/processed/goi data/processed/items data/processed/tales
data/processed/goi: .venv
$(PYTHON_VENV) python -m scp_crawler.postprocessing run-postproc-goi
data/processed/items: .venv
$(PYTHON_VENV) python -m scp_crawler.postprocessing run-postproc-items
data/processed/tales: .venv
$(PYTHON_VENV) python -m scp_crawler.postprocessing run-postproc-tales
scp_int: data/scp_int_titles.json data/scp_int_items.json data/scp_int_tales.json
data/scp_int_titles.json: .venv
$(PYTHON_VENV) python -m scrapy crawl scp_int_titles -o data/scp_int_titles.json
data/scp_int_items.json: .venv
$(PYTHON_VENV) python -m scrapy crawl scp_int -o data/scp_int_items.json
data/scp_int_tales.json: .venv
$(PYTHON_VENV) python -m scrapy crawl scp_int_tales -o data/scp_int_tales.json
clean_data:
rm -Rf data/*