-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
Makefile
104 lines (84 loc) · 3.16 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
97
98
99
100
101
102
103
#
# 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 clean-csrankings
PYTHON = python3 # 3.7
PYPY = python3 # pypy
all: generated-author-info.csv csrankings.js csrankings.min.js csrankings.csv # fix-affiliations home-pages scholar-links
$(MAKE) clean-csrankings
clean:
rm $(TARGETS)
csrankings.js: csrankings.ts continents.ts
@echo "Rebuilding JavaScript code."
tsc --project tsconfig.json
csrankings.min.js: csrankings.js csrankings.ts
google-closure-compiler --js csrankings.js > csrankings.min.js
update-dblp:
$(MAKE) download-dblp
$(MAKE) shrink-dblp
$(PYTHON) util/generate-aliases.py > dblp-aliases.csv
@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
curl -o dblp-original.xml.gz https://dblp.org/xml/dblp.xml.gz
shrink-dblp:
@echo "Shrinking the DBLP file."
gunzip -dc dblp-original.xml.gz > dblp.xml
basex -c filter.xq > dblp2.xml
gzip dblp2.xml
mv dblp2.xml.gz dblp.xml.gz
faculty-affiliations.csv homepages.csv scholar.csv csrankings.csv: csrankings-*.csv
@echo "Splitting main datafile."
@$(PYTHON) util/split-csv.py
@echo "Done."
clean-csrankings:
@echo "Cleaning."
@$(PYTHON) util/clean-csrankings.py
@$(PYTHON) util/sort-csv-files.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 dblp-aliases.csv
@echo "Rebuilding the publication database (generated-author-info.csv)."
@$(PYPY) util/split-csv.py
@$(PYPY) util/regenerate_data.py
@echo "Done."
# @$(MAKE) clean-csrankings
# @$(PYPY) util/split-csrankings.py
# @$(MAKE) clean-csrankings
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