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.
- 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
Visit the live application: https://timreddingpbx.github.io/valley-disco
The application processes your CSV data in several steps:
- Data Cleaning: Removes any "Total" rows that may appear at the end of the CSV file
- Ticket Counting: Analyzes the "Pupils" column to count how many tickets each pupil group has
- Pupil Expansion: Extracts individual pupils from grouped entries based on the detected year groups
Your CSV should contain at least these columns:
Guest first nameGuest last namePupils(containing pupil information like "Mila - Year 2 (2425)2NM & Roman - Reception (2425)Owls")- Other columns are preserved in the output
The processed CSV includes:
- All original columns
TicketCount: Number of tickets for each pupil groupPupil: Individual pupil extracted based on year group selection
To run this application locally:
-
Clone the repository:
git clone https://github.com/TimReddingPBX/valley-disco.git cd valley-disco -
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
-
Open your browser to
http://localhost:8000
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
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)
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.
This application is automatically deployed to GitHub Pages when changes are pushed to the main branch. The deployment is handled by GitHub Actions.
- Fork this repository
- Go to your repository settings
- Navigate to "Pages" in the sidebar
- Set source to "GitHub Actions"
- Your site will be available at
https://yourusername.github.io/valley-disco
- 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
This project is licensed under the ISC License.
Contributions are welcome! Please feel free to submit a Pull Request.
If you encounter any issues or have questions, please open an issue on GitHub.