1@ECHO OFF 2 3REM Command file for Sphinx documentation 4 5set SPHINXBUILD=sphinx-build 6set BUILDDIR=build 7set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . 8if NOT "%PAPER%" == "" ( 9 set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% 10) 11 12if "%1" == "" goto help 13 14if "%1" == "help" ( 15 :help 16 echo.Please use `make ^<target^>` where ^<target^> is one of 17 echo. html to make standalone HTML files 18 echo. pdf to make PDF document 19 echo. dirhtml to make HTML files named index.html in directories 20 echo. pickle to make pickle files 21 echo. json to make JSON files 22 echo. htmlhelp to make HTML files and a HTML help project 23 echo. qthelp to make HTML files and a qthelp project 24 echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter 25 echo. changes to make an overview over all changed/added/deprecated items 26 echo. linkcheck to check all external links for integrity 27 echo. doctest to run all doctests embedded in the documentation if enabled 28 goto end 29) 30 31if "%1" == "clean" ( 32 for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i 33 del /q /s %BUILDDIR%\* 34 goto end 35) 36 37if "%1" == "html" ( 38 %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html 39 echo. 40 echo.Build finished. The HTML pages are in %BUILDDIR%/html. 41 goto end 42) 43 44if "%1" == "dirhtml" ( 45 %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml 46 echo. 47 echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. 48 goto end 49) 50 51if "%1" == "pickle" ( 52 %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle 53 echo. 54 echo.Build finished; now you can process the pickle files. 55 goto end 56) 57 58if "%1" == "json" ( 59 %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json 60 echo. 61 echo.Build finished; now you can process the JSON files. 62 goto end 63) 64 65if "%1" == "htmlhelp" ( 66 %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp 67 echo. 68 echo.Build finished; now you can run HTML Help Workshop with the ^ 69.hhp project file in %BUILDDIR%/htmlhelp. 70 goto end 71) 72 73if "%1" == "qthelp" ( 74 %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp 75 echo. 76 echo.Build finished; now you can run "qcollectiongenerator" with the ^ 77.qhcp project file in %BUILDDIR%/qthelp, like this: 78 echo.^> qcollectiongenerator %BUILDDIR%\qthelp\django-guardian.qhcp 79 echo.To view the help file: 80 echo.^> assistant -collectionFile %BUILDDIR%\qthelp\django-guardian.ghc 81 goto end 82) 83 84if "%1" == "latex" ( 85 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 86 echo. 87 echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. 88 goto end 89) 90 91if "%1" == "changes" ( 92 %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes 93 echo. 94 echo.The overview file is in %BUILDDIR%/changes. 95 goto end 96) 97 98if "%1" == "linkcheck" ( 99 %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck 100 echo. 101 echo.Link check complete; look for any errors in the above output ^ 102or in %BUILDDIR%/linkcheck/output.txt. 103 goto end 104) 105 106if "%1" == "doctest" ( 107 %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest 108 echo. 109 echo.Testing of doctests in the sources finished, look at the ^ 110results in %BUILDDIR%/doctest/output.txt. 111 goto end 112) 113 114if "%1" == "pdf" ( 115 %SPHINXBUILD% -b pdf %ALLSPHINXOPTS% %BUILDDIR%/pdf 116 echo. 117 echo.Build finished. The PDF files are in %BUILDDIR%/pdf. 118 goto end 119) 120 121:end 122