#canvas #attendance #terminal #cli

app truant

truant is a command-line program that can take a CSV file containing attendance data exported from Canvas and display it in a way that is easy to read and understand

2 stable releases

1.2.0 May 19, 2024
1.0.13 May 15, 2024

#778 in Command line utilities

Download history 9/week @ 2024-09-20 4/week @ 2024-09-27

62 downloads per month

GPL-3.0-or-later

22KB
97 lines

License: GPL v3

truant

Version 1.2.0

truant is a command-line program that can take a CSV file containing attendance data exported from Canvas and display it in a way that is easy to read and understand.

Say that again?

Canvas (the popular course management system) allows you to take attendance. It also allows you to view attendance data in several ways, and you can export a CSV file with entries like this:

246848,ENGL-230A-001.1234,ENGL-230A-001.1234,SHAKESPEARE
ENGL230A            SEC 001 Spring 2023,SHAKESPEARE
ENGL230A            SEC 001 Spring 2023,168353,ENGL-230A-001.1231,
82413,Stephen Ramsay,152891,Percy Henry,2023-01-24,present,
2023-01-24 18:34:35 UTC,""

What it does not allow you to do is hit a button and get something like this:

Aguecheek, Andrew: 8
Andronicus, Titus: 0
Percy, Henry: 1
Denny, Anthony: 4
Pembroke, William: 0
Urswick, Christopher: 2

Even getting that CSV file is a bit of a pain; you request it, it sends you a (long, complicated) link via email, and you download it from there.

People have devised clever workarounds. Some, for example, have written pivot tables in Microsoft Excel, while others have figured how to do the same with Google Sheets (from Google Drive).

I wanted something that just goes from the raw CSV file to the output above without the "corporate intermediaries," and that's what truant does. If you download the CSV file and rename it "attendance.csv," you can do something like this

$ truant attendance.csv

and it will give you something like the output above.

(You don't have to rename the file; truant doesn't care what the filename is, but the filename Canvas sends you is typically a bit...unwieldy. And no offense to the developers of these other methods. As I said, they're pretty clever. They may also be vastly more convenient for some users.)

How do I install this program?

This program is written in Rust, so you need a Rust compiler installed on your machine.

Assuming you have that taken care of, it'll be something like this:

$ cargo install truant

Exactly where that installs the binary depends on your local configuration, but cargo is pretty clever and can probably put it anywhere you like.

That's it?

Yep, that's it. That's all it does. I might create a version that can optionally export the displayed output as JSON, because that just seems like good citizenship. But I have no immediate plans to add this feature.

It doesn't work!

Please contact me. It's very unlikely that truant will destroy data or cause other kinds of damage, but names are very complicated and I am almost certainly not accounting for all possibilities in the name field. But I am interested in any kind of misbehavior, so by all means drop me a line at the address below.

Also, please be aware that that CSV file typically contains all manner of sensitive information. truant doesn't write or save any of it anywhere, but it makes no attempt to save you from yourself. It's just a plain old UNIX filter.

License

Speaking of destruction and damage . . .

truant is written and maintained by Stephen Ramsay (sramsay{at}protonmail{dot}com).

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

truant is neither endorsed by nor in any way affiliated with Instructure (the developer and publisher of Canvas).

Last Modified: 2024-05-19T15:57:01:-0500

Dependencies

~4.5–6.5MB
~106K SLoC