Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhonas committed Feb 2, 2024
1 parent 916a288 commit 3fa9618
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 15 deletions.
51 changes: 45 additions & 6 deletions v2/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"lint": "next lint"
},
"dependencies": {
"fs": "^0.0.1-security",
"next": "14.1.0",
"react": "^18",
"react-dom": "^18",
Expand All @@ -19,9 +18,12 @@
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"angular-expressions": "^1.2.1",
"autoprefixer": "^10.0.1",
"docxtemplater": "^3.44.0",
"eslint": "^8",
"eslint-config-next": "14.1.0",
"pizzip": "^3.1.6",
"postcss": "^8",
"tailwindcss": "^3.3.0",
"typescript": "^5"
Expand Down
6 changes: 3 additions & 3 deletions v2/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const Header = () => {
const AboutSection = () => {
return (
<section className="mt-12">
<h2 className="text-3xl font-bold dark:text-white">What have you done?</h2>
<h2 className="text-3xl font-bold dark:text-white mb-8">What have you done?</h2>
<ul>
{resume.work.map(({ name, location, description }, index) => (
<li key={index}>{name}</li>
Expand All @@ -48,8 +48,8 @@ const AboutSection = () => {
const ProjectsSection = () => {
return (
<section className="mt-12">
<h2 className="text-3xl font-bold dark:text-white">Some of my Projects</h2>
<div className="mt-8 grid grid-cols-1 gap-8 sm:grid-cols-2">
<h2 className="text-3xl font-bold dark:text-white mb-8">Some of my Projects</h2>
<div className="grid grid-cols-1 gap-8 sm:grid-cols-2">
{resume.projects.map(({ name, keywords, description }, index) => (
<ProjectCard key={index} name={name} keywords={keywords} description={description} />
))}
Expand Down
Binary file added v2/public/output.docx
Binary file not shown.
39 changes: 39 additions & 0 deletions v2/public/parser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
const inputFileName = process.argv[2];
const jsonFileName = process.argv[3];
const outputFileName = process.argv[4];

const fs = require("fs");
var template = JSON.parse(fs.readFileSync(jsonFileName));

const PizZip = require("pizzip");
const Docxtemplater = require("docxtemplater");

const path = require("path");

// Load the docx file as binary content
const content = fs.readFileSync(
path.resolve(__dirname, inputFileName),
"binary"
);

const zip = new PizZip(content);
const expressionParser = require("docxtemplater/expressions.js");

const doc = new Docxtemplater(zip, {
paragraphLoop: true,
linebreaks: true,
parser: expressionParser,
});

doc.render(template);

const buf = doc.getZip().generate({
type: "nodebuffer",
// compression: DEFLATE adds a compression step.
// For a 50MB output document, expect 500ms additional CPU time
compression: "DEFLATE",
});

// buf is a nodejs Buffer, you can either write it to a
// file or res.send it with express for example.
fs.writeFileSync(outputFileName, buf);
Binary file added v2/public/resume-template.docx
Binary file not shown.
13 changes: 8 additions & 5 deletions v2/public/resume.clintp.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"email": "[email protected]",
"phone": "",
"url": "https://clintp.xyz",
"summary": "Software engineering manager with over 10 years experience developing for the web across multiple languages. Highly collaborative with an excellent understanding of development best practices throughout the entire SDLC, specializing in growing high-performing agile teams and crafting product/technical roadmaps. Demonstrated success in collaborating with both clients and technical stakeholders, leading to numerous successful deliveries",
"summary": "Software engineering manager with over 10 years experience developing for the web across multiple languages. Highly collaborative with an excellent understanding of development best practices throughout the entire SDLC, specialising in growing high-performing agile teams and crafting product/technical roadmaps. Demonstrated success in collaborating with both clients and technical stakeholders, leading to numerous successful deliveries",
"location": {
"address": "",
"postalCode": "",
Expand All @@ -32,12 +32,12 @@
{
"name": "Startup Advisor & Lead Engineer Freelance",
"location": "Melbourne, Australia",
"description": "Startup Advisor and Lead Engineer, specializing in 0-day startups. I provide strategic guidance, lead MVP development, and offer general & technical management expertise to help startups succeed from day one",
"description": "Startup Advisor and Lead Engineer, specialising in 0-day startups. I provide strategic guidance, lead MVP development, and offer general & technical management expertise to help startups succeed from day one",
"position": "Owner",
"url": "https://clintp.xyz",
"endDate": "2024-01-15",
"startDate": "2023-04-01",
"summary": "Startup Advisor, fractional CTO and Lead Engineer, specializing in 0-day startups. I provide strategic guidance, lead MVP development, and offer general, technical, strategic and management expertise to help startups succeed from day one",
"summary": "Startup Advisor, fractional CTO and Lead Engineer, specialising in 0-day startups. I provide strategic guidance, lead MVP development, and offer general, technical, strategic and management expertise to help startups succeed from day one",
"highlights": [
"Worked with some of Australia's most exciting emerging startups"
]
Expand Down Expand Up @@ -77,7 +77,7 @@
{
"name": "GOAT",
"location": "Los Angeles, USA",
"description": "Startup Advisor and Lead Engineer, specializing in 0-day startups. I provide strategic guidance, lead MVP development, and offer general & technical management expertise to help startups succeed from day one",
"description": "Startup Advisor and Lead Engineer, specialising in 0-day startups. I provide strategic guidance, lead MVP development, and offer general & technical management expertise to help startups succeed from day one",
"position": "Engineering Manager",
"url": "https://www.goat.com/",
"endDate": "2020-04-01",
Expand Down Expand Up @@ -248,7 +248,8 @@
"institution": "The Improv Conspiracy Theatre",
"url": "https://www.improvconspiracy.com/workshops/starter-101-introduction-to-long-form-improv",
"area": "Performing Arts",
"studyType": "Misc",
"studyType": "Short Course",
"location": "Melbourne, Australia",
"startDate": "2022",
"endDate": "2022",
"score": "",
Expand All @@ -260,6 +261,7 @@
"institution": "Complete Hospitality Training",
"url": "https://cht.edu.au/courses/barista-coffee-course",
"area": "Hospitality",
"location": "Melbourne, Australia",
"studyType": "Certificate",
"startDate": "2007",
"endDate": "2007",
Expand All @@ -269,6 +271,7 @@
{
"institution": "Swinburne University",
"url": "https://www.swinburne.edu.au/",
"location": "Melbourne, Australia",
"area": "Computing",
"studyType": "Bachelor of Applied Science",
"startDate": "2001",
Expand Down

0 comments on commit 3fa9618

Please sign in to comment.