Create a webpage version of a lesson

This commit is contained in:
Christopher T. Johnson
2023-11-20 13:23:05 -05:00
parent 217e31ee7a
commit d3c77f5569
17 changed files with 187 additions and 69 deletions

16
main.py
View File

@@ -341,10 +341,18 @@ if __name__ == "__main__":
for fileName in os.listdir("ui"):
if not fileName.endswith(".py"):
continue
uiName = fileName[:-3] + ".ui"
if os.path.getmtime("ui/" + uiName) > os.path.getmtime(
"ui/" + fileName
):
uiName = "ui/" + fileName[:-3] + ".ui"
rccName = "ui/" + fileName[:-3] + ".qrc"
if not os.path.isfile(uiName) and not os.path.isfile(rccName):
outOfDate.append(filenName)
continue
if os.path.isfile(uiName) and os.path.getmtime(
uiName
) > os.path.getmtime("ui/" + fileName):
outOfDate.append(fileName)
if os.path.isfile(rccName) and os.path.getmtime(
rccName
) > os.path.getmtime("ui/" + fileName):
outOfDate.append(fileName)
if len(outOfDate) > 0:
print(f"UI out of date: {', '.join(outOfDate)}")