-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat] add timestamp to generated file
- Loading branch information
1 parent
e7c0c0d
commit e50e785
Showing
4 changed files
with
15 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
render: | ||
npm run generate:latex | ||
cd template && xelatex output.tex | ||
mv template/output.pdf "output/markrofail-cv.pdf" | ||
# rm template/output.* | ||
rm -rf output && mkdir output | ||
mv template/output.pdf "output/markrofail-$(date +"%Y-%m-%d").pdf" | ||
npm run generate:png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
import fs from "fs" | ||
import path from "path" | ||
import { pdfToPng } from "pdf-to-png-converter" | ||
|
||
const ROOT_DIR = path.join(__dirname, "..") | ||
|
||
pdfToPng(path.join(ROOT_DIR, "output/markrofail-cv.pdf"), { | ||
viewportScale: 2.0, | ||
outputFolder: path.join(ROOT_DIR, "output"), | ||
fs.readdirSync(path.join(ROOT_DIR, "output")).forEach((file) => { | ||
if (!file.endsWith(".pdf")) return | ||
|
||
pdfToPng(path.join(ROOT_DIR, "output", file), { | ||
viewportScale: 2.0, | ||
outputFolder: path.join(ROOT_DIR, "output"), | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters