From c533d2c1d579906924237e41b6d71e1601deecae Mon Sep 17 00:00:00 2001
From: davidpkj <davidpenkow1@gmail.com>
Date: Tue, 23 Apr 2024 21:45:37 +0200
Subject: mega commit: ics, readme updates, easier usage

---
 README.adoc | 33 +++++++++++++++++++++++++++------
 1 file changed, 27 insertions(+), 6 deletions(-)

(limited to 'README.adoc')

diff --git a/README.adoc b/README.adoc
index aff7c15..e1bd72c 100644
--- a/README.adoc
+++ b/README.adoc
@@ -1,6 +1,10 @@
 = Stundenplan
 
-A small JavaScript project to generate beautiful PDF schedules. Takes information from `public/config.yaml`.
+A small JavaScript project to generate beautiful PDF schedules and actually working Calendar Files. Takes information from `public/config.yaml`.
+
+"But why would anyone want this? UnivIS already does that!"
+
+In short: This does it better. You have precise control over how the end product looks, what it displays (on a very granular level) and technically even what format it should have. Though you would need to edit the source at `src/pdf.js` for that.
 
 == Usage
 
@@ -8,7 +12,15 @@ Requires the `npm` tool.
 
 ```bash
 npm i # installes packages
-npm run main # runs the software
+npm run pdf # runs the software and generates a .pdf
+```
+
+=== Optional: Generate ICS file
+
+You have the option to generate a calendar file, which you should be able to import into most calendar software. Works with moodle.
+
+```bash
+npm run ics # runs the software and generates a .ics
 ```
 
 === Optional: Parse UnivIS XML
@@ -25,15 +37,20 @@ npm run parse
 
 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 `<THIS>` should be replaced by your text.
+To configure the actual displayed information you shoudl edit the `.yaml` file. It should look something like the following, where things like `<THIS>` should be replaced by your text. An example is preconfigured at `public/config.yaml`.
 
 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: <YOUR NAME>
-semester: <THE SEMESTER>
-filename: <THE RESULT FILENAME> # i.e. Stundenplan_SS24.pdf
+semester: <SEMESTER>
+filename: <RESULT FILENAME> # i.e. Stundenplan_SS24
+
+# Is only needed for ICS export
+vorlesungszeit:
+  - <LECTURES START>
+  - <LECTURES END>
 
 # Each of these lines will be listed at the bottom of the PDF
 hinweise:
@@ -50,6 +67,10 @@ eintraege:
 .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`.
+* `LECTURES START` and `LECTURES END` are given in the format `YYYY-MM-DD` so to say "Apr. 23rd, 2024", you would actually write `2024-04-23`.
+* `LECTURES START` has to be a (the first) Monday.
+* `LECTURES END` has to be a the day after the last day of lectures.
+* `RESULT FILENAME` does not need an extension, as that is determined upon file creation.
 * `WEEKDAY` should be given in abbreviated form without a dot. I.e. "Wednesday" becomes `Mi`.
 * The Module `STYLECLASS` is reserved for special stylized cases.
 
@@ -73,5 +94,5 @@ This is then picked up by `public/style.css` (were I have defined what `.block`
 - 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
+- Most config.yaml items are required (no defaults)
 - Code is german spaghetti
-- 
cgit v1.2.3

