Class: Hackademic::Compile
- Inherits:
-
Thor
- Object
- Thor
- Hackademic::Compile
- Includes:
- Thor::Actions
- Defined in:
- lib/hackademic/compile.rb
Instance Method Summary collapse
- #all ⇒ Object
- #docx ⇒ Object
- #latex ⇒ Object
- #pdf ⇒ Object
- #show_docx_command ⇒ Object
- #show_pdf_command ⇒ Object
Instance Method Details
#all ⇒ Object
7 8 9 10 11 |
# File 'lib/hackademic/compile.rb', line 7 def all latex docx pdf end |
#docx ⇒ Object
32 33 34 35 36 37 |
# File 'lib/hackademic/compile.rb', line 32 def docx read_draft_file write_master_markdown_file system docx_command say "Writing out DOCX file: #{config.output_directory}/#{config.draft_name.gsub(/\..*$/, '')}.docx" end |
#latex ⇒ Object
40 41 42 43 44 45 |
# File 'lib/hackademic/compile.rb', line 40 def latex read_draft_file write_master_markdown_file %x[pandoc #{config.output_directory}/#{config.transcluded_draft} --from=markdown+#{.join("+")} --filter pandoc-citeproc --bibliography=#{config.bibliography} --csl=#{config.citation_style} --latex-engine=xelatex --template=#{config.latex_template} -s -o "#{latex_file}"] say "Writing out LaTeX file: #{config.output_directory}/#{config.draft_name.gsub(/\..*$/, '')}.tex" end |
#pdf ⇒ Object
14 15 16 17 18 19 |
# File 'lib/hackademic/compile.rb', line 14 def pdf read_draft_file write_master_markdown_file system pdf_command say "Writing out PDF file: #{config.output_directory}/#{config.transcluded_draft.gsub(/\..*$/, '')}.pdf" end |
#show_docx_command ⇒ Object
27 28 29 |
# File 'lib/hackademic/compile.rb', line 27 def show_docx_command say docx_command, :blue end |
#show_pdf_command ⇒ Object
22 23 24 |
# File 'lib/hackademic/compile.rb', line 22 def show_pdf_command say pdf_command, :blue end |