My university wants my thesis title page to be formatted in a certain way (see left image below) and I was able to do it in LaTeX (see right image below):
I used the following LaTeX code to do the formatting:
\begin{titlepage}
\begin{center}
\textsc{\Large Title of Thesis or Dissertation}\\[0.5cm]
% Title
\HRule \\[0.4cm]
{ \huge \bfseries FIRST LAST NAME \\ Hometown and State \\[0.4cm] }
\HRule \\[1.5cm]
\begin{minipage}{0.8\textwidth}
\centering
\large
\emph{Previous degree \textsc{DEPARTMENT}}\\
ALMAMATER, YEAR
\end{minipage}
\vspace{3cm}
A Dissertation presented to the Graduate Faculty of the UNIVERSITY NAME in Candidacy for the Degree of Doctor of Philosophy
\vfill
Department
UNIVERSITY NAME\\
EXPECTED GRADUATION DATE
\end{center}
\end{titlepage}
However, I would like to go a step further and make some sort of template that I can give to the university that parametrizes the details. I know how to do this in common object-oriented languages like C++ and Python, but I don't even know where to begin in LaTeX.
The pseudo code for what I'm looking for would allow a user to create the title page like the following:
import university_thesis_style_template
\thesis_university_name{CURRENT_UNIV}
\thesis_title{TITLE}
\thesis_author{AUTHOR_NAME}
\thesis_almamater{DEGREE}{UNIV}{YEAR}
\thesis_almamater{DEGREE2}{UNIV2}{YEAR2}
\thesis_department{DEPT_NAME}
\thesis_graduationdate{GRAD_DATE}
which would output the code above. Can anyone help me make and install the "package" that would allow me to set this up?

\Hruleis straight from the former version of the wikibooks page and can still be found on L-templates and other sources of bad code. – Johannes_B Feb 08 '16 at 15:19\Hrulething has nothing to do with the question. That you cannot define a title page that will duit every institution should be obvious. – Johannes_B Feb 08 '16 at 15:28