diff --git a/README.md b/README.md index dac0b81791e16e725c2b2215cb94d3c809cb0f3f..44153c54bd5ec634da501efa1455c5978429dee2 100644 --- a/README.md +++ b/README.md @@ -219,7 +219,7 @@ docker exec -it $(docker ps -qf "name=emg-pvs_renderer") mv Emergency.sqlite /ca python3 -m pip install sphinx recommonmark sphinx-autobuild ``` -## Generation +## Generate html and synchronize with client/html/user-guide ```bash make html @@ -227,10 +227,12 @@ make html # For watched html automatic building make html-watch -# For pdf output +# For pdf output and sync it to client/html/ make latexpdf # To shrink size of pdf gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -dPrinted=false -q -o View-Server_-_User-Guide_small.pdf View-Server_-_User-Guide.pdf +# make latexpdf and make html combined +make build ``` The documentation is generated in the respective *_build/html* directory. diff --git a/documentation/user-guide/Makefile b/documentation/user-guide/Makefile index 115276079038a54fd7b649c3dbf384333981ec59..e994f10c0d30135b07fa08066c43f7e4e454b949 100644 --- a/documentation/user-guide/Makefile +++ b/documentation/user-guide/Makefile @@ -8,6 +8,7 @@ SPHINXBUILD ?= sphinx-build SPHINXAUTOBUILD ?= sphinx-autobuild SOURCEDIR = . BUILDDIR = _build +USERGUIDE_VERSION = v1.1.0 # Put it first so that "make" without argument is like "make help". help: @@ -18,6 +19,28 @@ help: html-watch: @$(SPHINXAUTOBUILD) -i "$(BUILDDIR)/*" "$(SOURCEDIR)" "$(BUILDDIR)/html" $(SPHINXOPTS) $(O) +html: + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + rm -rf ../../client/html/user-guide/* + rsync -rpE _build/html/ ../../client/html/user-guide/ + +latexpdf: + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -dPrinted=false -q -o _build/latex/View-Server_-_User-Guide_small.pdf _build/latex/View-Server_-_User-Guide.pdf + rm -f ../../client/html/View-Server_-_User-Guide*pdf + rsync -rpE _build/latex/View-Server_-_User-Guide_small.pdf ../../client/html/View-Server_-_User-Guide_"$(USERGUIDE_VERSION)".pdf + +build: + # just do html and latexpdf combined + @$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + rm -rf ../../client/html/user-guide/* + rsync -rpE _build/html/ ../../client/html/user-guide/ + @$(SPHINXBUILD) -M latexpdf "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -dPrinted=false -q -o _build/latex/View-Server_-_User-Guide_small.pdf _build/latex/View-Server_-_User-Guide.pdf + rm -f ../../client/html/View-Server_-_User-Guide*pdf + rsync -rpE _build/latex/View-Server_-_User-Guide_small.pdf ../../client/html/View-Server_-_User-Guide_"$(USERGUIDE_VERSION)".pdf + + # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile