only copies the slides text files if they exist; this is to keep the script compatible with old recordings

This commit is contained in:
Felipe Cecagno 2012-08-27 16:23:12 -03:00
parent f9d7f11d63
commit 7be21e5e53
2 changed files with 6 additions and 2 deletions

View File

@ -79,7 +79,9 @@ if not FileTest.directory?(target_dir)
#BigBlueButton::Presentation.convert_pdf_to_png(pdf_page, "#{target_pres_dir}/slide-#{page}.png")
command = "convert -density 300x300 -resize 1600x1200 -quality 90 +dither -depth 8 -colors 256 #{pdf_page} #{target_pres_dir}/slide-#{page}.png"
BigBlueButton.execute(command)
FileUtils.cp("#{pres_dir}/textfiles/slide-#{page}.txt", "#{target_pres_dir}/textfiles")
if File.exist?("#{pres_dir}/textfiles/slide-#{page}.txt") then
FileUtils.cp("#{pres_dir}/textfiles/slide-#{page}.txt", "#{target_pres_dir}/textfiles")
end
end
else
ext = File.extname("#{images[0]}")

View File

@ -56,7 +56,9 @@ if not FileTest.directory?(target_dir)
pdf_page = "#{pres_dir}/slide-#{page}.pdf"
BigBlueButton::Presentation.extract_page_from_pdf(page, pres_pdf, pdf_page)
BigBlueButton::Presentation.convert_pdf_to_png(pdf_page, "#{target_pres_dir}/slide-#{page}.png")
FileUtils.cp("#{pres_dir}/textfiles/slide-#{page}.txt", "#{target_pres_dir}/textfiles")
if File.exist?("#{pres_dir}/textfiles/slide-#{page}.txt") then
FileUtils.cp("#{pres_dir}/textfiles/slide-#{page}.txt", "#{target_pres_dir}/textfiles")
end
end
else
ext = File.extname("#{images[0]}")