Update README.md
This commit is contained in:
parent
70a4ca18ca
commit
2b33b4719d
86
README.md
86
README.md
@ -2,60 +2,52 @@
|
||||
|
||||
ib-clearance is a program which helps schools manage the entrance and exiting of their IB students. Due to the unique nature of IB students' timetables, the program helps check individual timetables and give clearance to students who have finished for the day.
|
||||
|
||||
### Building
|
||||
## Building
|
||||
|
||||
The code is currently designed to run on Python 3.6.*.
|
||||
|
||||
I recommend building executables with `pyinstaller` with `pyinstaller --onefile ib-clearance.py`.
|
||||
|
||||
### Lesson IDs
|
||||
## Database specification
|
||||
|
||||
Equivalents of lesson names for use in class databases.
|
||||
The program requires sqlite databases for each class.
|
||||
|
||||
- Academic Writing
|
||||
- 'aw'
|
||||
- Biology
|
||||
- 'bi'
|
||||
- Business Management
|
||||
- 'bm'
|
||||
- Chemistry
|
||||
- 'ch'
|
||||
- Computer Science
|
||||
- 'cs'
|
||||
- Economics
|
||||
- 'ec'
|
||||
- English A
|
||||
- 'ena'
|
||||
- English B
|
||||
- 'enb'
|
||||
- French
|
||||
- 'fr'
|
||||
- Geography
|
||||
- 'ge'
|
||||
- German
|
||||
- 'de'
|
||||
- Guidance
|
||||
- 'gu'
|
||||
- Mathematical Studies
|
||||
- 'mst'
|
||||
- Mathematics HL
|
||||
- 'mhl'
|
||||
- Mathematics SL
|
||||
- 'msl'
|
||||
- Polish A
|
||||
- 'pl'
|
||||
- Psychology
|
||||
- 'ps'
|
||||
- Self-Taught Language A
|
||||
- 'st'
|
||||
- Spanish
|
||||
- 'es'
|
||||
- Theory of Knowledge
|
||||
- 'tok'
|
||||
- Turkish A
|
||||
- 'tr'
|
||||
- Visual Arts
|
||||
- 'va'
|
||||
Each database must contain:
|
||||
|
||||
| Table | Description |
|
||||
| ----------- | ---------------------------------------------------------- |
|
||||
| `students` | Contains students' names, ID numbers and class preferences |
|
||||
| `timetable` | Timetable information for class |
|
||||
|
||||
### `students`
|
||||
|
||||
| Column | Data type | Description |
|
||||
| ------ | --------- | --------------------------------- |
|
||||
| `id` | `INTEGER` | Student ID number used in program |
|
||||
| `g1` | `TEXT` | Group 1 subject ID |
|
||||
| `g2` | `TEXT` | Group 2 subject ID |
|
||||
| `g3` | `TEXT` | Group 3 subject ID |
|
||||
| `g4` | `TEXT` | Group 4 subject ID |
|
||||
| `g5` | `TEXT` | Group 5 subject ID |
|
||||
| `g6` | `TEXT` | Group 6 subject ID |
|
||||
| `name` | `TEXT` | Full name of student |
|
||||
|
||||
### `timetable`
|
||||
|
||||
| Column | Data type | Description |
|
||||
| ----------- | --------- | --------------------------------------------- |
|
||||
| `day` | `TEXT` | Day of the week (e.g. `monday`) |
|
||||
| `end_time` | `TEXT` | Ending time of lesson (e.g. `09:55`, `13:05`) |
|
||||
| `lesson_id` | `TEXT` | Subject ID of the lesson (e.g. `ena`) |
|
||||
|
||||
#### Subject IDs
|
||||
|
||||
Subject IDs may be anything, as long as consistency is maintained throughout the tables. There are two hard-coded IDs that are always taken by every student:
|
||||
|
||||
| Subject | ID |
|
||||
| ------------------- | ----- |
|
||||
| Theory of Knowledge | `tok` |
|
||||
| Guidance | `gu` |
|
||||
|
||||
## License
|
||||
|
||||
|
@ -72,7 +72,7 @@ def select_final_time(conn, day, id):
|
||||
OR g5 = lesson_id
|
||||
OR g6 = lesson_id
|
||||
OR lesson_id = 'gu'
|
||||
OR lesson_id = 'to'
|
||||
OR lesson_id = 'tok'
|
||||
WHERE id = ? AND day = ?
|
||||
ORDER BY end_time DESC
|
||||
LIMIT 1
|
||||
|
Reference in New Issue
Block a user