= Stundenplan A small JavaScript project to generate beautiful PDF schedules. Takes information from `public/config.yaml`. == Usage Requires the `npm` tool. ```bash npm i # installes packages npm run main # runs the software ``` === Optional: Parse UnivIS XML You have the option to parse a full `public/data.xml` UnivIS export to get 80% of the way to a working configuration. You still have to manually clean up and refactor the information to yaml. But you dont have to write all those characters out. If you use vim, it then should be only a matter of seconds until you have your `.pdf`. ```bash npm run parse ``` == Configuration Structure Generally, you may edit anything in the `public` directory. The default are how I like it. To configure the actual displayed information you shoudl edit the `.yaml` file. It should look something like the following, where things like `` should be replaced by your text. Comments (things that are ignored by the software) is everything after a `#` sign. More information on the file format and syntax can be found https://yaml.org/[here]. ```yaml # General Information student: semester: filename: # i.e. Stundenplan_SS24.pdf # Each of these lines will be listed at the bottom of the PDF hinweise: - # i.e. "Mensabetrieb: 11:15 - 14:15 Uhr + 00:15 min" # Time definitions eintraege: - : : - [, , , ] ``` [NOTE] .Please note the following exceptions: ==== * `START TIME` and `END TIME` should be given in the format `HHhMM` so to say "1:02 PM", you would actually write `13h02`. * `WEEKDAY` should be given in abbreviated form without a dot. I.e. "Wednesday" becomes `Mi`. * The Module `STYLECLASS` is reserved for special stylized cases. So for example writing ```yaml # ... - STYLECLASS: BLOCK: # ... ``` would put a blocked area in the pdf, instead of putting an actual entry with the text "STYLECLASS / BLOCK". Under the hood it just takes the word "BLOCK" (which can really be any other) and assigns it to the coresponding times. This is then picked up by `public/style.css` (were I have defined what `.block` should look like) and styled accordingly. ==== == Known issues - Doesnt work if not all days are set (null checks in general) - Have to use the exact yaml structure - Margin on the left not easily configurable - Mensa times are not actually displayed - All config.yaml items are required - Code is german spaghetti