Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Automate .mobi generation of docs, #388.

  • Loading branch information...
commit 36f3184396f72b106911f497ce43c3415cb4f551 1 parent 92dbe31
@rduplain rduplain authored
Showing with 7 additions and 0 deletions.
  1. +6 −0 Makefile
  2. +1 −0  docs/_templates/sidebarintro.html
View
6 Makefile
@@ -22,6 +22,7 @@ clean-pyc:
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
+# ebook-convert docs: http://manual.calibre-ebook.com/cli/ebook-convert.html
upload-docs:
$(MAKE) -C docs html dirhtml latex epub
$(MAKE) -C docs/_build/latex all-pdf
@@ -30,6 +31,11 @@ upload-docs:
rsync -a docs/_build/latex/Flask.pdf pocoo.org:/var/www/flask.pocoo.org/docs/flask-docs.pdf
rsync -a docs/_build/flask-docs.zip pocoo.org:/var/www/flask.pocoo.org/docs/flask-docs.zip
rsync -a docs/_build/epub/Flask.epub pocoo.org:/var/www/flask.pocoo.org/docs/flask-docs.epub
+ @echo 'Building .mobi from .epub...'
+ @echo 'Command `ebook-covert` is provided by calibre package.'
+ @echo 'Requires X-forwarding for Qt features used in conversion (ssh -X).'
+ @echo 'Do not mind "Invalid value for ..." CSS errors if .mobi renders.'
+ ssh -X pocoo.org ebook-convert /var/www/flask.pocoo.org/docs/flask-docs.epub /var/www/flask.pocoo.org/docs/flask-docs.mobi --cover http://flask.pocoo.org/docs/_images/logo-full.png --authors 'Armin Ronacher'
docs:
$(MAKE) -C docs html
View
1  docs/_templates/sidebarintro.html
@@ -10,6 +10,7 @@
<ul>
<li><a href="http://flask.pocoo.org/docs/flask-docs.pdf">as PDF</a>
<li><a href="http://flask.pocoo.org/docs/flask-docs.epub">as ePub</a>
+ <li><a href="http://flask.pocoo.org/docs/flask-docs.mobi">as .mobi</a>
<li><a href="http://flask.pocoo.org/docs/flask-docs.zip">as zipped HTML</a>
</ul>
<h3>Useful Links</h3>
Please sign in to comment.
Something went wrong with that request. Please try again.