You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Readme.md
+31-14Lines changed: 31 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,37 @@
2
2
3
3
## Usage Examples
4
4
5
+
### Grade Notifier with Docker
6
+
7
+
This docker container will check your grade every hour and send a notification mail, if something has changed. Currently this docker container is very tailored for DHBW-Mannheim students. But feel free to broaden its usability with a PR.
8
+
9
+
3 Environment variables are needed:
10
+
11
+
*`USERNAME`: Your student mail address with the domain part. That is also used to login to CampusNet (Dualis)
12
+
*`VPNUSERNAME`: Your username without the domain part. Used for the login with Anyconnect VPN, to send mails.
13
+
*`PASSWORD`: Your account password. Used for VPN, Campusnet and Mail authentication.
14
+
* Optional `NOTIFY_RECIPIENT`: Mail address that will receive notifications. By default the same as `USERNAME`.
15
+
16
+
```
17
+
docker run --privileged -e "USERNAME=s212689@student.dhbw-mannheim.de" -e "VPNUSERNAME=s212689" -e "PASSWORD=xxxxxxxxxxxxxxxx" ghcr.io/tinf21cs1/campusnet-grade-notifier
18
+
```
19
+
20
+
[Detailed Readme](./grades-docker/Readme.md)
21
+
22
+
### Python Package
23
+
24
+
You can also use CampusNet.py as an imported Package to interact in detail with CampusNet.
25
+
26
+
```python
27
+
$ python
28
+
>>>from CampusNet import*
29
+
>>> s = CampusNetSession("s***REMOVED***@student.dhbw-mannheim.de", "***REMOVED***")
The `print_exams_as_table.py` script that is included in this repository will easily retrieve all Exams for a user and print them in a pretty table. This makes a quick overview very easy.
This package is still work in progress. If you need data from CampusNet, that is currently not retrieved by it, please feel free to open an Issue or even PR for it.
docker run --privileged -e "USERNAME=s212689@student.dhbw-mannheim.de" -e "VPNUSERNAME=s212689" -e "PASSWORD=xxxxxxxxxxxxxxxx" 9cccf8dd9ca9
1
+
# Campusnet Grade Notifier
2
+
3
+
This docker container will check your grade every hour and send a notification mail, if something has changed. Currently this docker container is very tailored for DHBW-Mannheim students. But feel free to broaden its usability with a PR.
4
+
5
+
## Usage
6
+
7
+
3 Environment variables are needed:
8
+
9
+
*`USERNAME`: Your student mail address with the domain part. That is also used to login to CampusNet (Dualis)
10
+
*`VPNUSERNAME`: Your username without the domain part. Used for the login with Anyconnect VPN, to send mails.
11
+
*`PASSWORD`: Your account password. Used for VPN, Campusnet and Mail authentication.
12
+
* Optional `NOTIFY_RECIPIENT`: Mail address that will receive notifications. By default the same as `USERNAME`.
13
+
14
+
```
15
+
docker run --privileged -e "USERNAME=s212689@student.dhbw-mannheim.de" -e "VPNUSERNAME=s212689" -e "PASSWORD=xxxxxxxxxxxxxxxx" ghcr.io/tinf21cs1/campusnet-grade-notifier
16
+
```
17
+
18
+
`--privileged` is needed for the VPN connection.
19
+
20
+
## Process
21
+
22
+
On startup a VPN connection to `drogon.dhbw-mannheim.de` is established to allow for sending mails with SMTP.
23
+
24
+
Every hour a cronjob will connect to CampusNet and download the latest grades. These will be compared to the last known state, that is saved in `/app/grades.txt`
25
+
26
+
If something changed, sendmail is used to send the diff to the `NOTIFIER_RECIPIENT`, via `studgate.dhbw-mannheim.de:25`, authenticated as `USERNAME`.
0 commit comments