Skip to content

Commit 2c8f970

Browse files
committed
Webpage created
1 parent 807bc5b commit 2c8f970

9 files changed

Lines changed: 895 additions & 5 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
environment:
19+
name: github-pages
20+
url: ${{ steps.deployment.outputs.page_url }}
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Pages
27+
uses: actions/configure-pages@v4
28+
29+
- name: Upload artifact
30+
uses: actions/upload-pages-artifact@v3
31+
with:
32+
path: '.'
33+
34+
- name: Deploy to GitHub Pages
35+
id: deployment
36+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,23 @@ dist
128128
.yarn/build-state.yml
129129
.yarn/install-state.gz
130130
.pnp.*
131+
132+
# OS generated files
133+
.DS_Store
134+
.DS_Store?
135+
._*
136+
.Spotlight-V100
137+
.Trashes
138+
ehthumbs.db
139+
Thumbs.db
140+
141+
# IDE files
142+
.vscode/
143+
.idea/
144+
*.swp
145+
*.swo
146+
*~
147+
148+
# Project specific
149+
out/
150+
original/

DEPLOYMENT.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Deployment Instructions
2+
3+
## Setting up GitHub Pages
4+
5+
1. **Push your code to GitHub:**
6+
```bash
7+
git add .
8+
git commit -m "Add web application for CSV processing"
9+
git push origin main
10+
```
11+
12+
2. **Enable GitHub Pages:**
13+
- Go to your repository on GitHub
14+
- Click on "Settings" tab
15+
- Scroll down to "Pages" in the left sidebar
16+
- Under "Source", select "GitHub Actions"
17+
- The deployment workflow will automatically run
18+
19+
3. **Access your site:**
20+
- Your site will be available at: `https://yourusername.github.io/valley-disco`
21+
- It may take a few minutes for the first deployment to complete
22+
23+
## Local Testing
24+
25+
To test the application locally before deploying:
26+
27+
```bash
28+
# Navigate to the project directory
29+
cd valley-disco
30+
31+
# Start a local server (choose one):
32+
python3 -m http.server 8000
33+
# or
34+
npx serve .
35+
# or
36+
php -S localhost:8000
37+
38+
# Open your browser to:
39+
http://localhost:8000
40+
```
41+
42+
## Troubleshooting
43+
44+
- If the GitHub Actions deployment fails, check the "Actions" tab in your repository
45+
- Ensure your repository is public or you have GitHub Pages enabled for private repos
46+
- The first deployment may take 5-10 minutes to become available

README.md

Lines changed: 121 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,121 @@
1-
# valley-disco
1+
# Valley Disco CSV Processor
2+
3+
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.
4+
5+
## 🌟 Features
6+
7+
- **Drag & Drop Interface**: Simply drag your CSV file onto the upload area
8+
- **File Selection**: Or click to browse and select your CSV file
9+
- **Real-time Processing**: All processing happens in your browser - no data leaves your computer
10+
- **Auto-detection**: Automatically detects year groups from filename or processes all groups
11+
- **Detailed Logging**: See exactly what the processor is doing with your data
12+
- **Instant Download**: Get your processed CSV file immediately
13+
14+
## 🚀 Live Demo
15+
16+
Visit the live application: [https://timreddingpbx.github.io/valley-disco](https://timreddingpbx.github.io/valley-disco)
17+
18+
## 📊 How It Works
19+
20+
The application processes your CSV data in several steps:
21+
22+
1. **Data Cleaning**: Removes any "Total" rows that may appear at the end of the CSV file
23+
2. **Ticket Counting**: Analyzes the "Pupils" column to count how many tickets each pupil group has
24+
3. **Pupil Expansion**: Extracts individual pupils from grouped entries based on the detected year groups
25+
26+
### Input CSV Format
27+
28+
Your CSV should contain at least these columns:
29+
- `Guest first name`
30+
- `Guest last name`
31+
- `Pupils` (containing pupil information like "Mila - Year 2 (2425)2NM & Roman - Reception (2425)Owls")
32+
- Other columns are preserved in the output
33+
34+
### Output
35+
36+
The processed CSV includes:
37+
- All original columns
38+
- `TicketCount`: Number of tickets for each pupil group
39+
- `Pupil`: Individual pupil extracted based on year group selection
40+
41+
## 🛠️ Local Development
42+
43+
To run this application locally:
44+
45+
1. Clone the repository:
46+
```bash
47+
git clone https://github.com/TimReddingPBX/valley-disco.git
48+
cd valley-disco
49+
```
50+
51+
2. Start a local server:
52+
```bash
53+
# Using Python 3
54+
python3 -m http.server 8000
55+
56+
# Or using Node.js
57+
npx serve .
58+
59+
# Or using PHP
60+
php -S localhost:8000
61+
```
62+
63+
3. Open your browser to `http://localhost:8000`
64+
65+
## 📁 Project Structure
66+
67+
```
68+
valley-disco/
69+
├── index.html # Main HTML page
70+
├── styles.css # Application styles
71+
├── app.js # Main application logic
72+
├── csv-parser.js # CSV parsing utilities
73+
├── package.json # Project metadata
74+
├── data/ # Sample CSV files
75+
├── src/ # Original Node.js scripts
76+
└── .github/workflows/ # GitHub Pages deployment
77+
```
78+
79+
## 🔧 Year Group Detection
80+
81+
The application automatically detects which year groups to process based on the filename:
82+
83+
- **Reception files**: Filenames containing "reception" → processes Reception pupils
84+
- **Years 1-3 files**: Filenames containing "1" and ("2" or "3") → processes Years 1, 2, and 3
85+
- **Years 4-6 files**: Filenames containing "4" and ("5" or "6") → processes Years 4, 5, and 6
86+
- **Unknown files**: If detection fails, processes all year groups (Reception through Year 6)
87+
88+
## 📝 Original Node.js Version
89+
90+
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.
91+
92+
## 🚀 Deployment
93+
94+
This application is automatically deployed to GitHub Pages when changes are pushed to the main branch. The deployment is handled by GitHub Actions.
95+
96+
### Setting up GitHub Pages for your fork:
97+
98+
1. Fork this repository
99+
2. Go to your repository settings
100+
3. Navigate to "Pages" in the sidebar
101+
4. Set source to "GitHub Actions"
102+
5. Your site will be available at `https://yourusername.github.io/valley-disco`
103+
104+
## 🔒 Privacy & Security
105+
106+
- All data processing happens locally in your browser
107+
- No data is uploaded to any server
108+
- Your CSV files never leave your computer
109+
- The application works completely offline after initial load
110+
111+
## 📄 License
112+
113+
This project is licensed under the ISC License.
114+
115+
## 🤝 Contributing
116+
117+
Contributions are welcome! Please feel free to submit a Pull Request.
118+
119+
## 📞 Support
120+
121+
If you encounter any issues or have questions, please open an issue on GitHub.

0 commit comments

Comments
 (0)