* Removed local functions from the Makefile. It is not suitable for source distribution.

* Moved the working directory of the dist target to the _build directory.
* Added links to the EPUB in the document.
This commit is contained in:
依瑪貓 2017-11-21 21:52:33 +08:00
parent acab1f58da
commit a764fa25d5
3 changed files with 13 additions and 20 deletions

View File

@ -15,8 +15,6 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# My local extension
REMOTEHOST = uru
REMOTEDIR = /srv/www/limesurvey-learning
PROJNAME = learning-limesurvey
PROJVER = 2.0
@ -49,6 +47,7 @@ help:
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
@echo " dummy to check syntax errors of document sources"
@echo " dist to create a document source distribution"
.PHONY: clean
clean:
@ -233,17 +232,7 @@ dummy:
@echo "Build finished. Dummy builder generates no files."
dist:
rm -rf $(PROJNAME)-$(PROJVER) _build/$(PROJNAME)-$(PROJVER).zip
mkdir $(PROJNAME)-$(PROJVER) $(PROJNAME)-$(PROJVER)/_build
cp -fpR *.rst images Makefile make.bat conf.py $(PROJNAME).tex.patch participants-example.csv $(PROJNAME)-$(PROJVER)/
zip -r _build/$(PROJNAME)-$(PROJVER).zip $(PROJNAME)-$(PROJVER)
rm -rf $(PROJNAME)-$(PROJVER)
allsync: clean html latexpdf dist
utimedir . _build/html/_sources
utimedir images _build/html/_images
utimedir images _build/latex
ssh $(REMOTEHOST) "rm -rf /tmp/$(PROJNAME)"
scp -p -r _build/html $(REMOTEHOST):/tmp/$(PROJNAME)/
scp -p participants-example.csv _build/latex/$(PROJNAME).pdf _build/$(PROJNAME)-$(PROJVER).zip $(REMOTEHOST):/tmp/$(PROJNAME)/
ssh $(REMOTEHOST) "rm -rf $(REMOTEDIR)/* && mv /tmp/$(PROJNAME)/* $(REMOTEDIR) && rm -f /tmp/$(PROJNAME)/.buildinfo && rmdir /tmp/$(PROJNAME)"
rm -rf $(BUILDDIR)/dist
mkdir $(BUILDDIR)/dist $(BUILDDIR)/dist/$(PROJNAME)-$(PROJVER)
cp -fpR *.rst images Makefile make.bat conf.py $(PROJNAME).tex.patch participants-example.csv $(BUILDDIR)/dist/$(PROJNAME)-$(PROJVER)/
cd $(BUILDDIR)/dist && zip -r $(PROJNAME)-$(PROJVER).zip $(PROJNAME)-$(PROJVER) && cd ../..

View File

@ -354,6 +354,7 @@ epub_copyright = copyright
# The basename for the epub file. It defaults to the project name.
# epub_basename = project
epub_basename = 'learning-limesurvey'
# The HTML theme for the epub output. Since the default themes are not
# optimized for small screen space, using the same theme for HTML and epub

View File

@ -18,12 +18,15 @@
接跳到您有興趣的章節,不需要依序閱讀。
本學習手冊有
`線上版學習手冊 <http://limesurvey.iro.ntnu.edu.tw/learning/>`_ 及可下載雙面印刷的
`PDF版學習手冊 <http://limesurvey.iro.ntnu.edu.tw/learning/learning-limesurvey.pdf>`_
兩種版本,並有
`線上版學習手冊 <http://limesurvey.iro.ntnu.edu.tw/learning/>`_
,也提供雙面印刷的
`PDF版學習手冊 <http://limesurvey.iro.ntnu.edu.tw/learning/learning-limesurvey.pdf>`_
,及適合手機平板閱讀的
`EPUB學習手冊電子書 <http://limesurvey.iro.ntnu.edu.tw/learning/learning-limesurvey.epub>`_
可供下載,並有
`填答者名單CSV檔範例 <http://limesurvey.iro.ntnu.edu.tw/learning/participants-example.csv>`_
可下載參考,亦歡迎下載參閱
`學習手冊的reStructuredText原始檔 <http://limesurvey.iro.ntnu.edu.tw/learning/learning-limesurvey-2.0.zip>`_
`學習手冊的Sphinx/reStructuredText原始檔 <http://limesurvey.iro.ntnu.edu.tw/learning/learning-limesurvey-2.0.zip>`_
。台師大問卷調查平台上,有
`本學習手冊上的範例問卷 <http://limesurvey.iro.ntnu.edu.tw/index.php/161873>`_
,歡迎參閱。