help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
sports-analysis
/
scripts
RSK World
sports-analysis
Sports Analysis Dataset - Game Footage + Player Tracking + Event Annotations + OpenCV + Video Analysis
scripts
  • create_dataset_zip.bat511 B
  • create_dataset_zip.py3 KB
  • create_dataset_zip.sh485 B
preview-generator.htmlcreate_dataset_zip.py
scripts/create_dataset_zip.py
Raw Download
Find: Go to:
#!/usr/bin/env python3
"""
RSK World
Founder: Molla Samser
Designer & Tester: Rima Khatun
Email: help@rskworld.in
Phone: +91 93305 39277
Address: Nutanhat, Mongolkote, Purba Burdwan, West Bengal, India, 713147
Website: https://rskworld.in/

Script to create the sports-analysis.zip dataset archive
"""

import os
import zipfile
from pathlib import Path
from datetime import datetime

def create_dataset_zip():
    """
    Create the sports-analysis.zip file with all dataset files
    """
    # Get the project root directory (parent of scripts/)
    project_root = Path(__file__).parent.parent
    
    # Define files and directories to include
    include_paths = [
        'data/annotations/',
        'data/metadata/',
        'data/structure.json',
        'data/videos/README.md',
        'docs/',
        'examples/',
        'README.md',
        'LICENSE',
        'CHANGELOG.md',
        'CONTRIBUTING.md',
        'config.json'
    ]
    
    # Output zip file
    zip_path = project_root / 'sports-analysis.zip'
    
    print(f"Creating archive: {zip_path}")
    print(f"Project root: {project_root}")
    
    # Create zip file
    with zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) as zipf:
        for path_str in include_paths:
            path = project_root / path_str
            
            if path.is_file():
                # Add single file
                arcname = path.relative_to(project_root)
                zipf.write(path, arcname)
                print(f"  Added: {arcname}")
            
            elif path.is_dir():
                # Add directory and all its contents
                for file_path in path.rglob('*'):
                    if file_path.is_file():
                        arcname = file_path.relative_to(project_root)
                        zipf.write(file_path, arcname)
                        print(f"  Added: {arcname}")
        
        # Add a README about video files
        readme_content = f"""# Sports Analysis Dataset

Generated: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}

## Contents

This archive contains:
- Annotations (JSON and CSV files)
- Metadata files
- Documentation
- Example code
- Dataset structure information

## Video Files

Note: Video files (MP4/MOV) are not included in this archive due to size.
Please refer to the videos/README.md for information about video files.

## Contact

RSK World
Email: help@rskworld.in
Website: https://rskworld.in/
"""
        zipf.writestr('DATASET_README.txt', readme_content)
        print(f"  Added: DATASET_README.txt")
    
    # Get file size
    file_size = zip_path.stat().st_size
    file_size_mb = file_size / (1024 * 1024)
    
    print(f"\n[SUCCESS] Archive created successfully!")
    print(f"  File: {zip_path}")
    print(f"  Size: {file_size_mb:.2f} MB")
    
    return zip_path

if __name__ == '__main__':
    try:
        create_dataset_zip()
    except Exception as e:
        print(f"Error creating archive: {e}")
        raise

111 lines•3 KB
python

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer