Files
cwsvJudo/infoZettelOrg/Makefile
2020-09-13 11:42:59 +02:00

78 lines
2.4 KiB
Makefile

infoZettel=$(patsubst %.md,%.pdf,$(wildcard *.md))
infoZettel-2x2=$(patsubst %.md,%-2x2.pdf,$(wildcard *.md))
kyuZettel=$(patsubst %.md,%.pdf,$(wildcard kyuZettel/*.md))
aushaenge=$(patsubst %.md,%.pdf,$(wildcard aushang/*.md))
infoZettelUploads=$(addprefix uploadTouch/, $(wildcard *.md)) $(addprefix uploadTouch/, $(wildcard *.pdf))
.PHONY: all
#all: infoZettel infoZettelUpload aushaenge
all: infoZettelUpload aushaenge
.PHONY: infoZettel
infoZettel: $(infoZettel)
.PHONY: infoZettel-2x2
infoZettel-2x2: infoZettel $(infoZettel-2x2)
.PHONY: kyuZettel
kyuZettel: $(kyuZettel)
.PHONY: aushaenge
aushaenge: $(aushaenge)
%.pdf: %.md
pandoc \
--template=pandocTemplate-cwsvJudoZettel.latex \
--variable documentclass=scrartcl \
--variable classoption="twoside=true" \
--variable classoption="DIV=28" \
--variable classoption="BCOR=0mm" \
--variable classoption="paper=A6" \
--variable classoption="fontsize=10pt" \
--variable classoption="parskip=never" \
--variable classoption="headsepline=true" \
--variable classoption="headheight=1cm" \
--variable classoption="footsepline=true" \
--variable classoption="footheight=1cm" \
--output=$@ \
$^
%-2x2.pdf: %.pdf
pdfnup --no-landscape --nup 2x2 --suffix '2x2' $^ '1,1,1,1,2,2,2,2' --outfile $@
aushang/%.pdf: aushang/%.md
pandoc \
--template=pandocTemplate-cwsvJudoAushang.latex \
--variable documentclass=scrartcl \
--variable classoption="twoside=true" \
--variable classoption="DIV=28" \
--variable classoption="BCOR=0mm" \
--variable classoption="paper=A4" \
--variable classoption="fontsize=16pt" \
--variable classoption="parskip=never" \
--variable classoption="headsepline=true" \
--variable classoption="headheight=1cm" \
--variable classoption="footsepline=true" \
--variable classoption="footheight=1cm" \
--output=$@ \
$^
.PHONY: infoZettelUpload
#infoZettelUpload: $(infoZettelUploads)
infoZettelUpload: infoZettel
curl -T "{$$(echo *.md | tr ' ' ',')}" ftp://cwsvjudo:***REMOVED***@cwsvjudo.bplaced.net/www/infoZettel/
uploadTouch/%.md: %.md
curl --verbose --upload-file $^ ftp://cwsvjudo:***REMOVED***@cwsvjudo.bplaced.net/www/infoZettel/$^
touch $@
uploadTouch/%.pdf: %.pdf
curl --verbose --upload-file $^ ftp://cwsvjudo:***REMOVED***@cwsvjudo.bplaced.net/www/temp/druck/$^
touch $@
.PHONY: echo
echo:
# @echo $(infoZettel)
# @echo $(infoZettelUploads)
@echo $(aushaenge)