Skip to content
Snippets Groups Projects
Commit aff5a9b3 authored by David Hrbáč's avatar David Hrbáč
Browse files

Display only errors

parent 530b2a8a
No related branches found
No related tags found
5 merge requests!368Update prace.md to document the change from qprace to qprod as the default...,!367Update prace.md to document the change from qprace to qprod as the default...,!366Update prace.md to document the change from qprace to qprod as the default...,!323extended-acls-storage-section,!78Module matrix
...@@ -28,7 +28,8 @@ def main(location): ...@@ -28,7 +28,8 @@ def main(location):
return_value = 0 return_value = 0
prev_line = lines.pop(0) prev_line = lines.pop(0)
disabled = 0 disabled = 0
print(`location`) echo_filename = False
#print(`location`)
for line in lines: for line in lines:
if line.startswith("``") and disabled == 0: if line.startswith("``") and disabled == 0:
disabled = 1 disabled = 1
...@@ -37,19 +38,22 @@ def main(location): ...@@ -37,19 +38,22 @@ def main(location):
disabled = 0 disabled = 0
if line.startswith('#') and disabled == 0: if line.startswith('#') and disabled == 0:
if line != titlecase(line[:(line.find("]"))], callback=abbreviations)+line[(line.find("]")):]: if line != titlecase(line[:(line.find("]"))], callback=abbreviations)+line[(line.find("]")):]:
print() if return_value == 0 and echo_filename == False:
print("%s" % location)
echo_filename = True
print("-"+line,end="") print("-"+line,end="")
print("+"+titlecase(line[:(line.find("]"))], callback=abbreviations)+line[(line.find("]")):],end="") print("+"+titlecase(line[:(line.find("]"))], callback=abbreviations)+line[(line.find("]")):],end="")
print()
return_value = 1 return_value = 1
if (line.startswith('---') or line.startswith('===')) and disabled == 0: if (line.startswith('---') or line.startswith('===')) and disabled == 0:
if prev_line != titlecase(prev_line[:(prev_line.find("]"))], callback=abbreviations)+prev_line[(prev_line.find("]")):]: if prev_line != titlecase(prev_line[:(prev_line.find("]"))], callback=abbreviations)+prev_line[(prev_line.find("]")):]:
print()
print("-"+prev_line,end="") print("-"+prev_line,end="")
print("+"+titlecase(prev_line[:(prev_line.find("]"))], callback=abbreviations)+prev_line[(prev_line.find("]")):],end="") print("+"+titlecase(prev_line[:(prev_line.find("]"))], callback=abbreviations)+prev_line[(prev_line.find("]")):],end="")
print()
return_value = 1 return_value = 1
prev_line = line prev_line = line
if return_value == 0: #if return_value == 0:
print("==Ok==") # print("==Ok==")
exit(return_value) exit(return_value)
if __name__ == "__main__": if __name__ == "__main__":
try: try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment