\paragraph{Abstract}

% What's the problem?
% Why is it a problem? Research gap left by other approaches?
% Why is it important? Why care?
% What's the approach? How to solve the problem?
% What's the findings? How was it evaluated, what are the results, limitations, 
% what remains to be done?

This program provides a command-line interface for Canvas.
The command is \texttt{canvaslms} and it has several subcommands in the same 
style as Git.
\texttt{canvaslms} provides output in a format useful for POSIX tools, this 
makes automating tasks much easier.

Let's consider how to grade students logging into the student-shell SSH server.
We store the list of students' Canvas and KTH IDs in a file.
\begin{minted}{text}
canvaslms users -c DD1301 -s | cut -f 1,2 > students.csv
\end{minted}
Then we check who has logged into student-shell.
\begin{minted}[firstnumber=2]{text}
ssh student-shell.sys.kth.se last | cut -f 1 -d " " | sort | uniq \
  > logged-in.csv
\end{minted}
Finally, we check who of our students logged in.
\begin{minted}[firstnumber=4]{text}
for s in $(cut -f 2 students.csv); do
  grep $s logged-in.csv && \
\end{minted}
Finally, we can set their grade to P and add the comment \enquote{Well done!} 
in Canvas.
We set the grades for the two assignments whose titles match the regular 
expression \texttt{(Preparing the terminal|The terminal)}.
\begin{minted}[firstnumber=6]{text}
    canvaslms grade -c DD1301 -a "(Preparing the terminal|The terminal)" \
      -u $(grep $s students.csv | cut -f 1) \
      -g P -m "Well done!"
done
\end{minted}

