- Forked from Godot Engine 4.7-dev (MIT License) - Rebranded to AeThex Engine with cyan/purple theme - Added AI-powered development assistant module - Integrated Claude API for code completion & error fixing - Custom hexagon logo and branding - Multi-platform CI/CD (Windows, Linux, macOS) - Built Linux editor binary (151MB) - Complete source code with all customizations Tech Stack: - C++ game engine core - AI Module: Claude 3.5 Sonnet integration - Build: SCons, 14K+ source files - License: MIT (Godot) + Custom (AeThex features) Ready for Windows build via GitHub Actions!
47 lines
1.3 KiB
Python
Executable file
47 lines
1.3 KiB
Python
Executable file
#!/usr/bin/env python3
|
|
|
|
import argparse
|
|
import glob
|
|
import os
|
|
|
|
if __name__ != "__main__":
|
|
raise ImportError(f"{__name__} should not be used as a module.")
|
|
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser(description="Cleanup old cache files")
|
|
parser.add_argument("timestamp", type=int, help="Unix timestamp cutoff")
|
|
parser.add_argument("directory", help="Path to cache directory")
|
|
args = parser.parse_args()
|
|
|
|
ret = 0
|
|
|
|
# TODO: Convert to non-hardcoded path
|
|
if os.path.exists("redundant.txt"):
|
|
with open("redundant.txt") as redundant:
|
|
for item in map(str.strip, redundant):
|
|
if os.path.isfile(item):
|
|
try:
|
|
os.remove(item)
|
|
except OSError:
|
|
print(f'Failed to handle "{item}"; skipping.')
|
|
ret += 1
|
|
|
|
for file in glob.glob(os.path.join(args.directory, "*", "*")):
|
|
try:
|
|
if os.path.getatime(file) < args.timestamp:
|
|
os.remove(file)
|
|
except OSError:
|
|
print(f'Failed to handle "{file}"; skipping.')
|
|
ret += 1
|
|
|
|
return ret
|
|
|
|
|
|
try:
|
|
raise SystemExit(main())
|
|
except KeyboardInterrupt:
|
|
import signal
|
|
|
|
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
|
os.kill(os.getpid(), signal.SIGINT)
|