An open API service indexing awesome lists of open source software.

https://github.com/piotrpdev/wit-timetable-generator

Uses Puppeteer to automatically fill out the WIT Timetable Page and generate a screenshot and PDF of the timetable.
https://github.com/piotrpdev/wit-timetable-generator

institute schedule setu technology timetable waterford wit

Last synced: 3 months ago
JSON representation

Uses Puppeteer to automatically fill out the WIT Timetable Page and generate a screenshot and PDF of the timetable.

Awesome Lists containing this project

README

        

# WIT Timetable Generator

![Example](.github/example/example.png)

Uses [Puppeteer](https://pptr.dev/) to automatically fill out the [WIT Timetable Page](http://studentssp.wit.ie/Timetables/StudentGroupTT.aspx) and generate a screenshot and PDF of the timetable. It can also send these to a [Discord](https://discord.com/) channel using a [webhook](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks).

## Why?

Filling out the form every time is annoying, especially since it refreshes.

## How do I use it?

> Make sure you have [Node](https://nodejs.org/en/) installed.

* Clone the repo and `cd` into it.
* `npm i`
* Fill out your details in `.env.local.example` and rename it to `.env`
* Change `SKIP_DISCORD` in the `.env` file if you want to use Discord webhooks:

```js
SKIP_DISCORD=0
```

* `npm run start`
* The timetable should be in the `screenshots` and `pdfs` folder.

## Resources used

* [https://stackoverflow.com/a/62892482](https://stackoverflow.com/a/62892482)
* [https://github.com/lannonbr/puppeteer-screenshot-action](https://github.com/lannonbr/puppeteer-screenshot-action)
* [https://birdie0.github.io/discord-webhooks-guide/](https://birdie0.github.io/discord-webhooks-guide/)
* [https://github.com/nektos/act/issues/588#issuecomment-1078427722](https://github.com/nektos/act/issues/588#issuecomment-1078427722)

## How do I contribute?

If it is something small, make a change directly and make a pull request.

If it is something that requires testing:

* Install [act](https://github.com/nektos/act).
* Rename `env.local.example` to `env.local`
* Run `act --secret-file .env.local workflow_dispatch` to test changes.

## License

Licensed under the MIT license.