Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MASTERARBEIT😆😜
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lukas Tietze
MASTERARBEIT😆😜
Commits
284d8cdd
Commit
284d8cdd
authored
Jul 14, 2020
by
Lukas Tietze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build-Skripte
parent
0d8b9aae
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
95 additions
and
67 deletions
+95
-67
.gitignore
.gitignore
+1
-0
doc/common/build.py
doc/common/build.py
+4
-67
doc/common/commonFunctions.py
doc/common/commonFunctions.py
+65
-0
doc/common/spell-check.py
doc/common/spell-check.py
+25
-0
No files found.
.gitignore
View file @
284d8cdd
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
!.vscode/tasks.json
!.vscode/tasks.json
bin/
bin/
obj/
obj/
__pycache__
*.vcxproj.user
*.vcxproj.user
*.spv
*.spv
...
...
doc/common/build.py
View file @
284d8cdd
import
commonFunctions
import
os
import
os
import
sys
import
sys
import
shutil
import
shutil
from
shutil
import
get_terminal_size
ColorBlack
=
"
\u001b
[30m"
ColorRed
=
"
\u001b
[31m"
ColorGreen
=
"
\u001b
[32m"
ColorYellow
=
"
\u001b
[33m"
ColorBlue
=
"
\u001b
[34m"
ColorMagenta
=
"
\u001b
[35m"
ColorCyan
=
"
\u001b
[36m"
ColorWhite
=
"
\u001b
[37m"
ColorReset
=
"
\u001b
[0m"
def
printInfo
(
message
):
print
(
ColorBlue
,
message
,
ColorReset
)
pass
def
printWarning
(
message
):
print
(
ColorYellow
,
message
,
ColorReset
)
pass
def
printError
(
message
):
print
(
ColorRed
,
message
,
ColorReset
)
pass
def
printStatus
(
message
):
print
(
ColorCyan
,
message
,
ColorReset
)
pass
def
printSuccess
(
message
):
print
(
ColorGreen
,
message
,
ColorReset
)
pass
def
beginPart
(
name
):
w
=
int
(
get_terminal_size
([
50
,
1
]).
columns
*
0.75
)
namePadding
=
int
((
w
-
len
(
name
))
/
2
)
printInfo
(
"-"
*
w
)
printInfo
((
" "
*
namePadding
)
+
name
+
(
" "
*
namePadding
))
printInfo
(
"-"
*
w
)
pass
def
command
(
cmd
)
->
int
:
printStatus
(
cmd
)
res
=
os
.
system
(
cmd
)
str
=
f"Done, action result:
{
res
}
"
if
(
res
==
0
):
printSuccess
(
str
)
else
:
printWarning
(
str
)
return
res
pass
argc
=
len
(
sys
.
argv
)
argc
=
len
(
sys
.
argv
)
...
@@ -91,18 +30,16 @@ if good == 0:
...
@@ -91,18 +30,16 @@ if good == 0:
exit
()
exit
()
cmdLatex
=
"texfot -tee=
\"
.
\\
tex.fot
\"
pdflatex -output-format=pdf -interaction=nonstopmode -file-line-error document.tex"
cmdLatex
=
"texfot -tee=
\"
.
\\
tex.fot
\"
pdflatex -output-format=pdf -interaction=nonstopmode -file-line-error document.tex"
cmdGlossaries
=
"makeglossaries document"
cmdBib
=
"bibtex document"
beginPart
(
"Latex first run"
)
beginPart
(
"Latex first run"
)
success
=
command
(
cmdLatex
)
success
=
command
(
cmdLatex
)
if
success
==
0
:
if
success
==
0
:
beginPart
(
"Bibtex"
)
beginPart
(
"Bibtex"
)
command
(
cmdBib
)
command
(
"bibtex document"
)
beginPart
(
"Makeglossaries"
)
beginPart
(
"Makeglossaries"
)
command
(
cmdGlossaries
)
command
(
"makeglossaries document"
)
beginPart
(
"Latex second run"
)
beginPart
(
"Latex second run"
)
success
=
command
(
cmdLatex
)
success
=
command
(
cmdLatex
)
...
...
doc/common/commonFunctions.py
0 → 100644
View file @
284d8cdd
import
os
import
subprocess
import
sys
from
shutil
import
get_terminal_size
ColorBlack
=
"
\u001b
[30m"
ColorRed
=
"
\u001b
[31m"
ColorGreen
=
"
\u001b
[32m"
ColorYellow
=
"
\u001b
[33m"
ColorBlue
=
"
\u001b
[34m"
ColorMagenta
=
"
\u001b
[35m"
ColorCyan
=
"
\u001b
[36m"
ColorWhite
=
"
\u001b
[37m"
ColorReset
=
"
\u001b
[0m"
def
printInfo
(
message
):
print
(
ColorBlue
,
message
,
ColorReset
)
pass
def
printWarning
(
message
):
print
(
ColorYellow
,
message
,
ColorReset
)
pass
def
printError
(
message
):
print
(
ColorRed
,
message
,
ColorReset
)
pass
def
printStatus
(
message
):
print
(
ColorCyan
,
message
,
ColorReset
)
pass
def
printSuccess
(
message
):
print
(
ColorGreen
,
message
,
ColorReset
)
pass
def
beginPart
(
name
):
w
=
int
(
get_terminal_size
([
50
,
1
]).
columns
*
0.75
)
namePadding
=
int
((
w
-
len
(
name
))
/
2
)
printInfo
(
"-"
*
w
)
printInfo
((
" "
*
namePadding
)
+
name
+
(
" "
*
namePadding
))
printInfo
(
"-"
*
w
)
pass
def
command
(
cmd
,
input
=
sys
.
stdin
)
->
int
:
printStatus
(
cmd
)
res
=
subprocess
.
run
(
cmd
,
stdin
=
input
)
str
=
f"Done, action result:
{
res
.
returncode
}
"
if
(
res
.
returncode
==
0
):
printSuccess
(
str
)
else
:
printWarning
(
str
)
return
res
.
returncode
pass
doc/common/spell-check.py
0 → 100644
View file @
284d8cdd
from
commonFunctions
import
*
import
os
import
io
import
sys
import
subprocess
beginPart
(
"Spell Checking"
)
dryRun
=
"-dry"
in
sys
.
argv
for
root
,
subdirs
,
files
in
os
.
walk
(
"."
):
res
=
[]
for
file
in
files
:
if
os
.
path
.
splitext
(
file
)[
1
]
==
".tex"
:
filePath
=
os
.
path
.
join
(
root
,
file
)
if
file
in
sys
.
argv
or
filePath
in
sys
.
argv
:
printWarning
(
"Ignoring file "
+
filePath
)
else
:
printInfo
(
"Checking "
+
filePath
)
if
not
dryRun
:
res
.
append
(
subprocess
.
run
(
"aspell --lang=De-de --mode=tex -a"
,
stdin
=
io
.
open
(
filePath
),
stdout
=
io
.
open
(
"res"
,
"w"
)))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment