Files
cwsvJudo/infoZettelOrg/Makefile
2023-12-23 14:32:48 +01:00

92 lines
2.8 KiB
Makefile

include Makefile.private
infoZettel=$(patsubst %.md,%.pdf,$(wildcard *.md))
infoZettel-2x2=$(patsubst %.md,%-2x2.pdf,$(wildcard *.md))
infoZettel-booklet=$(patsubst %.md,%-booklet.pdf,$(wildcard *.md))
wkZettel=$(patsubst %.md,%.pdf,$(wildcard wkZettel/*.md))
wkZettel-2x2=$(patsubst %.md,%-2x2.pdf,$(wildcard wkZettel/*.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: wkZettel
wkZettel: $(wkZettel)
.PHONY: wkZettel-2x2
wkZettel-2x2: wkZettel $(wkZettel-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=A5" \
--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
pdfjam --no-landscape --nup 2x1 --suffix '2x2' $^ '2,3,1,4,2,2,2,2' --outfile $@
%-booklet.pdf: %.pdf
pdfjam --landscape --nup 2x1 --suffix 'booklet' $^ '2,3,1,4' --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://$(uploadUser):$(uploadPassword)@cwsvjudo.bplaced.net/www/infoZettel/
uploadTouch/%.md: %.md
curl --verbose --upload-file $^ ftp://$(uploadUser):$(uploadPassword)@cwsvjudo.bplaced.net/www/infoZettel/$^
touch $@
uploadTouch/%.pdf: %.pdf
curl --verbose --upload-file $^ ftp://$(uploadUser):$(uploadPassword)@cwsvjudo.bplaced.net/www/temp/druck/$^
touch $@
.PHONY: echo
echo:
# @echo $(infoZettel)
# @echo $(infoZettelUploads)
@echo $(aushaenge)