From 0cbd63b34f84b227337b4f198d71f3026192aa46 Mon Sep 17 00:00:00 2001 From: Iliya Katueshenock Date: Fri, 1 Sep 2023 02:18:41 +0300 Subject: [PATCH 1/3] init --- make.bat | 110 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 77 insertions(+), 33 deletions(-) diff --git a/make.bat b/make.bat index 05f930ca5..d7c791708 100644 --- a/make.bat +++ b/make.bat @@ -1,18 +1,72 @@ @ECHO OFF -REM Command file for Sphinx documentation +if "%1" == "" ( + set LIVEHTML=1 +) +REM Persing of all the flags +:argv_loop +if NOT "%1" == "" ( + if "%1" == "help" ( + goto hepl + ) + + if "%1" == "sphinx" ( + set SPHINXBUILD=%2 + shift + ) else if "%1" == "lang" ( + set BF_LANG=%2 + shift + ) else if "%1" == "port" ( + set PORT=%2 + shift + ) else if "%1" == "livehtml" ( + set LIVEHTML=1 + ) else if "%1" == "-latexpdf" ( + set LATEXPDF=1 + ) else if "%1" == "check_syntax" ( + set CHECK_SINTAX=1 + ) else if "%1" == "checkout_locale" ( + set CHECKOUT_LOCALE=1 + ) else if "%1" == "update_po" ( + set UPDATE_PO=1 + ) else if "%1" == "report_po_progress" ( + set REPORT_PO_PROGRESS=1 + ) else if "%1" == "check_spelling" ( + set CHECK_SPELLING=1 + ) else if "%1" == "check_structure" ( + set CHECK_STRUCTURE=1 + ) else if "%1" == "update" ( + set UPDATE=1 + ) else ( + echo Command unknown: "%1"! + exit /b 1 + ) + + shift + goto argv_loop +) + +REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) +if "%BF_LANG%" == "" ( + set BF_LANG=en +) +if "%PORT%" == "" ( + set PORT=8000 +) + set SOURCEDIR=.\manual set BUILDDIR=build -if "%BF_LANG%" == "" set BF_LANG=en set SPHINXOPTS=-j auto -D language=%BF_LANG% REM Check if sphinx-build is available and fallback to Python version if any %SPHINXBUILD% 1>NUL 2>NUL -if errorlevel 9009 goto sphinx_python +if errorlevel 9009 ( + goto sphinx_python +) goto sphinx_ok :sphinx_python @@ -32,13 +86,7 @@ if errorlevel 9009 ( exit /b 1 ) -:sphinx_ok - -REM Default to livehtml -if "%1" == "" ( - goto livehtml -) - +:hepl if "%1" == "help" ( echo. echo Sphinx @@ -71,14 +119,17 @@ if "%1" == "help" ( goto EOF ) -if "%1" == "livehtml" ( - :livehtml - sphinx-autobuild --open-browser --delay 0 "%SOURCEDIR%" "%BUILDDIR%\html" %SPHINXOPTS% %O% - if errorlevel 1 exit /b 1 +:sphinx_ok + +if "%LIVEHTML%" == "1" ( + sphinx-autobuild --open-browser --delay 0 "%SOURCEDIR%" "%BUILDDIR%\html" %SPHINXOPTS% %O% --port %PORT% + if errorlevel 1 ( + exit /b 1 + ) goto EOF ) -if "%1" == "latexpdf" ( +if "%LATEXPDF%" == "1" ( %SPHINXBUILD% -b latex %SPHINXOPTS% %O% "%SOURCEDIR%" "%BUILDDIR%\latex" cd "%BUILDDIR%\latex" make all-pdf @@ -88,44 +139,37 @@ if "%1" == "latexpdf" ( goto EOF ) -if "%1" == "check_syntax" ( +if "%CHECK_SINTAX%" == "1" ( python tools_rst\rst_check_syntax.py --kbd --long - goto EOF ) -if "%1" == "checkout_locale" ( +if "%CHECKOUT_LOCALE%" == "1" ( python tools_make\checkout_locale.py - goto EOF ) -if "%1" == "update_po" ( +if "%UPDATE_PO%" == "1" ( python tools_maintenance\update_po.py - goto EOF ) -if "%1" == "report_po_progress" ( +if "%REPORT_PO_PROGRESS%" == "1" ( IF NOT EXIST %cd%\locale GOTO MISSING_LOCALE python tools_report\report_translation_progress.py locale\%2 --quiet - goto EOF - ) -if "%1" == "check_spelling" ( +if "%CHECK_SINTAX%" == "1" ( python tools_rst\rst_check_spelling.py - goto EOF ) -if "%1" == "check_structure" ( +if "%CHECK_SINTAX%" == "1" ( python tools_rst\rst_check_images.py - goto EOF +) -if "%1" == "update" ( +if "%UPDATE%" == "1" ( python tools_make\make_update.py - goto EOF - ) else ( - %SPHINXBUILD% -M %1 "%SOURCEDIR%" "%BUILDDIR%" %SPHINXOPTS% %O% - goto EOF + REM %SPHINXBUILD% -M %1 "%SOURCEDIR%" "%BUILDDIR%" %SPHINXOPTS% %O% + REM ??????????????????????????????????????????????????????????????? + REM goto EOF ) :MISSING_LOCALE -- 2.30.2 From 0be172545a0156c073282b13f0080c1a78308a19 Mon Sep 17 00:00:00 2001 From: Iliya Katueshenock Date: Fri, 1 Sep 2023 02:30:23 +0300 Subject: [PATCH 2/3] format --- make.bat | 86 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/make.bat b/make.bat index d7c791708..2386029be 100644 --- a/make.bat +++ b/make.bat @@ -1,50 +1,50 @@ @ECHO OFF if "%1" == "" ( - set LIVEHTML=1 + set LIVEHTML=1 ) REM Persing of all the flags :argv_loop if NOT "%1" == "" ( - if "%1" == "help" ( + if "%1" == "help" ( goto hepl ) - if "%1" == "sphinx" ( + if "%1" == "sphinx" ( set SPHINXBUILD=%2 - shift + shift ) else if "%1" == "lang" ( set BF_LANG=%2 - shift + shift ) else if "%1" == "port" ( set PORT=%2 - shift + shift ) else if "%1" == "livehtml" ( set LIVEHTML=1 ) else if "%1" == "-latexpdf" ( - set LATEXPDF=1 - ) else if "%1" == "check_syntax" ( - set CHECK_SINTAX=1 - ) else if "%1" == "checkout_locale" ( - set CHECKOUT_LOCALE=1 - ) else if "%1" == "update_po" ( - set UPDATE_PO=1 - ) else if "%1" == "report_po_progress" ( - set REPORT_PO_PROGRESS=1 - ) else if "%1" == "check_spelling" ( - set CHECK_SPELLING=1 - ) else if "%1" == "check_structure" ( - set CHECK_STRUCTURE=1 - ) else if "%1" == "update" ( - set UPDATE=1 - ) else ( - echo Command unknown: "%1"! - exit /b 1 - ) + set LATEXPDF=1 + ) else if "%1" == "check_syntax" ( + set CHECK_SINTAX=1 + ) else if "%1" == "checkout_locale" ( + set CHECKOUT_LOCALE=1 + ) else if "%1" == "update_po" ( + set UPDATE_PO=1 + ) else if "%1" == "report_po_progress" ( + set REPORT_PO_PROGRESS=1 + ) else if "%1" == "check_spelling" ( + set CHECK_SPELLING=1 + ) else if "%1" == "check_structure" ( + set CHECK_STRUCTURE=1 + ) else if "%1" == "update" ( + set UPDATE=1 + ) else ( + echo Command unknown: "%1"! + exit /b 1 + ) - shift - goto argv_loop + shift + goto argv_loop ) REM Command file for Sphinx documentation @@ -52,10 +52,10 @@ if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) if "%BF_LANG%" == "" ( - set BF_LANG=en + set BF_LANG=en ) if "%PORT%" == "" ( - set PORT=8000 + set PORT=8000 ) set SOURCEDIR=.\manual @@ -65,7 +65,7 @@ set SPHINXOPTS=-j auto -D language=%BF_LANG% REM Check if sphinx-build is available and fallback to Python version if any %SPHINXBUILD% 1>NUL 2>NUL if errorlevel 9009 ( - goto sphinx_python + goto sphinx_python ) goto sphinx_ok @@ -97,25 +97,25 @@ if "%1" == "help" ( echo ============== echo Convenience targets provided for building docs echo. - echo - livehtml [default] to auto build on file changes and host on localhost + echo - livehtml [default] to auto build on file changes and host on localhost echo. echo Translations echo ------------ echo. - echo - update_po to update PO message catalogs - echo - report_po_progress to check the progress/fuzzy strings [optionally specify locale] + echo - update_po to update PO message catalogs + echo - report_po_progress to check the progress/fuzzy strings [optionally specify locale] echo. echo Checking echo -------- echo. - echo - check_structure to check the structure of all .rst files - echo - check_syntax to check the syntax of all .rst files - echo - check_spelling to check spelling for text in RST files + echo - check_structure to check the structure of all .rst files + echo - check_syntax to check the syntax of all .rst files + echo - check_spelling to check spelling for text in RST files echo. echo Utilities echo --------- echo. - echo - update to update the repository to the most recent version. + echo - update to update the repository to the most recent version. goto EOF ) @@ -124,8 +124,8 @@ if "%1" == "help" ( if "%LIVEHTML%" == "1" ( sphinx-autobuild --open-browser --delay 0 "%SOURCEDIR%" "%BUILDDIR%\html" %SPHINXOPTS% %O% --port %PORT% if errorlevel 1 ( - exit /b 1 - ) + exit /b 1 + ) goto EOF ) @@ -135,7 +135,7 @@ if "%LATEXPDF%" == "1" ( make all-pdf cd %~dp0 echo To view, run: - echo start "%BUILDDIR%\html\blender_manual.pdf" + echo start "%BUILDDIR%\html\blender_manual.pdf" goto EOF ) @@ -168,7 +168,7 @@ if "%UPDATE%" == "1" ( python tools_make\make_update.py ) else ( REM %SPHINXBUILD% -M %1 "%SOURCEDIR%" "%BUILDDIR%" %SPHINXOPTS% %O% - REM ??????????????????????????????????????????????????????????????? + REM ??????????????????????????????????????????????????????????????? REM goto EOF ) @@ -177,8 +177,8 @@ echo. echo The locale directory is missing. echo. echo To correct this, checkout one or more translation repositories. -echo Details can be found at: -echo https://docs.blender.org/manual/en/latest/about/contribute/translations/contribute.html +echo Details can be found at: +echo https://docs.blender.org/manual/en/latest/about/contribute/translations/contribute.html rem Exit with errorlevel 1 exit /b 1 -- 2.30.2 From e1d3742e4d8586278b2e4badc8e4da9b22ef4560 Mon Sep 17 00:00:00 2001 From: Iliya Katueshenock Date: Fri, 1 Sep 2023 02:34:13 +0300 Subject: [PATCH 3/3] format --- make.bat | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/make.bat b/make.bat index 2386029be..446d16ceb 100644 --- a/make.bat +++ b/make.bat @@ -97,25 +97,25 @@ if "%1" == "help" ( echo ============== echo Convenience targets provided for building docs echo. - echo - livehtml [default] to auto build on file changes and host on localhost + echo - livehtml [default] to auto build on file changes and host on localhost echo. echo Translations echo ------------ echo. - echo - update_po to update PO message catalogs - echo - report_po_progress to check the progress/fuzzy strings [optionally specify locale] + echo - update_po to update PO message catalogs + echo - report_po_progress to check the progress/fuzzy strings [optionally specify locale] echo. echo Checking echo -------- echo. - echo - check_structure to check the structure of all .rst files - echo - check_syntax to check the syntax of all .rst files - echo - check_spelling to check spelling for text in RST files + echo - check_structure to check the structure of all .rst files + echo - check_syntax to check the syntax of all .rst files + echo - check_spelling to check spelling for text in RST files echo. echo Utilities echo --------- echo. - echo - update to update the repository to the most recent version. + echo - update to update the repository to the most recent version. goto EOF ) -- 2.30.2