Skip to content

Instantly share code, notes, and snippets.

@weatheredwatcher
Created April 2, 2021 04:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weatheredwatcher/82b9b3b76f962d2cc12b25932e499533 to your computer and use it in GitHub Desktop.
Save weatheredwatcher/82b9b3b76f962d2cc12b25932e499533 to your computer and use it in GitHub Desktop.
Rakefile that I use to manage my resume. Can convert to pdf, HTML or Word doc.
task :default => :pdf
task :pdf => %W[resume-duggins.pdf]
%W[resume.md].each do |md_file|
pdf_file = File.basename(md_file, ".md") + "-duggins.pdf"
file pdf_file => md_file do
sh "pandoc #{md_file} -s -o #{pdf_file}"
end
end
task :html => %W[resume-duggins.html]
%W[resume.md].each do |md_file|
html_file = File.basename(md_file, ".md") + "-duggins.html"
file html_file => md_file do
sh "pandoc #{md_file} -s -o #{html_file} --metadata pagetitle=\"resume\""
end
end
task :docx => %W[resume-duggins.docx]
%W[resume.md].each do |md_file|
docx_file = File.basename(md_file, ".md") + "-duggins.docx"
file docx_file => md_file do
sh "pandoc #{md_file} -s -o #{docx_file}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment