-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (66 loc) · 2.35 KB
/
Makefile
File metadata and controls
76 lines (66 loc) · 2.35 KB
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
# Makefile
# Tiffany Timbers, Nov 2018
# This driver script completes the textual analysis of
# 3 novels and creates figures on the 10 most frequently
# occuring words from each of the 3 novels. This script
# takes no arguments.
# example usage:
# make all
.PHONY: all dats figs clean-dats clean-figs clean-all
# run entire analysis
all: report/count_report.html
# count words
dats: results/isles.dat \
results/abyss.dat \
results/last.dat \
results/sierra.dat
results/isles.dat : scripts/wordcount.py data/isles.txt
python scripts/wordcount.py \
--input_file=data/isles.txt \
--output_file=results/isles.dat
results/abyss.dat : scripts/wordcount.py data/abyss.txt
python scripts/wordcount.py \
--input_file=data/abyss.txt \
--output_file=results/abyss.dat
results/last.dat : scripts/wordcount.py data/last.txt
python scripts/wordcount.py \
--input_file=data/last.txt \
--output_file=results/last.dat
results/sierra.dat : scripts/wordcount.py data/sierra.txt
python scripts/wordcount.py \
--input_file=data/sierra.txt \
--output_file=results/sierra.dat
# plot
figs : results/figure/isles.png \
results/figure/abyss.png \
results/figure/last.png \
results/figure/sierra.png
results/figure/isles.png : scripts/plotcount.py results/isles.dat
python scripts/plotcount.py \
--input_file=results/isles.dat \
--output_file=results/figure/isles.png
results/figure/abyss.png : scripts/plotcount.py results/abyss.dat
python scripts/plotcount.py \
--input_file=results/abyss.dat \
--output_file=results/figure/abyss.png
results/figure/last.png : scripts/plotcount.py results/last.dat
python scripts/plotcount.py \
--input_file=results/last.dat \
--output_file=results/figure/last.png
results/figure/sierra.png : scripts/plotcount.py results/sierra.dat
python scripts/plotcount.py \
--input_file=results/sierra.dat \
--output_file=results/figure/sierra.png
# write the report
report/count_report.html : report/count_report.qmd figs
quarto render report/count_report.qmd
clean :
rm -f results/isles.dat \
results/abyss.dat \
results/last.dat \
results/sierra.dat
rm -f results/figure/isles.png \
results/figure/abyss.png \
results/figure/last.png \
results/figure/sierra.png
rm -rf report/count_report.html