Skip to content

Commit

Permalink
2024-25-riesky-fix: fix name and path
Browse files Browse the repository at this point in the history
  • Loading branch information
krtko1 committed Jul 2, 2024
1 parent b423cb3 commit 6e2a1b6
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 48 deletions.
35 changes: 0 additions & 35 deletions data/2024_25/seminare/Riesky/Riesky1l.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Riešky 1. kolo, zimná séria časti
name: Riešky 1. kolo, zimná séria
type: seminar
sciences:
- mat
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Riešky 2. kolo, zimná séria časti
name: Riešky 2. kolo, zimná séria
type: seminar
sciences:
- mat
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Riešky 3. kolo, zimná séria časti
name: Riešky 3. kolo, zimná séria
type: seminar
sciences:
- mat
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Riešky 1. kolo, letná séria časti
name: Riešky 1. kolo, letná séria
type: seminar
sciences:
- mat
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Riešky 2. kolo, letná séria časti
name: Riešky 2. kolo, letná séria
type: seminar
sciences:
- mat
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Riešky 3. kolo, letná séria časti
name: Riešky 3. kolo, letná séria
type: seminar
sciences:
- mat
Expand Down
18 changes: 11 additions & 7 deletions utils/create_trojsten_seminar.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,20 +168,24 @@
name_doprogramovanie2 = {"SUSI": "Zverejnenie veľkej nápovedy"}

i = 0
directory = "riesky" if args.seminar == "Riešky" else args.seminar
os.makedirs(f"../data/{args.year}/seminare/trojsten/{directory}", exist_ok=True)
directory = (
f"../data/{args.year}/seminare/riesky"
if args.seminar == "Riešky"
else f"../data/{args.year}/seminare/trojsten/{args.seminar}"
)
os.makedirs(f"{directory}", exist_ok=True)
for part in range(1, parts + 1):
for r in range(1, rounds + 1):
round = r
if r == 3 and args.seminar == "SUSI":
round = "Outdoor"
with open(
f"../data/{args.year}/seminare/trojsten/{directory}/{part}_{round}.yml",
f"{directory}/{part}_{round}.yml",
"w",
encoding="utf-8",
) as f:
f.write(
f"""name: {f"Riešky {round}. kolo, {"zimná" if part == 1 else "letná"} séria" if args.seminar == "Riešky" else f"{"Suši" if args.seminar == "SUSI" else args.seminar}{"Koniec " if args.seminar in start else ""}{"Objavného" if round == "Outdoor" else f'{round}.'} {"kola" if args.seminar in start else "kolo"} {"zimnej" if part == 1 else "letnej"}"} časti
f"""name: {f"Riešky {round}. kolo, {"zimná" if part == 1 else "letná"} séria" if args.seminar == "Riešky" else f"{"Suši" if args.seminar == "SUSI" else args.seminar}{"Koniec " if args.seminar in start else ""}{"Objavného" if round == "Outdoor" else f'{round}.'} {"kola" if args.seminar in start else "kolo"} {"zimnej" if part == 1 else "letnej"} časti"}
type: seminar
sciences:
- {sciences[args.seminar]}
Expand All @@ -200,7 +204,7 @@
)
if args.seminar in info_doprogramovanie:
with open(
f"../data/{args.year}/seminare/trojsten/{directory}/{part}_{round}_after1.yml",
f"{directory}/{part}_{round}_after1.yml",
"w",
encoding="utf-8",
) as f:
Expand All @@ -224,7 +228,7 @@
)
if args.seminar in name_doprogramovanie2:
with open(
f"../data/{args.year}/seminare/trojsten/{directory}/{part}_{round}_after2.yml",
f"{directory}/{part}_{round}_after2.yml",
"w",
encoding="utf-8",
) as f:
Expand All @@ -248,7 +252,7 @@
)
if args.seminar in start:
with open(
f"../data/{args.year}/seminare/trojsten/{directory}/{part}_{round}_start.yml",
f"{directory}/{part}_{round}_start.yml",
"w",
encoding="utf-8",
) as f:
Expand Down

0 comments on commit 6e2a1b6

Please sign in to comment.