From 474376b1f1c90ebfa6191d0aface136266b120b6 Mon Sep 17 00:00:00 2001 From: Pablo Benmaman Date: Sun, 9 May 2021 18:26:23 +0200 Subject: [PATCH] add missing projects --- README_V3.MD | 2 +- package-lock.json | 19 ++++++------------- package.json | 2 +- src/utils/spreadsheet-to-json-resume.js | 24 +++++++++++++++++++++++- 4 files changed, 31 insertions(+), 16 deletions(-) diff --git a/README_V3.MD b/README_V3.MD index ec0e7ba..9c00257 100644 --- a/README_V3.MD +++ b/README_V3.MD @@ -13,7 +13,7 @@ ## About -[Resume Builder](https://blopa.github.io/Legacy-Resume-Builder/v3) is a free open-source project that allows anyone to easily maintain and build any kind of resume using Google Spreadsheets. This was develop as a personal project to help a friend who was struggling spending up to an hour to make a custom resumes. **[TRY IT NOW](https://blopa.github.io/Legacy-Resume-Builder/v3).** +[Resume Builder](https://blopa.github.io/Legacy-Resume-Builder/v3/en) is a free open-source project that allows anyone to easily maintain and build any kind of resume using Google Spreadsheets. This was develop as a personal project to help a friend who was struggling spending up to an hour to make a custom resumes. **[TRY IT NOW](https://blopa.github.io/Legacy-Resume-Builder/v3/en).** For the latest version, access [https://resume-builder.js.org](https://resume-builder.js.org). diff --git a/package-lock.json b/package-lock.json index 06fe4a8..5fdf154 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8022,16 +8022,15 @@ "integrity": "sha512-623WEiZJqxR7VdxFCKLI6d6LLpwJkGPYKODnkH3D7WpOG5KM8yWueBd8TLsNAetEJNF5iJmolaAKO3F8yzyVBQ==" }, "eslint-plugin-unicorn": { - "version": "31.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-31.0.0.tgz", - "integrity": "sha512-HR3gI4ANtV8A+0FLAaxjBD/G5J3PWBo+7OswyGeK5nylGqtKLJVbnPksIkBgmVg+SFpxu5MnjaxQQI+9KjyVAg==", + "version": "32.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-32.0.0.tgz", + "integrity": "sha512-VYE/XvZvdcY0RvOKGxsrVVWo8DaI/tGVYuhKzSd6Uuy69Ydc8zX+roZ/H9PgyykM4nuj8JDoOHSwVk9a4OYbCQ==", "dev": true, "requires": { "ci-info": "^3.1.1", "clean-regexp": "^1.0.0", "eslint-template-visitor": "^2.3.2", "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", "import-modules": "^2.1.0", "is-builtin-module": "^3.1.0", "lodash": "^4.17.21", @@ -8049,12 +8048,6 @@ "integrity": "sha512-kdRWLBIJwdsYJWYJFtAFFYxybguqeF91qpZaggjG5Nf8QKdizFG2hjqvaTXbxFIcYbSaD74KpAXv6BSm17DHEQ==", "dev": true }, - "eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", - "dev": true - }, "read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", @@ -8135,9 +8128,9 @@ }, "dependencies": { "eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true } } diff --git a/package.json b/package.json index 3e0f0b3..110bdcf 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-react": "^7.23.2", "eslint-plugin-react-hooks": "^4.2.0", - "eslint-plugin-unicorn": "^31.0.0", + "eslint-plugin-unicorn": "^32.0.0", "eslint-plugin-unused-imports": "^1.1.1", "gatsby-plugin-eslint": "^3.0.0", "npm-check-updates": "^11.5.10", diff --git a/src/utils/spreadsheet-to-json-resume.js b/src/utils/spreadsheet-to-json-resume.js index df6b7cd..06a08f1 100644 --- a/src/utils/spreadsheet-to-json-resume.js +++ b/src/utils/spreadsheet-to-json-resume.js @@ -16,6 +16,7 @@ export default function spreadsheetToJsonResume(jsonSpreadsheet) { const educationCategory = 'education'; const awardsCategory = 'awards'; const publicationsCategory = 'publications'; + const projectsCategory = 'projects'; const certificatesCategory = 'certificates'; const skillsCategory = 'skills'; const languagesCategory = 'languages'; @@ -36,6 +37,7 @@ export default function spreadsheetToJsonResume(jsonSpreadsheet) { education: [], awards: [], publications: [], + projects: [], certificates: [], skills: [], languages: [], @@ -56,6 +58,8 @@ export default function spreadsheetToJsonResume(jsonSpreadsheet) { const awardsArray = []; let publications = {}; const publicationsArray = []; + let projects = {}; + const projectsArray = []; let certificates = {}; const certificatesArray = []; let skills = {}; @@ -96,7 +100,7 @@ export default function spreadsheetToJsonResume(jsonSpreadsheet) { profiles[value[typeAttr]] = value[contentAttr]; } else if (category === workCategory) { - if (value[typeAttr] === 'company') { + if (value[typeAttr] === 'name') { if (isObjectNotEmpty(work)) { workArray.push({ ...work }); work = {}; @@ -161,6 +165,19 @@ export default function spreadsheetToJsonResume(jsonSpreadsheet) { } publications[value[typeAttr]] = value[contentAttr]; + } else if (category === projectsCategory) { + if (value[typeAttr] === 'name') { + if (isObjectNotEmpty(projects)) { + projectsArray.push({ ...projects }); + projects = {}; + } + } + + if (value[typeAttr] === 'highlights' || value[typeAttr] === 'keywords') { + projects[value[typeAttr]] = value[contentAttr].split(',').map((item) => item.trim()); + } else { + projects[value[typeAttr]] = value[contentAttr]; + } } else if (category === skillsCategory) { if (value[typeAttr] === 'name') { if (isObjectNotEmpty(skills)) { @@ -238,6 +255,11 @@ export default function spreadsheetToJsonResume(jsonSpreadsheet) { } jsonResume.publications = [...publicationsArray]; + if (isObjectNotEmpty(projects)) { + projectsArray.push(projects); + } + jsonResume.projects = [...projectsArray]; + if (isObjectNotEmpty(certificates)) { certificatesArray.push(certificates); }