for i in `cat order.lst`; do sed 's/<TBD>/*(Фрагмент недописан)*/' "$$i"; echo ""; done > $@
jasmina.html: all.mdwn
pandoc -t html --toc -s all.mdwn -o jasmina.html
-jasmina.epub: all.mdwn
- pandoc -t epub -s all.mdwn -o jasmina.epub
+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 Makefile
+jasmina.fb2: all.mdwn annotation.html jasmina-title.jpg Makefile
pandoc -t fb2 -V language=ru all.mdwn -o jasmina.fb2
sed -i 's!<annotation>.*</annotation>!!' $@
sed -i 's!\(<book-title>.*</book-title>\)\(<author>.*</author>\)!\2\1!' $@
sed -i 's!</title-info>!<lang>ru</lang></title-info>!' $@
+ sed -i 's!</lang>!</lang><coverpage><image l:href="#cover" /></coverpage>!' $@
sed -i 's!<title-info>!<title-info><genre>sf_history</genre>!' $@
sed -i "s!</book-title>!</book-title><annotation>`cat annotation.html|tr -d '\n'`</annotation>!" $@
sed -i "s!</annotation>!</annotation><date value='`date "+%Y-%m-%d"`'>`date +%Y`</date>!" $@
sed -i "s!</program-used>!</program-used><date value='`date "+%Y-%m-%d"`'>`date +%Y`</date>!" $@
sed -i 's!<document-info>!<document-info><author><first-name>Виктор</first-name><last-name>Вагнер</last-name></author>!' $@
sed -i 's!</document-info>!<src-url>${SRC_URL}</src-url><id>${ID}</id><version>${VERSION}</version></document-info>!' $@
+ sed -i "s!</FictionBook>!<binary id='cover' content-type='image/jpeg'>`base64 -w 0 jasmina-title.jpg`</binary></FictionBook>!" $@
jasmina.pdf: preamble.tex all.tex
pdflatex preamble.tex
pdflatex preamble.tex