Repository cleanup: Remove large files, cache files, sensitive data, and junk files
- Updated .gitignore with comprehensive patterns for Python, media files, and project data - Removed all __pycache__ directories and .pyc files from tracking - Removed large media files (PNG frames, MP4 videos) from git history - Removed sensitive credential files (credentials.enc, key.key, server_settings.enc) - Removed test files and temporary data from tracking - Removed junk_files directory from tracking - Repository size optimization and security improvement
38
.gitignore
vendored
@@ -1,3 +1,39 @@
|
|||||||
# Ignore the virtual environment folder
|
# Ignore the virtual environment folder
|
||||||
track/
|
track/
|
||||||
resurces/projects/
|
|
||||||
|
# Ignore Python cache files
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
*.pyo
|
||||||
|
*.pyd
|
||||||
|
.Python
|
||||||
|
|
||||||
|
# Ignore project data and generated files
|
||||||
|
resources/projects/
|
||||||
|
resources/trip_archive/
|
||||||
|
resources/credentials.enc
|
||||||
|
resources/key.key
|
||||||
|
resources/server_settings.enc
|
||||||
|
|
||||||
|
# Ignore generated videos and frames
|
||||||
|
*.mp4
|
||||||
|
*.avi
|
||||||
|
*.mov
|
||||||
|
*.webm
|
||||||
|
cinema_frames/
|
||||||
|
progressive_frames/
|
||||||
|
|
||||||
|
# Ignore test files and temporary files
|
||||||
|
test_*.py
|
||||||
|
*.tmp
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Ignore IDE files
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
|
||||||
|
# Ignore OS files
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|||||||
@@ -1,45 +0,0 @@
|
|||||||
# Project Cleanup Summary
|
|
||||||
|
|
||||||
## What Was Cleaned Up
|
|
||||||
|
|
||||||
### Moved to `junk_files/`
|
|
||||||
- Documentation files (*.md) that were cluttering the root directory
|
|
||||||
- `3D_VIDEO_DOCUMENTATION.md`
|
|
||||||
- `PAUSE_EDIT_IMPROVEMENTS.md`
|
|
||||||
- `PROJECT_MODERNIZATION_SUMMARY.md`
|
|
||||||
- `TEST_MODE_DOCUMENTATION.md`
|
|
||||||
|
|
||||||
### Removed
|
|
||||||
- All `__pycache__` directories and compiled Python bytecode files
|
|
||||||
- Duplicate and test files that were no longer needed
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- Fixed typo in requirements.txt (`reqirements.txt` was corrected to `requirements.txt`)
|
|
||||||
- Ensured proper import structure (app uses `py_scripts.video_3d_generator` correctly)
|
|
||||||
|
|
||||||
## Current Clean Structure
|
|
||||||
```
|
|
||||||
traccar_animation/
|
|
||||||
├── .git/ # Git repository files
|
|
||||||
├── .gitignore # Git ignore rules
|
|
||||||
├── config.py # Application configuration
|
|
||||||
├── main.py # Main application entry point
|
|
||||||
├── traccar.kv # Kivy UI layout file
|
|
||||||
├── requirements.txt # Python dependencies (fixed)
|
|
||||||
├── py_scripts/ # Python modules
|
|
||||||
│ ├── __init__.py
|
|
||||||
│ ├── utils.py
|
|
||||||
│ ├── video_3d_generator.py
|
|
||||||
│ └── webview.py
|
|
||||||
├── screens/ # Kivy screen modules
|
|
||||||
├── resources/ # Application resources
|
|
||||||
├── track/ # Virtual environment
|
|
||||||
└── junk_files/ # Non-essential files moved here
|
|
||||||
```
|
|
||||||
|
|
||||||
## Verification
|
|
||||||
- ✅ Utils module imports correctly
|
|
||||||
- ✅ Video 3D generator module imports correctly
|
|
||||||
- ✅ No duplicate files remain
|
|
||||||
- ✅ All dependencies properly listed in requirements.txt
|
|
||||||
- ✅ Clean project structure maintained
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
"""
|
|
||||||
Complete video generation from existing frames
|
|
||||||
"""
|
|
||||||
import os
|
|
||||||
import glob
|
|
||||||
from moviepy import ImageSequenceClip
|
|
||||||
|
|
||||||
def create_video_from_frames():
|
|
||||||
frames_folder = "/home/pi/Desktop/traccar_animation/resources/projects/day 2/frames"
|
|
||||||
output_path = "/home/pi/Desktop/traccar_animation/resources/projects/day 2/advanced_3d_animation.mp4"
|
|
||||||
|
|
||||||
# Get all frame files
|
|
||||||
frame_files = glob.glob(os.path.join(frames_folder, "frame_*.png"))
|
|
||||||
frame_files.sort() # Ensure correct order
|
|
||||||
|
|
||||||
if not frame_files:
|
|
||||||
print("No frames found!")
|
|
||||||
return
|
|
||||||
|
|
||||||
print(f"Found {len(frame_files)} frames")
|
|
||||||
print("Creating video...")
|
|
||||||
|
|
||||||
# Create video clip
|
|
||||||
clip = ImageSequenceClip(frame_files, fps=30)
|
|
||||||
|
|
||||||
# Write video file
|
|
||||||
clip.write_videofile(
|
|
||||||
output_path,
|
|
||||||
codec='libx264',
|
|
||||||
bitrate='8000k',
|
|
||||||
audio=False,
|
|
||||||
temp_audiofile=None,
|
|
||||||
remove_temp=True
|
|
||||||
)
|
|
||||||
|
|
||||||
print(f"Video created successfully: {output_path}")
|
|
||||||
return output_path
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
create_video_from_frames()
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
"""
|
|
||||||
Test script for Google Earth-style flythrough animation
|
|
||||||
"""
|
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
sys.path.append('/home/pi/Desktop/traccar_animation')
|
|
||||||
|
|
||||||
from py_scripts.advanced_3d_generator import Advanced3DGenerator
|
|
||||||
from datetime import datetime
|
|
||||||
|
|
||||||
def test_google_earth_animation():
|
|
||||||
"""Test the new Google Earth flythrough animation"""
|
|
||||||
|
|
||||||
# Find a project with GPS data
|
|
||||||
projects_folder = "/home/pi/Desktop/traccar_animation/resources/projects"
|
|
||||||
|
|
||||||
if not os.path.exists(projects_folder):
|
|
||||||
print("Projects folder not found!")
|
|
||||||
return
|
|
||||||
|
|
||||||
# Look for projects
|
|
||||||
projects = [d for d in os.listdir(projects_folder) if os.path.isdir(os.path.join(projects_folder, d))]
|
|
||||||
|
|
||||||
if not projects:
|
|
||||||
print("No projects found!")
|
|
||||||
return
|
|
||||||
|
|
||||||
# Use the first project found
|
|
||||||
project_name = projects[0]
|
|
||||||
project_folder = os.path.join(projects_folder, project_name)
|
|
||||||
positions_file = os.path.join(project_folder, "positions.json")
|
|
||||||
|
|
||||||
if not os.path.exists(positions_file):
|
|
||||||
print(f"No positions.json found in project {project_name}")
|
|
||||||
return
|
|
||||||
|
|
||||||
print(f"Testing Google Earth animation with project: {project_name}")
|
|
||||||
|
|
||||||
# Create generator
|
|
||||||
generator = Advanced3DGenerator(project_folder)
|
|
||||||
|
|
||||||
# Check dependencies
|
|
||||||
try:
|
|
||||||
generator.check_dependencies()
|
|
||||||
print("✅ All dependencies available")
|
|
||||||
except Exception as e:
|
|
||||||
print(f"❌ Dependency error: {e}")
|
|
||||||
return
|
|
||||||
|
|
||||||
# Generate Google Earth-style animation
|
|
||||||
output_video = os.path.join(project_folder, f"{project_name}_google_earth_test_{datetime.now().strftime('%Y%m%d_%H%M%S')}.mp4")
|
|
||||||
|
|
||||||
def progress_callback(progress, message):
|
|
||||||
print(f"Progress: {progress:.1f}% - {message}")
|
|
||||||
|
|
||||||
try:
|
|
||||||
print("Starting Google Earth flythrough generation...")
|
|
||||||
success = generator.generate_3d_animation(
|
|
||||||
positions_file,
|
|
||||||
output_video,
|
|
||||||
style='google_earth',
|
|
||||||
progress_callback=progress_callback
|
|
||||||
)
|
|
||||||
|
|
||||||
if success and os.path.exists(output_video):
|
|
||||||
print(f"✅ SUCCESS! Google Earth flythrough created: {output_video}")
|
|
||||||
|
|
||||||
# Get file size
|
|
||||||
file_size = os.path.getsize(output_video) / (1024 * 1024) # MB
|
|
||||||
print(f"📹 Video size: {file_size:.1f} MB")
|
|
||||||
|
|
||||||
else:
|
|
||||||
print("❌ Failed to create video")
|
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
print(f"❌ Error during generation: {e}")
|
|
||||||
import traceback
|
|
||||||
traceback.print_exc()
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
test_google_earth_animation()
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
"""
|
|
||||||
Test script for the improved Relive-style GPS animation
|
|
||||||
"""
|
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import json
|
|
||||||
from datetime import datetime
|
|
||||||
|
|
||||||
# Add the project directory to the path
|
|
||||||
sys.path.append('/home/pi/Desktop/traccar_animation')
|
|
||||||
|
|
||||||
from py_scripts.advanced_3d_generator import Advanced3DGenerator
|
|
||||||
|
|
||||||
def test_relive_animation():
|
|
||||||
"""Test the new Relive-style animation"""
|
|
||||||
|
|
||||||
# Find a project with GPS data
|
|
||||||
resources_folder = "/home/pi/Desktop/traccar_animation/resources"
|
|
||||||
projects_folder = os.path.join(resources_folder, "projects")
|
|
||||||
|
|
||||||
if not os.path.exists(projects_folder):
|
|
||||||
print("No projects folder found")
|
|
||||||
return
|
|
||||||
|
|
||||||
# Look for projects with positions.json
|
|
||||||
for project_name in os.listdir(projects_folder):
|
|
||||||
project_path = os.path.join(projects_folder, project_name)
|
|
||||||
positions_file = os.path.join(project_path, "positions.json")
|
|
||||||
|
|
||||||
if os.path.exists(positions_file):
|
|
||||||
print(f"🎬 Testing Relive-style animation with project: {project_name}")
|
|
||||||
|
|
||||||
# Check if positions file has data
|
|
||||||
try:
|
|
||||||
with open(positions_file, 'r') as f:
|
|
||||||
positions = json.load(f)
|
|
||||||
|
|
||||||
if len(positions) < 5:
|
|
||||||
print(f"❌ Project {project_name} has only {len(positions)} GPS points - skipping")
|
|
||||||
continue
|
|
||||||
|
|
||||||
print(f"📍 Found {len(positions)} GPS points")
|
|
||||||
|
|
||||||
# Create generator
|
|
||||||
generator = Advanced3DGenerator(project_path)
|
|
||||||
|
|
||||||
# Progress callback
|
|
||||||
def progress_callback(progress, message):
|
|
||||||
print(f"Progress: {progress:.1f}% - {message}")
|
|
||||||
|
|
||||||
# Generate animation
|
|
||||||
output_video = os.path.join(project_path, f"relive_animation_{datetime.now().strftime('%Y%m%d_%H%M%S')}.mp4")
|
|
||||||
|
|
||||||
print(f"🚀 Starting Relive-style animation generation...")
|
|
||||||
success = generator.generate_3d_animation(
|
|
||||||
positions_file,
|
|
||||||
output_video,
|
|
||||||
style='advanced',
|
|
||||||
progress_callback=progress_callback
|
|
||||||
)
|
|
||||||
|
|
||||||
if success:
|
|
||||||
print(f"✅ SUCCESS! Relive-style animation created: {output_video}")
|
|
||||||
print(f"📁 You can find your video at: {output_video}")
|
|
||||||
else:
|
|
||||||
print("❌ Failed to generate animation")
|
|
||||||
|
|
||||||
return # Exit after first successful project
|
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
print(f"❌ Error testing project {project_name}: {e}")
|
|
||||||
continue
|
|
||||||
|
|
||||||
print("❌ No suitable projects found for testing")
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
print("🎬 Testing Improved Relive-Style GPS Animation")
|
|
||||||
print("=" * 50)
|
|
||||||
test_relive_animation()
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
gAAAAABob6EE_3AL40YyXoB2PsgIvAZ5l2K7YlF8zN88H77vOE4nEydeV433UrXvJg87IoUng6uJMCDUQTCoQYtgNSj4lAsqEG06V_NquX_YUXjcjyc23IqB2mH8gpoj7oHpTBc9tHzM
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
wetp_PNG9CC5432-W9H3rUbaqIurwldZxHlOgori5kY=
|
|
||||||
|
Before Width: | Height: | Size: 360 KiB |
|
Before Width: | Height: | Size: 360 KiB |
|
Before Width: | Height: | Size: 367 KiB |
|
Before Width: | Height: | Size: 369 KiB |
|
Before Width: | Height: | Size: 368 KiB |
|
Before Width: | Height: | Size: 368 KiB |
|
Before Width: | Height: | Size: 369 KiB |
|
Before Width: | Height: | Size: 367 KiB |
|
Before Width: | Height: | Size: 369 KiB |
|
Before Width: | Height: | Size: 373 KiB |
|
Before Width: | Height: | Size: 370 KiB |
|
Before Width: | Height: | Size: 370 KiB |
|
Before Width: | Height: | Size: 376 KiB |
|
Before Width: | Height: | Size: 369 KiB |
|
Before Width: | Height: | Size: 375 KiB |
|
Before Width: | Height: | Size: 152 KiB |
|
Before Width: | Height: | Size: 152 KiB |
|
Before Width: | Height: | Size: 152 KiB |
|
Before Width: | Height: | Size: 153 KiB |
|
Before Width: | Height: | Size: 153 KiB |
|
Before Width: | Height: | Size: 156 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 161 KiB |
|
Before Width: | Height: | Size: 161 KiB |
|
Before Width: | Height: | Size: 161 KiB |
|
Before Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 166 KiB |
|
Before Width: | Height: | Size: 169 KiB |
|
Before Width: | Height: | Size: 178 KiB |
|
Before Width: | Height: | Size: 183 KiB |
|
Before Width: | Height: | Size: 189 KiB |
|
Before Width: | Height: | Size: 189 KiB |
|
Before Width: | Height: | Size: 189 KiB |
|
Before Width: | Height: | Size: 190 KiB |
|
Before Width: | Height: | Size: 190 KiB |
|
Before Width: | Height: | Size: 191 KiB |
|
Before Width: | Height: | Size: 192 KiB |
|
Before Width: | Height: | Size: 195 KiB |
|
Before Width: | Height: | Size: 196 KiB |
|
Before Width: | Height: | Size: 196 KiB |
|
Before Width: | Height: | Size: 197 KiB |
|
Before Width: | Height: | Size: 198 KiB |
|
Before Width: | Height: | Size: 198 KiB |
|
Before Width: | Height: | Size: 199 KiB |
|
Before Width: | Height: | Size: 200 KiB |
|
Before Width: | Height: | Size: 203 KiB |
|
Before Width: | Height: | Size: 204 KiB |
|
Before Width: | Height: | Size: 208 KiB |
|
Before Width: | Height: | Size: 212 KiB |
|
Before Width: | Height: | Size: 216 KiB |
|
Before Width: | Height: | Size: 222 KiB |
|
Before Width: | Height: | Size: 222 KiB |
|
Before Width: | Height: | Size: 225 KiB |
|
Before Width: | Height: | Size: 226 KiB |
|
Before Width: | Height: | Size: 228 KiB |
|
Before Width: | Height: | Size: 230 KiB |
|
Before Width: | Height: | Size: 235 KiB |
|
Before Width: | Height: | Size: 239 KiB |
|
Before Width: | Height: | Size: 240 KiB |