X-Git-Url: http://www.wagner.pp.ru/gitweb/?p=fiction%2FKate-the-Empress.git;a=blobdiff_plain;f=Makefile;h=093ca3c3889174f9127e959b769ad9af9200e225;hp=72b28023fc5dfc097ee206bd197c726e6b04e3b9;hb=HEAD;hpb=f33ec9d1fd6fb24d4d2e0e27fd17d8ed89825ef1 diff --git a/Makefile b/Makefile index 72b2802..2b482bc 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,36 @@ -all: Kate-the-Empress.pdf Kate-the-Empress.html +SRC_URL=http://www.wagner.pp.ru/~vitus/fiction +UPLOAD_URL=https://www.wagner.pp.ru/dav/vitus/fiction +all: Kate-the-Empress.pdf Kate-the-Empress.html Kate-the-Empress.epub Kate-the-Empress.fb2.zip + +publish: Kate-the-Empress.pdf Kate-the-Empress.html Kate-the-Empress.epub Kate-the-Empress.fb2.zip + for i in $^; do curl -n -T $$i $(UPLOAD_URL)/$$i || exit 1;done + Kate-the-Empress.pdf: $(wildcard *.tex) + pdflatex book + pdflatex book pdflatex book mv book.pdf Kate-the-Empress.pdf -Kate-the-Empress.html: $(wildcard *.tex) - cp book.tex Kate-the-Empress.tex - latex2html -no_navigation -split=0 -no_subdir -prefix=Kate-the-Empress Kate-the-Empress.tex - rm Kate-the-Empress.tex +Kate-the-Empress.html: onefile.tex + pandoc -t html --toc --standalone -o $@ $+ + +Kate-the-Empress.epub: onefile.tex epub-metadata.xml + cat epub-metadata.xml > metadata-tmp.xml + echo "`date +%Y-%m-%d`">> metadata-tmp.xml + pandoc -t epub --epub-metadata=metadata-tmp.xml --standalone -o $@ $+ + +Kate-the-Empress.fb2.zip: Kate-the-Empress.fb2 + zip Kate-the-Empress.fb2.zip Kate-the-Empress.fb2 + +Kate-the-Empress.fb2: onefile.tex Tex2fb2 fb2meta.xml + ./Tex2fb2 fb2meta.xml onefile.tex >Kate-the-Empress.fb2 + +fb2lint: Kate-the-Empress.fb2 $(wildcard *.xsd) + xmllint --schema FictionBook2.1.xsd Kate-the-Empress.fb2 >/dev/null 2>$@ + +onefile.tex: joinfiles.awk $(wildcard *.tex) + awk -f joinfiles.awk book.tex |sed -e 's!<>!»!g' > $@ + +clean: + rm -f onefile.tex book.log book.aux book.out book.toc Kate-the-Empress.fb2 fb2lint