diff --git a/calendar/README.md b/calendar/README.md index e30d22c..3519bb8 100644 --- a/calendar/README.md +++ b/calendar/README.md @@ -1,25 +1,47 @@ -Rolling over to a new year -========================== +# Rolling over to a new year -Teaching calendar dates (LaTeX) -------------------------------- +## Initial setup -1. Set up teaching periods in `calendar_config.php`. -2. `make install` +Copy `teachingdates/config/config.yml` to `~/.config/generate_dates` and configure to suit. +## Teaching calendar dates (LaTeX) -Teaching calendar dates (XML) ------------------------------ +For example: -1. Go to `$TEACHING_SHARED/Authoring/XML`. -2. Set up teaching periods in `generate_calendar_dates.php`. -3. `make`. +```bash +python3 -m teachingdates --format latex --style calendar --teaching-period S1 > calendar_weeks.tex +``` -This should be better integrated one day! +or if you don’t want to type quite so much: +```bash +python3 -m teachingdates -f l -s c -t S1 > calendar_weeks.tex +``` -Lecture dates -------------- +Move `calendar_weeks.tex` to somewhere sensible in your user `texmf` tree. -1. Set up teaching period dates, and paper class offsets in `lecturedates_config.php`. -2. For each paper, run `generate_lecturedates.php` and write the output to the appropriate `.tex` file. +## Teaching calendar dates (XML) + +```bash +python3 -m teachingdates --format xml --teaching-period S1 > paper-calendar-dates.xml +``` + +Move `paper-calendar-dates.xml` into the `modules` directory of the XML framework. + +(Note: `--teaching-period` isn’t actually required, but the configuration code hasn’t yet been fixed to ignore it.) + +## Lecture dates + +For example: + +```bash +python3 -m teachingdates --format latex --style lecture --paper INFO201 --teaching-period S1 > lecturedates.tex +``` + +or if you don’t want to type quite so much: + +```bash +python3 -m teachingdates -f l -s l -p INFO201 -t S1 > lecturedates.tex +``` + +Move `lecturedates.tex` to wherever it’s needed.