|
1 | | -# Class Schedule Generator |
| 1 | +# Semester Class Sessions Calculator (by Group) |
2 | 2 |
|
3 | | -A simple web application that generates a PDF class schedule from user input. |
| 3 | +A simple, responsive web app to calculate how many class sessions and total hours you will teach per group during a semester. |
| 4 | +It supports weekly schedules, holidays, vacation periods (date ranges), and exports a detailed PDF report. |
| 5 | + |
| 6 | +## Features |
| 7 | + |
| 8 | +- Add multiple groups (e.g., `1022`, `1041`, etc.) |
| 9 | +- Define a weekly schedule per group (e.g., Monday 2h, Friday 1h) |
| 10 | +- Exclude: |
| 11 | + - Holidays (single dates) |
| 12 | + - Vacation periods (date ranges) |
| 13 | +- Generate an on-screen report: |
| 14 | + - Session list per group (date, weekday, hours) |
| 15 | + - Total sessions and hours per group |
| 16 | + - Grand total hours across all groups |
| 17 | +- Export a PDF report (jsPDF + autoTable) |
| 18 | +- Light/Dark mode toggle (☀️/🌙) with saved preference |
| 19 | +- Responsive layout for small and large screens (I'll try to improve it in later versions, promise!💜) |
4 | 20 |
|
5 | 21 | ## Quick Start |
6 | 22 |
|
7 | | -1. **Clone the repository** |
8 | | - ```bash |
9 | | - git clone https://github.com/<your-username>/class-schedule-generator.git |
10 | | - cd class-schedule-generator |
11 | | - ``` |
12 | | - |
13 | | -2. **Open the app** |
14 | | - - Simply double-click `index.html` to open it in your default browser. |
15 | | - - _Or_ serve it locally: |
16 | | - ```bash |
17 | | - npx serve . |
18 | | - ``` |
19 | | - |
20 | | -3. **Enter schedule data** |
21 | | - 1. Select **Semester Start** and **Semester End** dates. |
22 | | - 2. List **Holidays** in `YYYY-MM-DD` format, separated by commas. |
23 | | - 3. Fill in **Group** code (e.g., `1022`) and **Class Name** (e.g., `Calculus I`). |
24 | | - 4. Click **+ Add day** to define weekly meetings: |
25 | | - - Choose **Day of week**. |
26 | | - - Enter **Hours** for that day. |
27 | | - - Repeat for each meeting day. |
28 | | - |
29 | | -4. **Generate PDF** |
30 | | - - Click **Generate PDF**. |
31 | | - - Download will start automatically with your schedule. |
32 | | - |
33 | | -## What’s Included |
34 | | - |
35 | | -- `index.html`: Main application file. |
36 | | -- `LICENSE`: MIT License granting permission with credit requirement. |
37 | | -- **No build steps** or dependencies beyond a modern browser. |
| 23 | +### Option A) Run locally (no setup) |
| 24 | + |
| 25 | +1. Download or clone this repository. |
| 26 | +2. Open `index.html` in your browser (Chrome/Firefox/Safari). |
| 27 | + |
| 28 | +### Option B) Run with a local server (recommended) |
| 29 | + |
| 30 | +This avoids some browser restrictions and behaves closer to production. |
| 31 | + |
| 32 | +- Using Python: |
| 33 | + ```bash |
| 34 | + python -m http.server 8000 |
| 35 | + ``` |
| 36 | + Then open `http://localhost:8000` |
| 37 | + |
| 38 | +- Using Node (http-server): |
| 39 | + ```bash |
| 40 | + npx http-server . |
| 41 | + ``` |
| 42 | + Then open the provided local URL. |
| 43 | + |
| 44 | +## How to Use |
| 45 | + |
| 46 | +1. **Set the semester range** |
| 47 | + - Choose Start and End dates. |
| 48 | + |
| 49 | +2. **Add exclusions** |
| 50 | + - Add **holidays** as single dates. |
| 51 | + - Add **vacation periods** as date ranges. |
| 52 | + - These dates will be omitted from the final count. |
| 53 | + |
| 54 | +3. **Create groups** |
| 55 | + - Enter a group name. |
| 56 | + - Add one or more weekly schedule rows: |
| 57 | + - Select weekday |
| 58 | + - Enter hours per session |
| 59 | + - Click **Save group**. |
| 60 | + |
| 61 | +4. **Generate report** |
| 62 | + - Click **Calculate report** to view the full breakdown on screen. |
| 63 | + |
| 64 | +5. **Export PDF** |
| 65 | + - Click **Export PDF** to generate a downloadable report including: |
| 66 | + - Semester summary and exclusions |
| 67 | + - Summary table per group |
| 68 | + - Detailed session tables per group |
| 69 | + |
| 70 | +## PDF Export Notes |
| 71 | + |
| 72 | +- PDF generation runs entirely in the browser. |
| 73 | +- Powered by: |
| 74 | + - `jsPDF` |
| 75 | + - `jspdf-autotable` |
| 76 | + |
| 77 | +## Tech Stack |
| 78 | + |
| 79 | +- HTML + CSS + Vanilla JavaScript |
| 80 | +- jsPDF + autoTable (CDN) |
38 | 81 |
|
39 | 82 | ## Contributing |
40 | 83 |
|
41 | | -- Feel free to fork and submit pull requests. |
42 | | -- Keep credit in header and LICENSE intact. |
| 84 | +Contributions are welcome! Feel free to: |
43 | 85 |
|
44 | | -## License |
| 86 | +- Fork the repo |
| 87 | +- Create a feature branch |
| 88 | +- Submit a Pull Request |
45 | 89 |
|
46 | | -Distributed under the MIT License. |
47 | | -See `LICENSE` for details. |
| 90 | +If you fork or reuse the project, please provide **credit** by referencing this repository in your fork and/or documentation. |
| 91 | +(And if you improve it, even better: PRs are appreciated. 😄) |
48 | 92 |
|
49 | | ---- |
| 93 | +## License |
50 | 94 |
|
51 | | -*Developed by ArantxaGC © 2025* |
| 95 | +MIT License. See `LICENSE` for details. |
0 commit comments