import { Page, Text, View, Document, Link } from "@react-pdf/renderer"; import ReactPDF from "@react-pdf/renderer"; import fs from "fs"; import { createTw } from "react-pdf-tailwind"; type Experience = { company: string position: string location: string from: Date to: Date description: string technologies: string[] } const tw = createTw({ }); const link = "no-underline text-red-50" const section = "w-full flex flex-col m-4" const divider = const github = github/ivandimitrov8080 const upwork = upwork/freelancers/idimitrov const resume = idimitrov.dev const email = ivan@idimitrov.dev const tech = { android: [ "Android", "Android Studio", ], java: [ "Java", "JPA", "Hibernate", "Spring Framework", "Spring Boot", "Lombok", "Spring MVC", "Thymeleaf", "JSP", "JSTL", "XML", "Spring Security", "OAuth2", "H2", "Spring Boot Actuator", ], web: [ "JavaScript", "TypeScript", "React", "HTML", "CSS" ], api: [ "REST", "SOAP", ], db: [ "MySQL", "PostgreSQL" ], linux: [ "Linux", "Bash", "coreutils", "Ubuntu", "CentOS", "RHEL", "SSH", "iptables", "systemd", "vim", "Monit", "CLI", ], hybris: [ "SAP hybris", "ZK Framework", ], payment: [ "PayPal", "Adyen", "V12", "Wells Fargo Open Banking APIs", ] } const techKeys = [...Object.keys(tech)] as const const cnetTech: string[] = techKeys .filter(e => !e.includes("hybris")) .filter(e => !e.includes("payment")) // @ts-ignore .map(e => tech[e]).flat() const raTech: string[] = techKeys // @ts-ignore .map(e => tech[e]).flat() const experience = ({ company, position, location, from, to, description, technologies }: Experience) => ( {position} at {company}, {location} from {from.toDateString()} to {to.toDateString()} {description} {technologies.map(t => ( {t} ))} ) const Links = () => ( {github} {upwork} {email} {resume} ) const Experience = () => ( Experience {experience({ company: "Central Net", position: "Software Developer", location: "Blagoevgrad, Bulgaria", from: new Date("May 2016"), to: new Date("May 2020"), description: "Developed a full-stack web app helping students book exams, browse resources, see events, news and more.", technologies: cnetTech })} {experience({ company: "RA Creative", position: "Software Developer", location: "Nottingham, UK", from: new Date("Dec 2020"), to: new Date("20 Jan 2023"), description: "Worked on seven international eCommerce web apps serving customers in the US and Europe.", technologies: raTech })} ) const Intro = () => ( Ivan K. Dimitrov Software Developer ) const CV = () => ( {divider} ); const outDir = process.env.out || "./" const pname = process.env.pname || "cv" if (!fs.existsSync(outDir)) { fs.mkdirSync(outDir, { recursive: true }) } ReactPDF.render(, `${outDir}/${pname}.pdf`);