make_doc.bat
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@echo off
echo This batch must be launched with PowerShell in administrator mode.
call :ResolvePath path_guitastro %cd%\..
echo Guitastro in the directory %path_guitastro%
rem Search where is Anaconda
set path_anacondas=c:\Users\%USERNAME%\Anaconda3 C:\ProgramData\Anaconda3
for %%p in (%path_anacondas%) do (
rem echo %%p
if exist %%p (
rem file exists
set path_anaconda=%%p
)
)
echo Anaconda found in the directory %path_anaconda%
rem pyreverse
set pyreverse=%path_anaconda%\Scripts\pyreverse
echo ===== Analyze source code with %pyreverse%
echo cd %path_guitastro%\src
cd %path_guitastro%\src
echo %pyreverse% -p guitastro -o png guitastro
%pyreverse% -p guitastro -o png guitastro
echo move classes_guitastro.png %path_guitastro%\docs\source\doc_images\generated
move classes_guitastro.png %path_guitastro%\docs\source\doc_images\generated
echo move packages_guitastro.png %path_guitastro%\docs\source\doc_images\generated
move packages_guitastro.png %path_guitastro%\docs\source\doc_images\generated
rem sphinx
echo Compile doc with sphinx
set sphinx=%path_anaconda%\Scripts\sphinx-build.exe
echo ===== Compile doc with %sphinx%
echo cd %path_guitastro%\docs
cd %path_guitastro%\docs
echo %sphinx% -b html .\source .\build\html
%sphinx% -b html .\source .\build\html
%sphinx% -b pdf .\source .\build\pdf
exit /b
rem === Functions ===
rem Resolve path to absolute.
rem Param 1: Name of output variable.
rem Param 2: Path to resolve.
rem Return: Resolved absolute path.
:ResolvePath
set %1=%~dpfn2
exit /b