]> wagner.pp.ru Git - fiction/jasmina.git/commitdiff
Добавлена обложка
authorVictor Wagner <vitus@wagner.pp.ru>
Mon, 28 Sep 2015 20:48:04 +0000 (23:48 +0300)
committerVictor Wagner <vitus@wagner.pp.ru>
Mon, 28 Sep 2015 20:48:04 +0000 (23:48 +0300)
Makefile
jasmina-title.jpg [new file with mode: 0644]

index dbd3980697f425681aa76fb04745cd834d496e1b..e9bfc4ba76ee3bee688771e4bcf71e1bbf6f177b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -11,24 +11,26 @@ all.mdwn: order.lst $(wildcard *.txt)
        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
diff --git a/jasmina-title.jpg b/jasmina-title.jpg
new file mode 100644 (file)
index 0000000..f2a03bb
Binary files /dev/null and b/jasmina-title.jpg differ