-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
44 lines (31 loc) · 1.07 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
IDS=$(shell cat *.csv | cut -d ',' -f 1 | grep '[0-9]')
PDFS=$(patsubst %, %.pdf, $(IDS))
TXTS=$(patsubst %, %.txt, $(IDS))
PII=$(shell find . -name *.csv)
all : $(PDFS) $(TXTS)
txts : $(TXTS)
ccpa-fax-complete.md : ccpa-fax.md
tail -n +7 $< | mo > $@
ccpa-fax.html : ccpa-fax-complete.md business-letter.css
pandoc --self-contained --metadata pagetitle='CCPA opt out FAX' -s --css=business-letter.css -o $@ $<
tmp/%.md : $(PII)
mkdir -p tmp oos
tools/extract-csv.py $(PII) | sh
oos/%.md : $(PII)
mkdir -p tmp oos
tools/extract-csv.py $(PII) | sh
%.html : tmp/%.md business-letter.css
pandoc --self-contained --metadata pagetitle='CCPA Authorized Agent written permission' -s --css=business-letter.css -o $@ $<
oos/%.html : oos/%.md business-letter.css
pandoc --self-contained --metadata pagetitle='CCPA Authorized Agent written permission' -s --css=business-letter.css -o $@ $<
%.txt: oos/%.html
lynx -nomargins -dump $< > $@
%.pdf : %.html
wkhtmltopdf $< $@
clean :
rm -f *.html
rm -f *.pdf
rm -f *.txt
rm -rf tmp oos
rm ccpa-fax-complete.md
.PHONY : clean all