Skip to content

Commit c4d0b16

Browse files
Revamp README with detailed usage and features
Expanded the README to include clearer feature descriptions, step-by-step usage instructions in both English and Spanish, data model overview, PDF export details, and contribution guidelines. The update aims to improve onboarding for new users and contributors.
1 parent 8a23f24 commit c4d0b16

1 file changed

Lines changed: 129 additions & 68 deletions

File tree

README.md

Lines changed: 129 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,156 @@
1-
# Semester Class Sessions Calculator (by Group)
1+
# Semester Sessions Calculator 📚⏱️
22

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.
3+
A lightweight, single-file web app to calculate how many class sessions and hours you will have during a semester **per group**, automatically excluding **holidays** and **vacation periods**.
4+
It also generates a **PDF report** with all sessions, totals, and (optionally) **unit completion milestones** (e.g., _“Se completa Unidad 1”_).
55

6-
## Features
6+
---
77

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!💜)
8+
## ✨ Features
209

21-
## Quick Start
10+
- ✅ Add **multiple groups** with different weekly schedules (e.g., Mon 2h, Tue 2h, Fri 1h)
11+
- 🗓️ Define a **semester date range**
12+
- 🚫 Exclude:
13+
- 🎉 **Holidays** (single dates)
14+
- 🏖️ **Vacations** (date ranges)
15+
- 🧮 Generate a detailed **report per group**:
16+
- session list with dates
17+
- total sessions
18+
- total hours
19+
- cumulative hours
20+
- 📄 Export a **PDF** (browser-side) with:
21+
- summary table by group
22+
- full session tables per group
23+
- 🧩 Optional: **Units plan** per group to compute:
24+
- **“Se completa Unidad X”** date
25+
- whether hours **fit**, **fall short**, or **exceed** the unit plan
2226

23-
### Option A) Run locally (no setup)
27+
---
2428

25-
1. Download or clone this repository.
26-
2. Open `index.html` in your browser (Chrome/Firefox/Safari).
29+
## 🧠 Unit Completion (Curriculum Fit)
2730

28-
### Option B) Run with a local server (recommended)
31+
Many courses have a curriculum organized into units with assigned hours.
32+
This app can contrast:
2933

30-
This avoids some browser restrictions and behaves closer to production.
34+
- **Planned calendar hours** (your real sessions after exclusions)
35+
vs
36+
- **Required unit hours** (sum of units)
3137

32-
- Using Python:
33-
```bash
34-
python -m http.server 8000
35-
```
36-
Then open `http://localhost:8000`
38+
It then reports:
3739

38-
- Using Node (http-server):
39-
```bash
40-
npx http-server .
41-
```
42-
Then open the provided local URL.
40+
- 📌 **Se completa Unidad 1 / 2 / 3…** (date when cumulative hours reach each unit threshold)
41+
- ⚠️ **Faltan X horas** (not enough calendar hours to finish all units)
42+
-**Encaja exacto** (perfect match)
43+
- 🟡 **Sobran X horas fuera del plan** (extra hours you can use for review, exams, projects, contingencies)
4344

44-
## How to Use
45+
---
4546

46-
1. **Set the semester range**
47-
- Choose Start and End dates.
47+
## 🚀 Quick Start
4848

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.
49+
### Option A: Just open the file (recommended)
50+
1. Download or clone this repo
51+
2. Open `index.html` in your browser (Chrome, Firefox, Edge, Safari)
52+
53+
### Option B: Run a tiny local server (helps with some browser settings)
54+
```bash
55+
# Python 3
56+
python -m http.server 8000
57+
```
58+
Then open:
59+
- http://localhost:8000
5360

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**.
61+
---
6062

61-
4. **Generate report**
62-
- Click **Calculate report** to view the full breakdown on screen.
63+
## 🧭 How to Use (English)
6364

65+
1. **Set semester range**
66+
- Choose `Start` and `End` dates.
67+
2. **Add exclusions**
68+
- Add **holidays** (single dates)
69+
- Add **vacations** (start/end ranges)
70+
3. **Add a group**
71+
- Name the group (e.g., `1022`)
72+
- Add weekly schedule rows (weekday + hours)
73+
- (Optional) Add **units** (name + hours)
74+
- Click **Save group**
75+
4. **Calculate**
76+
- Click **🧮 Calculate**
6477
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
78+
- Click **📄 PDF**
79+
80+
---
81+
82+
## 🇲🇽 Instrucciones rápidas (Español) 😄
83+
84+
1) **Define el semestre** 🗓️
85+
- Captura la fecha de **inicio** y **fin**.
86+
87+
2) **Agrega exclusiones** 🚫
88+
- Festivos 🎉 (fecha suelta)
89+
- Vacaciones 🏖️ (rango de fechas)
90+
91+
3) **Registra un grupo** 👩‍🏫
92+
- Nombre del grupo (ej. `1042`)
93+
- Horario semanal (día + horas) ⏱️
94+
- (Opcional) Plan de **unidades** (Unidad 1: 20h, Unidad 2: 24h…) 🧩
95+
96+
4) **Calcula** 🧮
97+
- El reporte mostrará sesiones, horas y acumulado.
98+
99+
5) **Revisa “Se completa Unidad X”**
100+
- Verás la fecha en que se completa cada unidad (si capturaste unidades).
101+
102+
6) **Exporta el PDF** 📄
103+
- Incluye tablas por grupo, resumen y unidades.
104+
105+
---
106+
107+
## 🗂️ Data Model (Conceptual)
108+
109+
Each group is stored roughly as:
110+
111+
- `name`: string
112+
- `schedule`: list of `{ weekday, hours }`
113+
- `units` (optional): list of `{ name, hours }`
114+
115+
Session generation is chronological:
116+
117+
- A date becomes a session if:
118+
1) it matches a scheduled weekday, and
119+
2) it is **not** excluded by holidays/vacations.
120+
121+
Unit completion is computed by cumulative hours reaching each unit threshold.
122+
123+
---
124+
125+
## 📄 PDF Export Details
126+
127+
The PDF is generated entirely in the browser using:
128+
129+
- **jsPDF**
130+
- **jsPDF-AutoTable**
131+
132+
No server required ✅
69133

70-
## PDF Export Notes
134+
---
71135

72-
- PDF generation runs entirely in the browser.
73-
- Powered by:
74-
- `jsPDF`
75-
- `jspdf-autotable`
136+
## 🤝 Contributing
76137

77-
## Tech Stack
138+
Forks and contributions are welcome! 🎉
78139

79-
- HTML + CSS + Vanilla JavaScript
80-
- jsPDF + autoTable (CDN)
140+
- 🍴 You can freely **fork** this project and build on it.
141+
- ✅ Please **give credit** and reference the original project/repo when you share or publish derivatives.
142+
- 🧪 PRs are encouraged (bug fixes, UX improvements, new features, docs).
81143

82-
## Contributing
144+
---
83145

84-
Contributions are welcome! Feel free to:
146+
## 🧾 License (MIT)
85147

86-
- Fork the repo
87-
- Create a feature branch
88-
- Submit a Pull Request
148+
This project is licensed under the **MIT License**.
149+
You are free to use, modify, and distribute it, including commercially, under the terms of the license.
89150

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. 😄)
151+
---
92152

93-
## License
153+
## 🙌 Credits
94154

95-
MIT License. See `LICENSE` for details.
155+
Created and maintained by the project authors and community contributors.
156+
If you build something cool with it, consider sharing it back as a PR. 🚀

0 commit comments

Comments
 (0)