Skip to content

Commit 1fc38cd

Browse files
authored
Merge pull request #1 from TUBAF-IfI-LiaScript/master
Update own fork
2 parents 3e85494 + c302902 commit 1fc38cd

85 files changed

Lines changed: 4916 additions & 269 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/authors.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
SebastianZug
2+
fjangfaragesh
3+
GERZAC1002
4+
BerndSchmecka
5+
juliankeppler
6+
FnHm
7+
Florian2501
8+
gjaeger1

.github/workflows/listings.tex

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
% Contents of listings-setup.tex
2+
\usepackage{xcolor}
3+
4+
\lstset{
5+
basicstyle=\ttfamily,
6+
numbers=left,
7+
keywordstyle=\color[rgb]{0.13,0.29,0.53}\bfseries,
8+
stringstyle=\color[rgb]{0.31,0.60,0.02},
9+
commentstyle=\color[rgb]{0.56,0.35,0.01}\itshape,
10+
numberstyle=\footnotesize,
11+
stepnumber=1,
12+
numbersep=5pt,
13+
backgroundcolor=\color[RGB]{248,248,248},
14+
showspaces=false,
15+
showstringspaces=false,
16+
showtabs=false,
17+
tabsize=2,
18+
captionpos=b,
19+
breaklines=true,
20+
breakatwhitespace=true,
21+
breakautoindent=true,
22+
escapeinside={\%*}{*)},
23+
linewidth=\textwidth,
24+
basewidth=0.5em,
25+
literate= {á}{{\'a}}1 {é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1 {ú}{{\'u}}1
26+
{Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1
27+
{à}{{\`a}}1 {è}{{\`e}}1 {ì}{{\`i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1
28+
{À}{{\`A}}1 {È}{{\'E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1
29+
{ä}{{\"a}}1 {ë}{{\"e}}1 {ï}{{\"i}}1 {ö}{{\"o}}1 {ü}{{\"u}}1
30+
{Ä}{{\"A}}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1
31+
{â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^i}}1 {ô}{{\^o}}1 {û}{{\^u}}1
32+
{Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1
33+
{Ã}{{\~A}}1 {ã}{{\~a}}1 {Õ}{{\~O}}1 {õ}{{\~o}}1
34+
{œ}{{\oe}}1 {Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1
35+
{ű}{{\H{u}}}1 {Ű}{{\H{U}}}1 {ő}{{\H{o}}}1 {Ő}{{\H{O}}}1
36+
{ç}{{\c c}}1 {Ç}{{\c C}}1 {ø}{{\o}}1 {å}{{\r a}}1 {Å}{{\r A}}1
37+
{€}{{\euro}}1 {£}{{\pounds}}1 {«}{{\guillemotleft}}1
38+
{»}{{\guillemotright}}1 {ñ}{{\~n}}1 {Ñ}{{\~N}}1 {¿}{{?`}}1
39+
}

.github/workflows/main.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# GitHub Action, die aus den LiaScript-Materialien des Wintersemester 2020/21 ein
2+
# Skript generiert
3+
4+
name: GeneratePdf
5+
6+
on:
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
convert_via_pandoc:
13+
runs-on: ubuntu-18.04
14+
container:
15+
image: docker://mirisbowring/texlive_ctan_full:2019
16+
steps:
17+
- name: Check out current repository
18+
uses: actions/checkout@v2
19+
with:
20+
ref: master
21+
# Ausführen des Parsers, der bestimmte Elemente im LiaCode entfernt
22+
- name: Run preprocessing
23+
run : |
24+
mkdir output
25+
python3 .github/workflows/preprocessing.py
26+
# Installation der notwendigen Pandoc tools
27+
- name: Install pandoc
28+
run: |
29+
sudo apt install pandoc
30+
# Generierungsprozess
31+
- name: Run pandoc markdown to tex
32+
run: |
33+
pandoc --toc --top-level-division=chapter -V linkcolor:blue --pdf-engine=xelatex --listings --include-in-header=.github/workflows/listings.tex -f markdown -t latex -o output/script.tex *.mdx
34+
- name: Run pandoc markdown to pdf
35+
run: |
36+
pandoc --toc --top-level-division=chapter -V linkcolor:blue --pdf-engine=xelatex --listings --include-in-header=.github/workflows/listings.tex -o output/script.pdf *.mdx
37+
# Speichern als Artifact
38+
- uses: actions/upload-artifact@master
39+
with:
40+
name: output
41+
path: output

.github/workflows/preprocessing.py

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import glob, os
2+
import shutil
3+
import re
4+
5+
for file in glob.glob("*.md"):
6+
if file != "README.md":
7+
shutil.copy2(file, file+"x")
8+
9+
start = ["``` json @DigiSim.evalJson", "```json @DigiSim.evalJson"]
10+
for file in glob.glob("*.mdx"):
11+
content = open(file, 'r').readlines()
12+
filtered = []
13+
ignoreNextLine = False
14+
for line in content:
15+
if any(entry in line for entry in start):
16+
ignoreNextLine = True
17+
filtered.append(line)
18+
continue
19+
if not ignoreNextLine:
20+
filtered.append(line)
21+
else:
22+
filtered.append("Hier wurde eine animiertes Gattermodell entnommen.\n")
23+
ignoreNextLine = False
24+
25+
with open(file, "w") as outfile:
26+
outfile.write("".join(filtered))
27+
28+
blackList = ["{{", "******", "@Rextester", "@Tau", "@LIA.eval"]
29+
for file in glob.glob("*.mdx"):
30+
content = open(file, 'r').readlines()
31+
filtered = []
32+
for line in content:
33+
if any(entry in line for entry in blackList):
34+
continue
35+
result = re.search( r'```\S+', line)
36+
if result:
37+
line = result.group(0) + "\n"
38+
filtered.append(line)
39+
40+
with open(file, "w") as outfile:
41+
if file.endswith("00_Einfuehrung.mdx"): # insert metadata for pandoc in first md file
42+
title = "**Eingebettete Systeme - TU Freiberg**"
43+
outfile.write(f"---\ntitle: |\n {title}\n https://github.com/SebastianZug/VL_EingebetteteSysteme/\nauthor:\n")
44+
with open(".github/workflows/authors.txt", "r") as authors: # read in authors and write them into the yaml code
45+
for line in authors:
46+
name = line.strip()
47+
outfile.write(f" - {name}\n")
48+
49+
outfile.write("papersize:\n - a4\ngeometry:\n - margin=2cm\n")
50+
outfile.write("header-includes:\n - \\usepackage{titling}\n - \\pretitle{\\begin{center}\n \\includegraphics[width=2cm]{images/Logo_TU_Freiberg.png}\\LARGE\\\\}\n - \\posttitle{\\end{center}}\n---\n")
51+
outfile.write("".join(filtered))

00_Einfuehrung.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ selbst anzugehen.
228228

229229
2. Videos
230230

231-
+ Youtube – „How computers works“ https://www.youtube.com/watch?v=cNN_tTXABUA
231+
+ Youtube – „How computers works“ [Link](https://www.youtube.com/watch?v=cNN_tTXABUA)
232232

233233
Bei den jeweiligen Vorlesungsinhalten werden zusätzliche Materialien angegeben.
234234

@@ -239,7 +239,7 @@ Bei den jeweiligen Vorlesungsinhalten werden zusätzliche Materialien angegeben.
239239

240240
Die Lehrmaterialien finden Sie unter GitHub, einer Webseite für das Versionsmanagement und die Projektverwaltung.
241241

242-
https://github.com/TUBAF-IfI-LiaScript/VL_EingebetteteSysteme/blob/dev/01_HistorischerUeberblick.md
242+
[https://github.com/TUBAF-IfI-LiaScript/VL_EingebetteteSysteme/blob/dev/01_HistorischerUeberblick.md](https://github.com/TUBAF-IfI-LiaScript/VL_EingebetteteSysteme/blob/dev/01_HistorischerUeberblick.md)
243243

244244
Die Unterlagen selbst sind in der Auszeichnungsprache LiaScipt verfasst und öffentlich verfügbar.
245245

@@ -403,6 +403,6 @@ style="width: 80%; display: block; margin-left: auto; margin-right: auto;" -->
403403

404404
Quelle: _Team RobOTTO_, OVGU Magdeburg
405405

406-
## Hausaufgabe
406+
## Hausaufgabe
407407

408408
+ Legen Sie sich einen GitHub Account an ... und seien Sie der erste, der einen Typo in den Unterlagen findet und diesen als _Contributer_ korrigiert :-)

02_BoolscheAlgebra.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import: https://raw.githubusercontent.com/LiaTemplates/NetSwarm-Simulator/master
1010
1111
-->
1212

13-
# 02 - Boolsche Algebra
13+
# Boolsche Algebra
1414

1515
**TU Bergakademie Freiberg - Wintersemester 2020 / 21**
1616

@@ -413,7 +413,7 @@ $$
413413
| 0 | 1 | 0 | 0 | |
414414
| 0 | 1 | 1 | 0 | |
415415
| 1 | 0 | 0 | 1 | $x_1\cdot \overline{x}_2 \cdot \overline{x}_3$ |
416-
| 1 | 0 | 1 | 1 | $ x_1\cdot \overline{x}_2 \cdot x_3$ |
416+
| 1 | 0 | 1 | 1 | $x_1\cdot \overline{x}_2 \cdot x_3$ |
417417
| 1 | 1 | 0 | 1 | $x_1\cdot x_2 \cdot \overline{x}_3$ |
418418
| 1 | 1 | 1 | 0 | |
419419

@@ -463,17 +463,17 @@ negiertes ODER == NOR == Peirce-Funktion
463463
| $x = 0$ | $y = 1$ | 0 | 0 | 0 | 0 |
464464
| $x = 1$ | $y = 0$ | 0 | 0 | 1 | 1 |
465465
| $x = 1$ | $y = 1$ | 0 | 1 | 0 | 1 |
466-
| | | $f(x,y)=\overline{x+ y}$ | $f(x,y)= x\cdot y + \overline{x} \cdot \overline{y}$ | $f(x,y)=\overline{y} $ | $f(x,y)=x+\overline{y}$ |
466+
| | | $f(x,y)=\overline{x+ y}$ | $f(x,y)= x\cdot y + \overline{x} \cdot \overline{y}$ | $f(x,y)=\overline{y}$ | $f(x,y)=x+\overline{y}$ |
467467

468468
negiertes UND == NAND == Sheffer-Funktion genannt
469469

470-
| Eingang x | Eingang y | | Implikation | negiertes UND | Einsfunktion |
471-
| --------- | --------- | --------------------- | -------------------------- | ------------------------------ | ------------ |
472-
| $x = 0$ | $x = 0$ | 1 | 1 | 1 | 1 |
473-
| $x = 0$ | $x = 1$ | 1 | 1 | 1 | 1 |
474-
| $x = 1$ | $x = 0$ | 0 | 0 | 1 | 1 |
475-
| $x = 1$ | $x = 1$ | 0 | 1 | 0 | 1 |
476-
| | | $f(x,y)=\overline{x}$ | $f(x,y)= \overline{x} + y$ | $f(x,y)=\overline{x \cdot y} $ | $f(x,y)=1$ |
470+
| Eingang x | Eingang y | | Implikation | negiertes UND | Einsfunktion |
471+
| --------- | --------- | --------------------- | -------------------------- | ----------------------------- | ------------ |
472+
| $x = 0$ | $x = 0$ | 1 | 1 | 1 | 1 |
473+
| $x = 0$ | $x = 1$ | 1 | 1 | 1 | 1 |
474+
| $x = 1$ | $x = 0$ | 0 | 0 | 1 | 1 |
475+
| $x = 1$ | $x = 1$ | 0 | 1 | 0 | 1 |
476+
| | | $f(x,y)=\overline{x}$ | $f(x,y)= \overline{x} + y$ | $f(x,y)=\overline{x \cdot y}$ | $f(x,y)=1$ |
477477

478478
### Exkurs: Technische Realisierung
479479

0 commit comments

Comments
 (0)