summaryrefslogtreecommitdiff
path: root/docs/projects/kanvas.md
blob: 9925460c13f2a0deb40b5f439a7070da71dc2ab3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# Kanvas

Note: this blogpost may be edited to reflect future changes in the
project. Current version is 0.1.1, released 2022-05-05.

## Background story

On April 3, 2022, my friend released a Canvas widget for the Wallpaper
Engine. That's neat, but there are three reasons I can't use it:

- I have to buy Wallpaper Engine for $4
- I have to own a Steam account
- I have to run Windows

And two more reasons why I *don't* use it:

- It syncs user data onto his server
- The traffic is unencrypted (He enabled TLS later)

So I went ahead to make one for my desktop environment, KDE Plasma. The
latest release is 0.1.1.

![Rectangular widget split vertically into "Announcements" and
"Assignments". An announcement is marked important, i.e. bold red. Several
are checked and stricken through. Each assignment has its due date shown
underneath.](img/kanvas/screenshot_0.1.1.png)

Nomenclature: an "activity" is either an announcement or an assignment.

## Download

- <del>[OpenDesktop Pling](https://www.pling.com/p/1783206/)</del> ← Pling
  suspended my account for some reason and have yet to reply to my email
- [Direct download](https://fkfd.me/static/kanvas-0.1.1.plasmoid)

## Features

- Automatically fetch course list (configurable)
- Mark an announcement/assignment as finished/important
- Open in browser
- Auto refresh
- Sensible due dates, e.g. Today, Tomorrow, Yesterday (oops), Friday

## Functionality

- Toggle a checkbox to strike out an activity.
- Click the eye button to open activity link in browser.
- Toggle warning sign to mark an important activity.
- Click "Refresh" to, you know, refresh.
- Both lists are automatically refreshed at a configurable interval.

## Disclaimer

At least once, Kanvas erroneously marked an assignment "Submitted". This
was because the assignment had its `has_submitted_submissions` set to true
in Canvas's API response despite the fact that it had never been touched.
I have no idea what is going on inside Canvas. Now that I've warned you,
it is *your responsibility* to double check whether an assignment is
actually submitted or not.

## Configuration

To use Kanvas, first you need to generate an OAuth2 token from Canvas
settings.

![An access token under section heading "Approved Integrations". A button
below is labeled "New Access Token".](img/kanvas/canvas_oauth2.png)

Fill your Canvas URL and the token into corresponding textboxes under the
Canvas config page.

![Canvas config page: textboxes labeled "Canvas URL", "OAuth2 Token",
an empty text area labeled "Courses", and a button labeled "Fetch
courses"](img/kanvas/config_canvas_1.png)

Click "Fetch Courses" and Kanvas will automatically download all courses
IDs and codes on record.

![Same page as before, but "Courses" is populated by several lines of
text.](img/kanvas/config_canvas_2.png)

The text area is formatted as:

```
[course id]<space>[course code]
[course id]<space>[course code]
[course id]<space>[course code]
...
```

where `course id` is numerical and `course code` may consist of arbitrary
characters.

You can remove courses you don't wish to see, e.g. from a finished
semester. You can also rename the course code, for brevity or whatever.

![This time "Courses" only contains two lines with a course ID and a short
course code each.](img/kanvas/config_canvas_3.png)

Of course I know this configuration method is far from ideal, but I'm just
too inexperienced with QML. I'll add that to my todo list.

As of version 0.1.1, you can set auto refresh interval, and whether to
show submitted assignments in the General config page.

![General config page: "Refresh interval" set to 10 minutes, checkbox
"Show submitted assignments"](img/kanvas/config_general.png)

## FAQ

Q: Did you name it Kanvas with a K for no reason?  
A: Yes.