Skip to content

TimReddingPBX/valley-disco

Repository files navigation

Valley Disco CSV Processor

A web application for processing Valley Disco CSV ticket data. This tool allows you to upload CSV files containing disco ticket information, process the data to add ticket counts and expand pupil information, and download the processed results.

🌟 Features

  • Drag & Drop Interface: Simply drag your CSV file onto the upload area
  • File Selection: Or click to browse and select your CSV file
  • Real-time Processing: All processing happens in your browser - no data leaves your computer
  • Auto-detection: Automatically detects year groups from filename or processes all groups
  • Detailed Logging: See exactly what the processor is doing with your data
  • Instant Download: Get your processed CSV file immediately

🚀 Live Demo

Visit the live application: https://timreddingpbx.github.io/valley-disco

📊 How It Works

The application processes your CSV data in several steps:

  1. Data Cleaning: Removes any "Total" rows that may appear at the end of the CSV file
  2. Ticket Counting: Analyzes the "Pupils" column to count how many tickets each pupil group has
  3. Pupil Expansion: Extracts individual pupils from grouped entries based on the detected year groups

Input CSV Format

Your CSV should contain at least these columns:

  • Guest first name
  • Guest last name
  • Pupils (containing pupil information like "Mila - Year 2 (2425)2NM & Roman - Reception (2425)Owls")
  • Other columns are preserved in the output

Output

The processed CSV includes:

  • All original columns
  • TicketCount: Number of tickets for each pupil group
  • Pupil: Individual pupil extracted based on year group selection

🛠️ Local Development

To run this application locally:

  1. Clone the repository:

    git clone https://github.com/TimReddingPBX/valley-disco.git
    cd valley-disco
  2. Start a local server:

    # Using Python 3
    python3 -m http.server 8000
    
    # Or using Node.js
    npx serve .
    
    # Or using PHP
    php -S localhost:8000
  3. Open your browser to http://localhost:8000

📁 Project Structure

valley-disco/
├── index.html          # Main HTML page
├── styles.css          # Application styles
├── app.js             # Main application logic
├── csv-parser.js      # CSV parsing utilities
├── package.json       # Project metadata
├── data/              # Sample CSV files
├── src/               # Original Node.js scripts
└── .github/workflows/ # GitHub Pages deployment

🔧 Year Group Detection

The application automatically detects which year groups to process based on the filename:

  • Reception files: Filenames containing "reception" → processes Reception pupils
  • Years 1-3 files: Filenames containing "1" and ("2" or "3") → processes Years 1, 2, and 3
  • Years 4-6 files: Filenames containing "4" and ("5" or "6") → processes Years 4, 5, and 6
  • Unknown files: If detection fails, processes all year groups (Reception through Year 6)

📝 Original Node.js Version

The original Node.js processing script is preserved in the src/ directory. This web version maintains the same processing logic while making it accessible through a browser interface.

🚀 Deployment

This application is automatically deployed to GitHub Pages when changes are pushed to the main branch. The deployment is handled by GitHub Actions.

Setting up GitHub Pages for your fork:

  1. Fork this repository
  2. Go to your repository settings
  3. Navigate to "Pages" in the sidebar
  4. Set source to "GitHub Actions"
  5. Your site will be available at https://yourusername.github.io/valley-disco

🔒 Privacy & Security

  • All data processing happens locally in your browser
  • No data is uploaded to any server
  • Your CSV files never leave your computer
  • The application works completely offline after initial load

📄 License

This project is licensed under the ISC License.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📞 Support

If you encounter any issues or have questions, please open an issue on GitHub.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published