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
 . ../../layout/clean.sh
1
 . ../../layout/clean.sh
2
+rm ./pruefungsIndex.tex

+ 2
- 2
skript_index/pruefung.py View File

39
 	tmp_pruefungsFile = open(pruefungsFilePath, "rt");
39
 	tmp_pruefungsFile = open(pruefungsFilePath, "rt");
40
 	for line in tmp_pruefungsFile.readlines():
40
 	for line in tmp_pruefungsFile.readlines():
41
 		if line.startswith("\\input{P_"):
41
 		if line.startswith("\\input{P_"):
42
-			#print pruefungsFilePath, "-->", line;
42
+			print (pruefungsFilePath, "-->", line);
43
 			m = re.search('./(.+?)/Pruefung', pruefungsFilePath)
43
 			m = re.search('./(.+?)/Pruefung', pruefungsFilePath)
44
 			if m:
44
 			if m:
45
 				found = m.group(1);
45
 				found = m.group(1);
63
 
63
 
64
 pruefungsFragenListe = print_tex_directory_contents('.');
64
 pruefungsFragenListe = print_tex_directory_contents('.');
65
 for frage in pruefungsFragenListe:
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
 	found = m.group(1)
67
 	found = m.group(1)
68
 	pruefungsFragenListeStriped.append(found);
68
 	pruefungsFragenListeStriped.append(found);
69
 
69
 

Loading…
Cancel
Save