SRC_URL=http://www.wagner.pp.ru/~vitus/fiction ID=90860948-65dc-11e5-bd77-bc5ff453db06 VERSION=0.$(shell date +%s) all: jasmina.html jasmina.epub jasmina.fb2.zip fb2: jasmina.fb2.zip pdf: jasmina.pdf all.mdwn: order.lst $(wildcard *.txt) for i in `cat order.lst`; do sed 's//*(Фрагмент недописан)*/' "$$i"; echo ""; done > $@ jasmina.html: all.mdwn pandoc -t html --toc -s all.mdwn -o jasmina.html jasmina.epub: all.mdwn jasmina-title.jpg pandoc -t epub -s all.mdwn -o jasmina.epub --epub-cover-image=jasmina-title.jpg jasmina.fb2.zip: jasmina.fb2 zip $@ $+ annotation.html: annotation.txt pandoc -o annotation.html annotation.txt jasmina.fb2: all.mdwn annotation.html jasmina-title.jpg Makefile pandoc -t fb2 -V language=ru all.mdwn -o jasmina.fb2 sed -i 's!.*!!' $@ sed -i 's!\(.*\)\(.*\)!\2\1!' $@ sed -i 's!!ru!' $@ sed -i 's!!!' $@ sed -i 's!!sf_history!' $@ sed -i "s!!`cat annotation.html|tr -d '\n'`!" $@ sed -i "s!!`date +%Y`!" $@ sed -i "s!!`date +%Y`!" $@ sed -i 's!!ВикторВагнер!' $@ sed -i 's!!${SRC_URL}${ID}${VERSION}!' $@ sed -i "s!!`base64 -w 0 jasmina-title.jpg`!" $@ jasmina.pdf: jasmina.tex all.tex cover3.png xelatex jasmina.tex xelatex jasmina.tex all.tex: all.mdwn pandoc -o all.tex all.mdwn sed -i -e 's! ---!~---!g' -e 's!\([а-я]\)-\([А-Яа-я]\)!\1"=\2!g' all.tex sed -i -e 's!\\section{!\\part{!' -e 's!\\subsection{!\\chapter{!' all.tex notes: all.mdwn # List all the footnotes grep '^\[\^' all.mdwn|sort -n -k 1.3