problem set generator
1# Problem set generator
2
3API to generate random problem sets by subject.
4WIP for now.
5
6
7## Format
8
9GET request that will return a `application/pdf`, with generated questions, and page of answers.
10
11Path would be `https://$url/<Subject>/<Theme>/<Option<Pages>>`
12
13- `Subject` being Math or Physics,
14- `Theme` breakdown by subject, representing a single chapter in Mechanics by taylor or
15Multivariable Calculus by Stewart.
16- `Pages` optional how many pages you would like, default being 1.
17- On error, a string with api documentation would be returned? (openapi generated docs would be nice)
18
19## Goals
20- [ ] Create handler function to extract problem request parameters
21- [ ] Write a question bank by chapter (separate functions to build questions on startup)
22- [x] Write question text parser,
23- [x] Write a number generator for questions ( variables encoded in question text with `{{ }}` potentially?)
24- [ ] Port axum to run on [shuttle.dev](https://www.shuttle.dev/)
25- [ ] Write a front-end page with a basic form that would open a new tab with the pdf requested on [my website](https://tangled.org/sevenpigeons.ca/sevenpigeons.ca)
26
27## Questions
28
29Questions are represented by a `struct` with it's subject, theme, text of the questions, array of min/max values for varibales, and the closure expression for the answer.
30
31
32Since there is an `impl Fn` for now the questions cant really be static so need to be created with a function during runtime.
33
34## Fonts
35
36~I am not sure about distributing Roboto font for now, please add~
37I read the license yes I can, the Roboto font is under the Open Font License.
38
39In the `fonts` folder, please find the following ttf files:
40
41- `Roboto-Bold.ttf`
42- `Roboto-BoldItalic.ttf`
43- `Roboto-Italic.ttf`
44- `Roboto-Regular.ttf`
45
46If you wish to change the font, you will have to provide `Bold, BoldItalic, Italic`,and `Regular` ttf files of the font you'd like to use.