Create a webpage version of a lesson
This commit is contained in:
16
main.py
16
main.py
@@ -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)}")
|
||||
|
||||
Reference in New Issue
Block a user