-
Notifications
You must be signed in to change notification settings - Fork 3
/
make.bat
165 lines (144 loc) · 5.52 KB
/
make.bat
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
@ECHO OFF
pushd %~dp0
SET BUILDDIR=_build
if "%1" == "all" goto all
if "%1" == "pymapdl_cheat_sheet" goto pymapdl_cheat_sheet
if "%1" == "pyfluent_cheat_sheet" goto pyfluent_cheat_sheet
if "%1" == "pyaedt_API_cheat_sheet" goto pyaedt_API_cheat_sheet
if "%1" == "pyedb_API_cheat_sheet" goto pyedb_API_cheat_sheet
if "%1" == "pyprimemesh_cheat_sheet" goto pyedb_API_cheat_sheet
if "%1" == "pydpf-core_cheat_sheet" goto pydpf-core_cheat_sheet
if "%1" == "pymechanical_cheat_sheet" goto pymechanical_cheat_sheet
if "%1" == "pydynamicreporting_cheat_sheet" goto pydynamicreporting_cheat_sheet
if "%1" == "pyensight_cheat_sheet" goto pyensight_cheat_sheet
if "%1" == "pydpf-post_cheat_sheet" goto pydpf-post_cheat_sheet
if "%1" == "pymotorcad_cheat_sheet" goto pymotorcad_cheat_sheet
if "%1" == "clean" goto clean
if "%1" == "help" goto help
if "%1" == "" goto help
:pymapdl_cheat_sheet
pdflatex -output-directory=%BUILDDIR% cheat_sheets/mapdl_cheat_sheet/pymapdl_cheat_sheet.tex --interaction=nonstopmode
if NOT EXIST %BUILDDIR%/pymapdl_cheat_sheet.pdf (
Echo "no pdf generated!"
exit /b 1)
Echo "pdf generated!"
goto end
:pyfluent_cheat_sheet
set SCRIPT_PATH=cheat_sheets/pyfluent_cheat_sheet/pyfluent_script.py
CALL :run_script
pdflatex -output-directory=%BUILDDIR% cheat_sheets/pyfluent_cheat_sheet/pyfluent_cheat_sheet.tex --interaction=nonstopmode
if NOT EXIST %BUILDDIR%/pyfluent_cheat_sheet.pdf (
Echo "no pdf generated!"
exit /b 1)
Echo "pdf generated!"
goto end
:pyaedt_API_cheat_sheet
pdflatex -output-directory=%BUILDDIR% cheat_sheets/aedt_cheat_sheet/pyaedt_API_cheat_sheet.tex --interaction=nonstopmode
if NOT EXIST %BUILDDIR%/pyaedt_API_cheat_sheet.pdf (
Echo "no pdf generated!"
exit /b 1)
Echo "pdf generated!"
goto end
:pyedb_API_cheat_sheet
pdflatex -output-directory=%BUILDDIR% cheat_sheets/aedt_cheat_sheet/pyedb_API_cheat_sheet.tex --interaction=nonstopmode
if NOT EXIST %BUILDDIR%/pyedb_API_cheat_sheet.pdf (
Echo "no pdf generated!"
exit /b 1)
Echo "pdf generated!"
goto end
:pyprimemesh_cheat_sheet
pdflatex -output-directory=%BUILDDIR% cheat_sheets/pyprimemesh_cheat_sheet/pyprimemesh_cheat_sheet.tex --interaction=nonstopmode
if NOT EXIST %BUILDDIR%/pyprimemesh_cheat_sheet.pdf (
Echo "no pdf generated!"
exit /b 1)
Echo "pdf generated!"
goto end
:pydpf-core_cheat_sheet
pdflatex -output-directory=%BUILDDIR% cheat_sheets/pydpf-core_cheat_sheet/pydpf-core_cheat_sheet.tex --interaction=nonstopmode
if NOT EXIST %BUILDDIR%/pydpf-core_cheat_sheet.pdf (
Echo "no pdf generated!"
exit /b 1)
Echo "pdf generated!"
goto end
:pydynamicreporting_cheat_sheet
pdflatex -output-directory=%BUILDDIR% cheat_sheets/pydynamicreporting_cheat_sheet/pydynamicreporting_cheat_sheet.tex --interaction=nonstopmode
if NOT EXIST %BUILDDIR%/pydynamicreporting_cheat_sheet.pdf (
Echo "no pdf generated!"
exit /b 1)
Echo "pdf generated!"
goto end
:pyensight_cheat_sheet
set SCRIPT_PATH=cheat_sheets/pyensight_cheat_sheet/pyensight_script.py
CALL :run_script
pdflatex -output-directory=%BUILDDIR% cheat_sheets/pyensight_cheat_sheet/pyensight_cheat_sheet.tex --interaction=nonstopmode
if NOT EXIST %BUILDDIR%/pyensight_cheat_sheet.pdf (
Echo "no pdf generated!"
exit /b 1)
Echo "pdf generated!"
goto end
:pymechanical_cheat_sheet
set SCRIPT_PATH=cheat_sheets/pymechanical_cheat_sheet/pymechanical_script.py
CALL :run_script
pdflatex -output-directory=%BUILDDIR% cheat_sheets/pymechanical_cheat_sheet/pymechanical_cheat_sheet.tex --interaction=nonstopmode
if NOT EXIST %BUILDDIR%/pymechanical_cheat_sheet.pdf (
Echo "no pdf generated!"
exit /b 1)
Echo "pdf generated!"
goto end
:pydpf-post_cheat_sheet
set SCRIPT_PATH=cheat_sheets/pydpf-post_cheat_sheet/pydpf-post_script.py
CALL :run_script
pdflatex -output-directory=%BUILDDIR% cheat_sheets/pydpf-post_cheat_sheet/pydpf-post_cheat_sheet.tex --interaction=nonstopmode
if NOT EXIST %BUILDDIR%/pydpf-post_cheat_sheet.pdf (
Echo "no pdf generated!"
exit /b 1)
Echo "pdf generated!"
goto end
:pymotorcad_cheat_sheet
set SCRIPT_PATH=cheat_sheets/pymotorcad_cheat_sheet/pymotorcad_script.py
CALL :run_script
pdflatex -output-directory=%BUILDDIR% cheat_sheets/pymotorcad_cheat_sheet/pymotorcad_cheat_sheet.tex --interaction=nonstopmode
if NOT EXIST %BUILDDIR%/pymotorcad_cheat_sheet.pdf(
Echo "no pdf generated!"
exit /b 1)
Echo "pdf generated!"
goto end
:all
CALL :pymapdl_cheat_sheet
CALL :pyaedt_API_cheat_sheet
CALL :pyedb_API_cheat_sheet
CALL :pyprimemesh_cheat_sheet
CALL :pydpf-core_cheat_sheet
CALL :pyfluent_cheat_sheet
CALL :pymechanical_cheat_sheet
CALL :pydynamicreporting_cheat_sheet
CALL :pyensight_cheat_sheet
CALL :pydpf-post_cheat_sheet
CALL :pymotorcad_cheat_sheet
goto end
:run_script
python scripts\generate_code_snippet.py %SCRIPT_PATH%
goto end
:clean
rmdir /S /Q %BUILDDIR%
goto end
:help
@echo off
REM Display the help message
echo Available targets:
echo all: Build all cheatsheets
echo clean: Remove the build directory and temporary files
echo help: Show this help message
echo.
echo Individual cheatsheet Targets:
echo pymapdl_cheat_sheet: Build the pymapdl cheatsheet
echo pyfluent_cheat_sheet: Build the pyfluent cheatsheet
echo pyaedt_API_cheat_sheet: Build the pyaedt API cheatsheet
echo pyedb_API_cheat_sheet: Build the pyedb API cheatsheet
echo pyprimemesh_cheat_sheet: Build the pyprimemesh cheatsheet
echo pymechanical_cheat_sheet: Build the pymechanical cheatsheet
echo pydynamicreporting_cheat_sheet: Build the pydynamicreporting cheatsheet
echo pyensight_cheat_sheet: Build the pydynamicreporting cheatsheet
echo pymotorcad_cheat_sheat: Build the pymotorcad cheatsheet
:end
popd