Skip to content

Commit d15e572

Browse files
authored
Fixed bug with script generation (#54)
* fixed bug with listings * moved authors to main.yml * fixed bug in main.yml * changed the author generation * changed author cmd * changed pandoc cmd * bug fix * changed main.yml * added debugging output * added debbuing * changed debugging * fixed bug * fixed bug * added git log action * author work around
1 parent ad7174b commit d15e572

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

.github/workflows/authors.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
André Dietrich
2+
Christoph Pooch
3+
Fabian Bär
4+
Fritz Apelt
5+
Galina Rudolf
6+
JohannaKlinke
7+
Jonas Treumer
8+
KoKoKotlin
9+
Lesestein
10+
LinaTeumer
11+
MMachel
12+
Sebastian Zug
13+
Snikker123
14+
Yannik Höll
15+
galinarudollf

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ jobs:
2323
# Ausführen des Parsers, der bestimmte Elemente im LiaCode entfernt
2424
- name: Run preprocessing
2525
run : |
26-
python3 .github/workflows/preprocessing.py
2726
mkdir output
27+
python3 .github/workflows/preprocessing.py
2828
# Installation der notwendigen Pandoc tools
2929
- name: Install pandoc
3030
run: |
3131
sudo apt install pandoc
3232
# Generierungsprozess
3333
- name: Run pandoc markdown to tex
3434
run: |
35-
pandoc --toc --top-level-division=chapter -V linkcolor:blue --pdf-engine=xelatex --listings -H .github/workflows/listings.tex --include-in-header=.github/workflows/header.tex -f markdown -t latex -o output/script.tex *.mdx
35+
pandoc --toc --top-level-division=chapter -V linkcolor:blue --pdf-engine=xelatex -f markdown -t latex -o output/script.tex *.mdx
3636
- name: Run pandoc markdown to pdf
3737
run: |
38-
pandoc --toc --top-level-division=chapter -V linkcolor:blue --pdf-engine=xelatex --listings -H .github/workflows/listings.tex --include-in-header=.github/workflows/header.tex -o output/script.pdf *.mdx
38+
pandoc --toc --top-level-division=chapter -V linkcolor:blue --pdf-engine=xelatex -o output/script.pdf *.mdx
3939
# Speichern als Artifact
4040
- uses: actions/upload-artifact@master
4141
with:

.github/workflows/preprocessing.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@
2323
if file.endswith("00_Einfuehrung.mdx"): # insert metadata for pandoc in first md file
2424
title = "**C# Kurs TU Freiberg**"
2525
outfile.write(f"---\ntitle: |\n {title}\n https://github.com/SebastianZug/CsharpCourse\nauthor:\n")
26-
os.system("git shortlog -ns --all > authors.txt")
27-
with open("authors.txt", "r") as authors: # read in authors and write them into the yaml code
26+
with open(".github/workflows/authors.txt", "r") as authors: # read in authors and write them into the yaml code
2827
for line in authors:
29-
line = line.strip()
30-
name = line.split("\t")[1]
28+
name = line.strip()
3129
outfile.write(f" - {name}\n")
3230

3331
outfile.write("papersize:\n - a4\ngeometry:\n - margin=2cm\n")

0 commit comments

Comments
 (0)