forked from emeryberger/CSrankings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
97 lines (77 loc) · 2.81 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#
# CSrankings
# http://csrankings.org
# Copyright (C) 2017-2020 by Emery Berger <http://emeryberger.org>
# See COPYING for license information.
#
TARGETS = csrankings.js csrankings.min.js generated-author-info.csv
.PHONY: home-pages scholar-links fix-affiliations update-dblp clean-dblp download-dblp shrink-dblp
PYTHON = python3 # 2.7
PYPY = python3 # pypy
all: generated-author-info.csv csrankings.js csrankings.min.js # fix-affiliations home-pages scholar-links
clean:
rm $(TARGETS)
csrankings.js: csrankings.ts
@echo "Rebuilding JavaScript code."
tsc --project tsconfig.json
csrankings.min.js: csrankings.js
closure-compiler --js csrankings.js > csrankings.min.js
update-dblp:
$(MAKE) download-dblp
$(MAKE) clean-dblp
@echo "Done."
clean-dblp:
@echo "Fixing character encodings."
sh ./util/fix-dblp.sh
mv dblp-fixed.xml dblp.xml
$(MAKE) shrink-dblp
download-dblp:
@echo "Downloading from DBLP."
rm -f dblp.xml.gz
wget http://dblp.org/xml/dblp.xml.gz
shrink-dblp:
@echo "Shrinking the DBLP file."
basex -c filter.xq > dblp2.xml
gzip dblp2.xml
mv dblp.xml.gz dblp-original.xml.gz
mv dblp2.xml.gz dblp.xml.gz
faculty-affiliations.csv homepages.csv scholar.csv: csrankings.csv
@echo "Splitting main datafile (csrankings.csv)."
@$(PYTHON) util/split-csv.py
@echo "Done."
clean-csrankings:
@echo "Cleaning."
@$(PYTHON) util/clean-csrankings.py
@echo "Done."
home-pages: faculty-affiliations.csv homepages.csv
@echo "Rebuilding home pages (homepages.csv)."
@$(PYTHON) util/make-web-pages.py
@echo "Cleaning home pages."
@$(PYTHON) util/clean-web-pages.py
@mv homepages-sorted.csv homepages.csv
@echo "Done."
scholar-links: faculty-affiliations.csv homepages.csv
@echo "Rebuilding Google Scholar links (scholar.csv)."
@$(PYTHON) util/make-scholar-links.py
@echo "Cleaning Scholar links."
@$(PYTHON) util/clean-scholar-links.py
@echo "Done."
fix-affiliations: faculty-affiliations.csv
@echo "Updating affiliations."
@$(PYTHON) util/fix-affiliations.py | sort -k2 -t"," | uniq > /tmp/f1.csv
@echo "name,affiliation" | cat - /tmp/f1.csv > /tmp/f2.csv
@rm /tmp/f1.csv
@mv /tmp/f2.csv faculty-affiliations.csv
faculty-coauthors.csv: dblp.xml.gz util/generate-faculty-coauthors.py util/csrankings.py
@echo "Rebuilding the co-author database (faculty-coauthors.csv)."
$(PYTHON) util/generate-faculty-coauthors.py
@echo "Done."
generated-author-info.csv: faculty-affiliations.csv dblp.xml.gz util/regenerate_data.py util/csrankings.py
@echo "Rebuilding the publication database (generated-author-info.csv)."
@$(PYPY) util/regenerate_data.py
@echo "Done."
collab-graph: generated-author-info.csv faculty-coauthors.csv
@echo "Generating the list of all publications (all-author-info.csv)."
$(PYTHON) util/generate-all-pubs.py
@echo "Building collaboration graph data."
$(PYTHON) util/make-collaboration-graph.py