Browse Source

Prüfungsindex auf Python 4 und "tex" Endungen veränedert

pheek 2 years ago
parent
commit
84f43ff96d
2 changed files with 3 additions and 2 deletions
  1. 1
    0
      skript_index/clean.sh
  2. 2
    2
      skript_index/pruefung.py

+ 1
- 0
skript_index/clean.sh View File

@@ -1 +1,2 @@
1 1
 . ../../layout/clean.sh
2
+rm ./pruefungsIndex.tex

+ 2
- 2
skript_index/pruefung.py View File

@@ -39,7 +39,7 @@ for pruefungsFilePath in pruefungsListe:
39 39
 	tmp_pruefungsFile = open(pruefungsFilePath, "rt");
40 40
 	for line in tmp_pruefungsFile.readlines():
41 41
 		if line.startswith("\\input{P_"):
42
-			#print pruefungsFilePath, "-->", line;
42
+			print (pruefungsFilePath, "-->", line);
43 43
 			m = re.search('./(.+?)/Pruefung', pruefungsFilePath)
44 44
 			if m:
45 45
 				found = m.group(1);
@@ -63,7 +63,7 @@ os.chdir(pruefungsAufgabenPath);
63 63
 
64 64
 pruefungsFragenListe = print_tex_directory_contents('.');
65 65
 for frage in pruefungsFragenListe:
66
-	m = re.search('./(.+?).tex', frage);
66
+	m = re.search('./(.+?)\.tex$', frage); ## $ eingefügt, denn das .tex gilt nur am Zeilenende
67 67
 	found = m.group(1)
68 68
 	pruefungsFragenListeStriped.append(found);
69 69
 

Loading…
Cancel
Save