[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) # truant Version 1.2.0 `truant` is a command-line program that can take a [CSV](https://en.wikipedia.org/wiki/Comma-separated_values) file containing attendance data exported from [Canvas](https://www.instructure.com/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: ```csv 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](https://wp.geneseo.edu/etc/techtipthursday-interpreting-attendance-data-in-canvas/) (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](https://www.rust-lang.org), so you need a [Rust compiler installed on your machine](https://www.rust-lang.org/tools/install). 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`](https://doc.rust-lang.org/cargo/) is pretty clever and can probably [put it anywhere you like](https://doc.rust-lang.org/cargo/commands/cargo-install.html). ## 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](https://en.wikipedia.org/wiki/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](https://www.gnu.org/licenses/gpl-3.0.html) 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](https://www.instructure.com/) (the developer and publisher of Canvas). Last Modified: 2024-05-19T15:57:01:-0500