Support other project/type things

This commit is contained in:
2025-02-12 23:09:19 -05:00
parent d36bf79ee5
commit ee0248176b
4 changed files with 7 additions and 5 deletions

View File

@@ -0,0 +1,3 @@
# {{ cookiecutter.project_type }} {{cookiecutter.number}}
Find the source for this template [here](https://git.kitsunehosting.net/Kenwood/SNHU-LaTeX).

View File

@@ -0,0 +1,35 @@
#!/bin/bash
# Output File
ZIPFILE="{{ cookiecutter.project_type }} {{cookiecutter.number}}.zip"
# List of known LaTeX build artifacts to exclude
EXCLUDE_EXTENSIONS="*.aux *.log *.synctex.gz *.out *.toc *.bbl *.blg *.fls *.fdb_latexmk *.lof *.lot *.nav *.snm *.vrb"
# Generate list of files to include
find . -type f > all_files.txt
# Generate exclude list based on LaTeX build files
touch exclude_list.txt
for ext in $EXCLUDE_EXTENSIONS; do
find . -type f -name "$ext" >> exclude_list.txt
done
# Find PDFs that match a .tex filename and exclude them
while read -r texfile; do
base="${texfile%.tex}"
if [ -f "$base.pdf" ]; then
echo "$base.pdf" >> exclude_list.txt
fi
done < <(find . -type f -name "*.tex")
# Create the final list of files to include by filtering out excluded files
grep -vxFf exclude_list.txt all_files.txt > include_list.txt
# Create the zip archive
zip -@ "$ZIPFILE" < include_list.txt
# Clean up temporary files
rm -f all_files.txt include_list.txt exclude_list.txt
echo "Packaged files into $ZIPFILE"

View File

@@ -0,0 +1,23 @@
\documentclass[12pt{{ ", twocolumn" if cookiecutter.two_column_mode == "yes" else "" }}]{article}
\usepackage{ {{cookiecutter.professor}} }
% Set title page details
\reporttitle{ {{ cookiecutter.project_type }} {{cookiecutter.number}} }
\class{ {{cookiecutter.class}} }
\studentname{ {{cookiecutter.name}} }
\submissiondate{\today}
\universityname{Southern New Hampshire University}
\begin{document}
\maketitle
\exer[Question]{1}
\mpart{a}
Question 1, Part a
\revision{1}
\end{document}