There are a few options when it comes to deciding how you will download/run the exam generator software, and subsequently typeset the generated
- Download the Exam Generator source code and directory structure.
- (a) Recommended approach (slightly more complex to set up than option b, but will allow you to receive future software updates more easily): Download/install/configure GitHub Desktop.
- (b) Alternative approach (less complex to set up than option a, but will be trickier to access future software updates): Download repository from GitHub.
- Download/install/configure Python if you don't already have Python installed.
- Download/install Python dependencies.
- Set up
$\LaTeX$ either on your own computer or via an online account with Overleaf.- (a) If you already have a
$\LaTeX$ editor installed on your computer, feel free to use it. If not, - (b) Recommended approach: Get started with LaTeX using Overleaf.
- (a) If you already have a
- Run the Python script.
- Generate .pdfs using LaTeX.
This task only needs to be done once (but NB the very last step-- 5d for Windows users / 6d for Mac users).
- Go to https://desktop.github.com/ and download the latest version via the big purple button:

- Run the installer by double-clicking the .exe file (probably named something like
GitHubDesktopSetup-x64.exe) in your Downloads folder. - GitHub Desktop should install itself and then automatically open when it’s done.

-
At this point you’ll need to sign in with your GitHub credentials.
- (a) If you don’t yet have an account, you can click the "Create your free account" link or set one up via the "Sign Up" button in the top right corner at https://github.com/. When it starts asking you questions about who you’re working with, what you’ll be using it for, etc, you can just click "skip personalization" at the bottom of the screen.
- (b) Once your account is up and running, flip back to GitHub Desktop and sign in via the "Sign in to GitHub.com" button. You’ll be asked to sign in via web browser and then authenticate GitHub Desktop. You should now be logged in via the GitHub Desktop window.
-
Finally, you’ll need to configure GitHub Desktop to access the Exam Generation code so that you can run it (and keep it up-to-date) on your machine. In GitHub Desktop...
- (a) Click "Clone a repository from the internet" on the welcome screen.
- (b) Click the "URL" tab.
- (c) Copy and paste kvesik/examgeneration into the top field ("Repository URL or GitHub username and repository"), and in the bottom field ("Local path") select a folder for the code to live in on your computer. Click "Clone."
- (d) Clicking the "Fetch Origin" button at the top right is what refreshes your local copy of the code with any recent updates that have been made by the programmers. If it changes to "Pull Origin" after you click "Fetch Origin" you should click it again. "Fetch" checks to see if there are any updates, and "Pull" means there are in fact new updates that do need to be downloaded onto your computer.
You should open GitHub Desktop and fetch/pull every once in a while (monthly, maybe?). Other than that, though, you likely won’t need to use GitHub Desktop for much.
- Go to https://desktop.github.com/ and download the latest version via the big purple button:

- Unzip the installer by double-clicking the .zip file (probably named something like
GitHubDesktop-x64.zip) in your Downloads folder. - Once it has unzipped, double-click the GitHub Desktop.app file.
- GitHub Desktop should install itself and then automatically open when it’s done.

- At this point you’ll need to sign in with your GitHub credentials.
- (a) If you don’t yet have an account, you can click the "Create your free account" link or set one up via the "Sign Up" button in the top right corner at https://github.com/. When it starts asking you questions about who you’re working with, what you’ll be using it for, etc, you can just click "skip personalization" at the bottom of the screen.
- (b) Once your account is up and running, flip back to GitHub Desktop and sign in via the "Sign in to GitHub.com" button. You’ll be asked to sign in via web browser and then authenticate GitHub Desktop. You should now be logged in via the GitHub Desktop window.
- Finally, you’ll need to configure GitHub Desktop to access the Exam Generation code so that you can run it (and keep it up-to-date) on your machine. In GitHub Desktop...
- (a) Click "Clone a repository from the internet" on the welcome screen.
- (b) Click the "URL" tab.
- (c) Copy and paste kvesik/examgeneration into the top field ("Repository URL or GitHub username and repository"), and in the bottom field ("Local path") select a folder for the code to live in on your computer. Click "Clone."
- (d) Clicking the "Fetch Origin" button at the top right is what refreshes your local copy of the code with any recent updates that have been made by the programmers. If it changes to "Pull Origin" after you click "Fetch Origin" you should click it again. "Fetch" checks to see if there are any updates, and "Pull" means there are in fact new updates that do need to be downloaded onto your computer.
You should open GitHub Desktop and fetch/pull every once in a while (monthly, maybe?). Other than that, though, you likely won’t need to use GitHub Desktop for much.
This task only needs to be done once.
-
Go to https://github.com/kvesik/examgeneration, click on the green "Code" button on the right, and select "Download ZIP" from the menu that opens.
-
Save the .zip archive to the folder where you'd like the Exam Generation software to live on your computer.
-
Extract the .zip archive.
This task only needs to be done once.
- Go to https://www.python.org/downloads/ and download the latest version as per the big yellow button (3.11.1 in this case):

- Run the installer by double-clicking the .exe file (probably named something like
python-3.11.1-amd64.exe) in your Downloads folder. BUT WAIT! ... - Make sure the two boxes below are checked, then click "Install Now":

- Python should install itself and then display a success message.
- Go to https://www.python.org/downloads/ and download the latest version as per the big yellow button (3.9.4 in this case):

- Run the installer by double-clicking the package file (probably named something like
python-3.11.1-macos11.pkg) in your Downloads folder. - Proceed through the installation.
- Python should install itself and then display a success message.
This task only needs to be done once, unless there is a big update to the software that references new code packages.
- Using Windows file explorer, navigate to the
examgenerationfolder where you saved the GitHub repository in Section I or II above. - Hold down the Shift key while you right-click on the
srcfolder. - Choose "Open PowerShell window here" from the menu that pops up.
- At this point the prompt in the PowerShell window should end with
\examgeneration\src>. If it does not, you can either navigate downward by typing e.g.cd srcor upward by typingcd ..
- At this point the prompt in the PowerShell window should end with
- Type or copy & paste
pip install --upgrade pipat the prompt and hit Enter. - Once the upgrade is done, type or copy & paste
pip install -r ../requirements.txtand hit Enter. The corresponding installs might take a couple of minutes but not too long. These are the other code packages that the ExamGeneration script depends on in order to run properly. - Once these packages are installed, you can close the PowerShell window.
- Using Finder, navigate to the
examgenerationfolder where you saved the GitHub repository in Section I or II above. - Right-click on the
srcfolder. - Choose "New Terminal at Folder" from the menu that pops up.
- At this point the prompt in the PowerShell window should end with
\examgeneration\src>. If it does not, you can either navigate downward by typing e.g.cd srcor upward by typingcd .. - If you don't see the "New Terminal at Folder" option, see this video on how to enable it.
- At this point the prompt in the PowerShell window should end with
- Type or copy & paste
pip install --upgrade pipat the prompt and hit Return. - Once the upgrade is done, type or copy & paste
pip install -r ../requirements.txtand hit Return. The corresponding installs might take a couple of minutes but not too long. These are the other code packages that the ExamGeneration script depends on in order to run properly. - Once these packages are installed, you can close the Terminal window.
This task only needs to be done once.
- Go to overleaf.com and click "Register" at the top right.
- Follow the steps to create an account.
- You'll be uploading the contents of your
examgeneration/exams/folder (including theimages/subfolder to an Overleaf project once you've run the Python script as per Section VI below. - Once you've uploaded those files and opened the project, you'll select the .tex file you want to typeset from the menu on the left, and then click the green "Recompile" button near the top of the right-hand side of the screen.
This task needs to be done each time you want to generate a new set of exams, followed by task VII.
- Make sure you have set up your config files, question database, student list, etc according to the guidelines in the main Readme document.
- Using Windows file explorer, navigate to the
examgenerationfolder where you saved the GitHub repository in Section I or II above. - Hold down the Shift key while you right-click on the
srcfolder. - Choose "Open PowerShell window here" from the menu that pops up.
- At this point the prompt in the PowerShell window should end with
\examgeneration\src>. If it does not, you can either navigate downward by typing e.g.cd srcor upward by typingcd ..
- At this point the prompt in the PowerShell window should end with
- Type
python generateexams.pyand press Enter (or you might have to trypython3 generateexams.pyif the first attempt doesn’t work). - The script does not have a GUI (Graphical User Interface); you will interact with in the PowerShell window, via the keyboard. Follow the directions provided in PowerShell.
- Make sure you have set up your config files, question database, student list, etc according to the guidelines in the main Readme document.
- Using Finder, navigate to the
examgenerationfolder where you saved the GitHub repository in Section I or II above. - Right-click on the
srcfolder. - Choose "New Terminal at Folder" from the menu that pops up.
- At this point the prompt in the PowerShell window should end with
\examgeneration\src>. If it does not, you can either navigate downward by typing e.g.cd srcor upward by typingcd ..
- At this point the prompt in the PowerShell window should end with
- Type
python generateexams.pyand press Return (or you might have to trypython3 generateexams.pyif the first attempt doesn’t work). - The script does not have a GUI (Graphical User Interface); you will interact with in the Terminal window, via the keyboard. Follow the directions provided in Terminal.
This task needs to be done each time you want to generate a new set of exams, following task VI.
If you already have
However, if you are new to
-
Select the exam folder and the
imagesfolder generated in task VI and compress them into a .zip file. -
Log into Overleaf.
-
Click "New Project" at the top left, and select "Upload Project" from the menu that appears.
-
Select or drag into Overleaf the .zip file you just created.
-
You will likely see some errors on the right-hand side of the page. In order to succesfully compile the .tex files into .pdf files, click the Menu button at the top left of the page and select "XeLaTex" in the Compiler menu under Settings.
-
Click back in the main part of the project window, select your desired .tex file (question bank? exam? instructor copy?) in the list on the left-hand side, and click "Recompile" at the top right of the page. You should now see a formatted document on the right-hand side of the screen. You can download this to your computer by clicking the "Download PDF" button above the document.
Anytime you regenerate new exam .tex files using the python script on your computer, you can choose to either update this existing Overleaf project or simply create a new one again as per the instructions above. Your choise might depend on whether you want to keep the exam files organized in Overleaf as well, or use it solely for generating the .pdf files which you then store back on your local machine.




