Canvas TUI banner

Canvas TUI

18 devlogs
17h 32m 2s

A terminal UI for Canvas LMS. Contains most of the (student) features of the web UI, including submitting assignments, browsing modules, and sending/viewing messages.

Demo Repository

Loading README...

Trey

Demo!

The first github release was published, along with a demo video in the repo. It is also attached here. The demo is sped up in some places, most notably the upload files section, because my internet is really slow right now.

0
Trey

Inbox 2

You can now send messages! Also, messages are marked as read when you open them, this includes on the web UI. While this was already happening, the docs say that won’t be the default behavior forever, so the app now manually sets the parameter.

Other

Some minor wording was changed on

  • Initial/new instance setup
  • Announcement list page
0
Trey

Inbox

You can now view canvas messages, replying does not work yet, but that should be ready by next log.
It also shows the unread count on the instance dashboard now!

Other

  • We no longer crash the app when an unknown module item type is selected, we just provide a hint and return to the selection screen
  • Basic ExternalUrl type support was added, right now it just prints the url to the screen and returns.
0
Trey

Lights, camera, ACTION!

There is now a GitHub action to automatically build binaries, because building them locally kept erroring out. This also has the plus that I do not need to cross compile, they are built natively.

Other

  • Adding a submission comment now asks for confirmation
  • A ... was added to the grades exit text to match the other prompts
    and a few other code-only changes.
Attachment
0
Trey

Grades

The grade display works! It’s pretty basic because I can’t currently find an API to batch get individual grades. If I find one I’ll add it. This mirrors the web interface sidebar, the including ungraded section is what your grade would be if all your ungraded assignment suddenly became scored as 0.

Attachment
0
Trey

Announce!

You can now browse and view announcements. It’s view is the same as pages, and searches the same as assignments

Other

  • The course selection menu is now a fuzzy search
0
Trey

Submissions

I would have made a devlog sooner but my internet is bugging. You can now submit assignments from the tui! All 3 online submission types are included (excluding submission via an external tool, for obvious reasons). The demo video is pretty long, but it shows everything. I am the most proud of the file uploader, because for some reason the file upload api is really weird because of the many upload destinations. Anyway, all 4 file upload stages have been implemented as close to the documentation as I can.

Other

The submission type is now shown on the submission page.

0
Trey

Assignments pt 2

You can now get a searchable list of assignments in the assignments tab. This even works on instances where the assignments tab is disabled!

Other changes

  • The token input field is now a secret input, so your token is no longer outputted to the terminal.
  • The setup function now has a timeout set, so a dead server can no longer hang the program
0
Trey

Comments

You can now view/add comments to submissions. It also shows which attempt a comment was written for, which even the actual UI hides.

0
Trey

Assignments

You can now view assignments and submissions. You can view most of the things that you can in the UI, comments are not supported yet, but the button is there. Most formatting is supported, links and bold works. Colors, italics, and underlines seem to not be working. Everything else does.

0
Trey

Multi-instance support

I spent an hour getting my own canvas instance set up (not tracked), and now I can demo more features! The switch instances button also works now, so you can switch between accounts/servers with no problem. Each are cached individually.

Pages

You can now browse pages, with (mostly) working formatting!

0
Trey

I am not able to show much proof for this because I would like like to leak my canvas.

Modules

You can now browse canvas modules! There is a module selector, and you can scroll the list to find what you want. You can also select a module to view its contents (not shown).

Attachment
0
Trey

Slow and steady

A few more template pages are here now. You can browse your courses, they are organized in the same way as your dashboard, and there is a non-working course page.

Other

  • The dashboard now has the option to delete the cache

Log within a log

I started coding and forgot I had not submitted this log yet, so here is another! There are now back buttons on all pages, the home pages back button is labeled as change instance, because exiting should be done via ctrl+c

0
Trey

Caches!

Requests are now cached, and are saved into a cache json file. Individual requests are marked stale after 5 minutes, and the whole file is marked stale after two hours. I once again spent 15 minutes messing with dependencies, but this time it was my fault! I managed to make a circular import that I thought didn’t exist, and was confused as to why one file was getting all functions and the other was not. Anyway, the cache is not speeding up much, but the test was only ran on one simple endpoint (/api/v1/users/self), this should speed up heavier endpoints.

Attachment
0
Trey

just enough progress

Basically requests can be made now. If your token becomes invalid you are re-prompted for it (i cant demo it because i would not like to leak my api key). Anyway, after spending 20 minutes on a weird visual bug and then figuring out curses was the problem, the basic selection menu works now! It also retrieves your name and shows it on the selection screen, once again, not demoed.

0
Trey

Go(lang) away

In the interest of getting this project done in one week for the lockin sidequest, I have rewritten the whole thing in python. Anyway, you can now set up a canvas instance, it is saved into a file, and set as only readable to your user account (chmod 0o600). I obviously cannot show the whole thing (I don’t want to leak my canvas account), but it validates all input.

Attachment
0
Trey

Save states

I have decided I am going to try using bubble tea for a UI, I havent figured it out yet, but I managed to get it installed! Anyway, there is a save function now to be able to save json. I made this devlog late so some of the logged time is me trying to figure out the library.

Attachment
0
Trey

Beginnings

This is my first time using GO, so progress will be slow. Right now, I made a simple program that fetches a web server and returns json from it. The server it is fetching right now just returns {"ip": "whatever"}, but hopefully I will get something more useful next.

Attachment
0