One Level Up
Top Level
genmobi.sh - ktap
- name=`pwd|perl -e '$d=<>;$d=~s{.*/}{}g;$d=~s/2$//g;print $d'`
- src2html='src2html.pl -l -x -c -n'
- echo "Generating HTMLs for $name..."
- $src2html -t 4 --exclude='*/.*' --exclude='.*' ./ $name
- echo "Generating .pdf file for $name..."
- rm -rf *.pdf
- ebook-convert html_out/index.html $name.pdf \
- --override-profile-size \
- --paper-size a4 \
- --pdf-default-font-size 12 \
- --pdf-mono-font-size 12 \
- --margin-left 10 --margin-right 10 \
- --margin-top 10 --margin-bottom 10 \
- --page-breaks-before='/'
- echo "Generating .epub file for $name..."
- rm -rf *.epub
- ebook-convert html_out/index.html $name.epub \
- --no-default-epub-cover \
- --publisher agentzh \
- --output-profile ipad3 \
- --title $name \
- --language en --authors 'Jovi Zhangwei'
- echo "Generating .mobi file for $name..."
- rm -rf *.mobi
- ebook-convert html_out/index.html $name.mobi \
- --output-profile kindle_dx --no-inline-toc \
- --publisher agentzh \
- --title $name \
- --language en --authors 'Jovi Zhangwei'
One Level Up
Top Level