|
@@ -39,10 +39,10 @@ function exportToPdf(htmlFile, pdfPath) {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function exportResumeToPdf(resumeDataPath, localPugPath, assetsPath, outputPath) {
|
|
|
|
|
|
|
+function exportResumeToPdf(resumeDataPath, localPugPath, assetsPath, outputPath, outputBasename) {
|
|
|
const resumeData = parseResume(resumeDataPath);
|
|
const resumeData = parseResume(resumeDataPath);
|
|
|
- const htmlPath = path.join(outputPath, "resume.html");
|
|
|
|
|
- const pdfPath = path.join(outputPath, "resume.pdf");
|
|
|
|
|
|
|
+ const htmlPath = path.join(outputPath, `${outputBasename}.html`);
|
|
|
|
|
+ const pdfPath = path.join(outputPath, `${outputBasename}.pdf`);
|
|
|
const newAssetsPath = path.join(outputPath, "assets");
|
|
const newAssetsPath = path.join(outputPath, "assets");
|
|
|
|
|
|
|
|
fs.mkdirSync(outputPath, { recursive: true });
|
|
fs.mkdirSync(outputPath, { recursive: true });
|
|
@@ -64,4 +64,4 @@ if (!resumeDataPath || !resumeTemplatePath || !assetsPath || !outputPath) {
|
|
|
process.exit(1);
|
|
process.exit(1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-exportResumeToPdf(resumeDataPath, resumeTemplatePath, assetsPath, outputPath);
|
|
|
|
|
|
|
+exportResumeToPdf(resumeDataPath, resumeTemplatePath, assetsPath, outputPath, "resume");
|