I need to convert students’ assignments submitted in .docx
into pdf
files. After downloading the assignment WORD files from Canvas-LMS, I use pandoc to convert them into PDF in the terminal.
I use a for
loop to iterate through each assignment, which will also be numbered in order.
Here is the one-line shell cammand code written by me:
n=0 && for assignment in *.docx; do let "n=n+1" && echo $n\.\.\.$assignment" [IS BEING CONVERTED…PLZ WAIT…]" && pandoc -s $assignment -o $n-$assignment.pdf --pdf-engine=xelatex -V mainfont:"DejaVu Serif"; done