mirror of https://github.com/eyhc1/rendercv.git
create the initial project structure
This commit is contained in:
parent
c17f8c585a
commit
c240fe90b8
|
@ -0,0 +1,100 @@
|
|||
from pydantic import BaseModel, HttpUrl
|
||||
from pydantic_extra_types.phone_numbers import PhoneNumber
|
||||
from typing import Literal
|
||||
from datetime import date
|
||||
|
||||
class Organization(BaseModel):
|
||||
# 1) Mandotory user inputs:
|
||||
name: str
|
||||
# 2) Optional user inputs:
|
||||
url: HttpUrl
|
||||
|
||||
class Location(BaseModel):
|
||||
# 1) Mandotory user inputs:
|
||||
city: str
|
||||
country: str
|
||||
# 2) Optional user inputs:
|
||||
state: str
|
||||
|
||||
class Skill(BaseModel):
|
||||
# 1) Mandotory user inputs:
|
||||
name: str
|
||||
# 2) Optional user inputs:
|
||||
details: str
|
||||
|
||||
class Activity(BaseModel):
|
||||
# 1) Mandotory user inputs:
|
||||
organization: Organization
|
||||
position: str
|
||||
start_date: date
|
||||
end_date: date
|
||||
location: Location
|
||||
# 2) Optional user inputs:
|
||||
company_url: HttpUrl
|
||||
highlights: list[str]
|
||||
|
||||
class TestScore(BaseModel):
|
||||
# 1) Mandotory user inputs:
|
||||
name: str
|
||||
score: str
|
||||
# 2) Optional user inputs:
|
||||
url: HttpUrl
|
||||
details: str
|
||||
date: date
|
||||
|
||||
class Project(BaseModel):
|
||||
# 1) Mandotory user inputs:
|
||||
name: str
|
||||
start_date: date
|
||||
end_date: date
|
||||
location: Location
|
||||
# 2) Optional user inputs:
|
||||
url: HttpUrl
|
||||
highlights: list[str]
|
||||
|
||||
class WorkExperience(BaseModel):
|
||||
# 1) Mandotory user inputs:
|
||||
company: Organization
|
||||
position: str
|
||||
start_date: date
|
||||
end_date: date
|
||||
location: Location
|
||||
# 2) Optional user inputs:
|
||||
highlights: list[str]
|
||||
|
||||
class Education(BaseModel):
|
||||
# 1) Mandotory user inputs:
|
||||
institution: Organization
|
||||
study_type: str
|
||||
area: str
|
||||
location: Location
|
||||
start_date: date
|
||||
end_date: date
|
||||
# 2) Optional user inputs:
|
||||
gpa: str
|
||||
transcript_url: HttpUrl
|
||||
highlights: list[str]
|
||||
|
||||
class SocialNetwork(BaseModel):
|
||||
# 1) Mandotory user inputs:
|
||||
network: Literal["LinkedIn", "GitHub", "Twitter", "Facebook", "Instagram"]
|
||||
username: str
|
||||
url: HttpUrl
|
||||
|
||||
class CurriculumVitae(BaseModel):
|
||||
# 1) Mandotory user inputs:
|
||||
name: str
|
||||
# 2) Optional user inputs:
|
||||
email: str
|
||||
phone: PhoneNumber
|
||||
website: HttpUrl
|
||||
summary: str
|
||||
location: Location
|
||||
social_networks: list[SocialNetwork]
|
||||
education: list[Education]
|
||||
work_experience: list[WorkExperience]
|
||||
academic_projects: list[Project]
|
||||
extracurricular_activities: list[Activity]
|
||||
test_scores: list[TestScore]
|
||||
skills: list[Skill]
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
from jinja2 import Environment, FileSystemLoader
|
||||
|
||||
env = Environment(loader=FileSystemLoader("templates/"))
|
||||
template = env.get_template("template1.tex.j2")
|
|
@ -0,0 +1,81 @@
|
|||
\documentclass[10pt, a4paper]{memoir}
|
||||
|
||||
% ===========
|
||||
% ===========
|
||||
% USER INPUTS:
|
||||
\newcommand{\AUTHOR}{Sina Atalay}
|
||||
|
||||
\newcommand{\PRIMARYCOLOR}{0,79,144} % In RGB out of 255
|
||||
|
||||
\newcommand{\PageXMargin}{0.53in}
|
||||
\newcommand{\PageYMargin}{0.53in}
|
||||
|
||||
\newcommand{\TopMarginOfSections}{0.13cm}
|
||||
\newcommand{\BottomMarginOfSections}{0.13cm}
|
||||
|
||||
\newcommand{\YMarginBetweenEntries}{0.12cm}
|
||||
\newcommand{\YMarginBetweenBullets}{0.07cm}
|
||||
\newcommand{\LeftMarginOfBullets}{0.7cm}
|
||||
|
||||
\newcommand{\DateandLocationWidth}{3.7cm}
|
||||
% ===========
|
||||
% ===========
|
||||
|
||||
\input{preamble}
|
||||
|
||||
\begin{document}
|
||||
% Test out the 4 main entry types with the commands below:
|
||||
% \Header{a}{b}{c}{d}{e}{f}
|
||||
% \section{EducationEntry}
|
||||
% \EducationEntry{a}{b}{c}{d}{e}{f}{g}{j}
|
||||
% \section{ExperienceEntry}
|
||||
% \ExperienceEntry{a}{b}{c}{d}{e}{f}{g}{j}
|
||||
% \section{NormalEntry}
|
||||
% \NormalEntry{a}{b}{c}{d}{e}{f}
|
||||
% \section{OneLineEntry}
|
||||
% \OneLineEntry{a}{b}
|
||||
|
||||
% To create the header manually (insted of \Header command), use the code below:
|
||||
% \begin{header}[0pt]
|
||||
% \Huge
|
||||
% \textbf{\directlua{tex.print(json.basics.name)}}
|
||||
|
||||
% \normalsize
|
||||
% \faPhone\hspace{0.13cm}\directlua{tex.print(json.basics.phone)} \hspace{0.5cm}
|
||||
% \href{mailto:\directlua{tex.print(json.basics.email)}}{\faEnvelopeO\hspace{0.13cm}\directlua{tex.print(json.basics.email)}} \hspace{0.5cm}
|
||||
% \href{https://\directlua{tex.print(json.basics.url)}}{\faLaptop\hspace{0.13cm}\directlua{tex.print(json.basics.url)}} \hspace{0.5cm}
|
||||
% \href{https://www.linkedin.com/in/williamhgates}{\faLinkedin\hspace{0.13cm}williamhgates} \hspace{0.5cm}
|
||||
% \href{https://www.github.com/sinaatalay}{\faGithub\hspace{0.13cm}sinaatalay}
|
||||
% \end{header}
|
||||
|
||||
\directlua{require("parser.lua")}
|
||||
|
||||
\makeoddhead{headings}{}{}{\small\color{gray}\linespread{0}\emph{Last updated on {\printdayon\today}}\hspace*{0.2cm}}
|
||||
\directlua{printHeader()}
|
||||
|
||||
\section{Education}
|
||||
\directlua{printEducation()}
|
||||
|
||||
\section{Work Experience}
|
||||
\directlua{printExperience()}
|
||||
|
||||
|
||||
\section{Academic Projects}
|
||||
\directlua{printAcademicProjects()}
|
||||
|
||||
\section{Certificates}
|
||||
\directlua{printCertificates()}
|
||||
|
||||
\section{Skills}
|
||||
\directlua{printSkills()}
|
||||
|
||||
\section{Test Scores}
|
||||
\directlua{printTestScores()}
|
||||
|
||||
\section{Personal Projects (test)}
|
||||
\directlua{printPersonalProjects()}
|
||||
|
||||
\section{Extracurricular Activities}
|
||||
\directlua{printExtracurricularActivities()}
|
||||
|
||||
\end{document}
|
Loading…
Reference in New Issue