Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
Improve pdf generation
Browse files Browse the repository at this point in the history
  • Loading branch information
DanySK committed Jul 29, 2020
1 parent 4fd7d7d commit e7998e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions slides/makepdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
server = fork {
exec("hugo server --log --logFile #{log_file_name}")
}
contents = Dir["content/*/_index.md"].map { |f|
contents = Dir["content/**/_index.md"].map { |f|
File.expand_path("..", f).split('/').last
}
puts "Contents will be generated for #{contents}"
Expand All @@ -23,14 +23,14 @@ def generate_slides(target)
pdf_name = target || "00-introduction"
target ||= ""
puts "Using decktape to generate #{pdf_name}.pdf from /#{target}"
`decktape -s 1920x1080 http://localhost:1313/Course-Laboratory-of-Software-Systems/#{target} #{pdf_name}.pdf`
`decktape -s 1440x900 http://localhost:1313/Course-Laboratory-of-Software-Systems/#{target} #{pdf_name}.pdf`
end

generate_slides nil
for pack in contents
generate_slides pack
end
# Site is generated and is being server. Launch decktape
# Site has been generated and is being served. Launch decktape
`decktape http://localhost:1313/Course-Laboratory-of-Software-Systems/ slides.pdf`
# Terminate the server
Process.kill("TERM", server)
Expand Down

0 comments on commit e7998e1

Please sign in to comment.