Remove features that were not working: Metadata, export button and reloading the website from the website itself

This commit is contained in:
Kylian Schmidt
2025-07-22 12:37:33 +02:00
parent 6eeacdc9b7
commit dced82a56f
5 changed files with 3 additions and 71 deletions
-53
View File
@@ -1,53 +0,0 @@
#!/usr/bin/env python3
"""
Simple CGI script to refresh the gallery.
Just calls the main generate_gallery.py script.
"""
import subprocess
def main():
# Output HTTP headers
print("Content-Type: text/plain")
print("Cache-Control: no-cache")
print() # Empty line to end headers
try:
# Call the gallery generation script
result = subprocess.run(
[
"python3",
"/work/kschmidt/web/generate_gallery.py"
],
capture_output=True,
text=True,
timeout=300,
)
if result.returncode == 0:
print("Gallery refresh successful!")
print("\nOutput:")
print(result.stdout)
if result.stderr:
print("\nWarnings:")
print(result.stderr)
else:
print(f"Gallery refresh failed with return code "
f"{result.returncode}")
print("\nError output:")
print(result.stderr)
if result.stdout:
print("\nStandard output:")
print(result.stdout)
except subprocess.TimeoutExpired:
print("Gallery refresh timed out after 5 minutes")
except Exception as e:
print(f"Error running gallery refresh: {e}")
import traceback
traceback.print_exc()
if __name__ == "__main__":
main()