Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated experience & skills, cleanup
- Loading branch information
Showing
5 changed files
with
42 additions
and
56 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
Binary file not shown.
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,43 +1,35 @@ | ||
var fs = require("fs") | ||
var fs = require("fs"); | ||
var through2 = require('through2'); | ||
var markdownPdf = require("markdown-pdf") | ||
// var removeMarkdown = require("remove-markdown") | ||
var sync = require("sync") | ||
var markdownPdf = require("markdown-pdf"); | ||
var sync = require("sync"); | ||
|
||
var resume = fs.createReadStream("README.md") | ||
var pdf = fs.createWriteStream("Resume - Desmond Weindorf.pdf") | ||
var txt = fs.createWriteStream("Resume - Desmond Weindorf.txt") | ||
var md = fs.createWriteStream("Resume - Desmond Weindorf.md") | ||
var resume = fs.createReadStream("README.md"); | ||
var pdf = fs.createWriteStream("Resume - Desmond Weindorf.pdf"); | ||
var txt = fs.createWriteStream("Resume - Desmond Weindorf.txt"); | ||
var md = fs.createWriteStream("Resume - Desmond Weindorf.md"); | ||
|
||
process.stdout.write('Building other file types...\n') | ||
process.stdout.write('Building other file types...\n'); | ||
|
||
sync(function(){ | ||
|
||
var pdfOptions = { | ||
// paperBorder: "0.8cm" | ||
} | ||
resume.pipe(markdownPdf(pdfOptions)).pipe(pdf) | ||
resume.pipe(markdownPdf()).pipe(pdf); | ||
|
||
// txt | ||
resume.pipe(through2(function(chunk, _, next) { | ||
chunk = chunk.toString() | ||
chunk = chunk.toString(); | ||
|
||
// subhheader | ||
chunk = chunk.replace(/\s*\n## /g, '\n\n-------------\n\n') | ||
chunk = chunk.replace(/\s*\n## /g, '\n\n-------------\n\n'); | ||
|
||
// remove other headers, bold | ||
chunk = chunk.replace(/^#* /, '') | ||
chunk = chunk.replace(/\n#* /g, '\n') | ||
chunk = chunk.replace(/([^\n]*)__(.*)__([^\n]*)/g, '$1$2$3') | ||
chunk = chunk.replace(/^#* /, ''); | ||
chunk = chunk.replace(/\n#* /g, '\n'); | ||
chunk = chunk.replace(/([^\n]*)__(.*)__([^\n]*)/g, '$1$2$3'); | ||
|
||
// chunk = removeMarkdown(chunk) + '\n' | ||
this.push(chunk); | ||
|
||
next() | ||
})).pipe(txt) | ||
next(); | ||
})).pipe(txt); | ||
|
||
// md | ||
resume.pipe(md) | ||
|
||
}) | ||
resume.pipe(md); | ||
}); |