Convert Google Slides and notes to video with ari
gs_to_ari(path, script = NULL, ..., verbose = TRUE) gs_pptx_notes(path, verbose = TRUE) pptx_to_pdf(path, verbose = TRUE) pptx_to_pngs(path, verbose = TRUE, dpi = 600) pptx_to_ari(path, script = NULL, ..., verbose = TRUE) pdf_to_ari(path, script = NULL, dpi = 300, ..., verbose = TRUE) html_to_ari(path, script = NULL, ..., verbose = TRUE) pdf_to_pngs(path, verbose = TRUE, dpi = 600) images_to_ari(path, script = NULL, dpi = 300, ..., verbose = TRUE) to_ari(path, script = NULL, ..., verbose = TRUE)
path | Identifier of google slides presentation, or PPTX filename |
---|---|
script | passed to |
... | Arguments passed to make_ari_document |
verbose | print diagnostic messages |
dpi | resolution (dots per inch) to render images |
The output from make_ari_document
# \donttest{ # takes > 5 seconds to run id = "1Opt6lv7rRi7Kzb9bI0u3SWX1pSz1k7botaphTuFYgNs" res = gs_to_ari(id, verbose = 2, open = FALSE)#>#>#>#> Warning: Slides with no notes exists#>#>#>#>#> Converting page 1 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file13927592b300e.png... done! #> Converting page 2 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file13927226014de.png... done! #> Converting page 3 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file1392751fa0c73.png... done! #> Converting page 4 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file1392777477c10.png... done! #> Converting page 5 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file1392776223b9d.png... done! #> Converting page 6 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file139274177fd02.png... done! #> Converting page 7 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file139272c83afe2.png... done!#>#>#>#>#>if (interactive()) { file.edit(res$output_file) } # replicates same thing as above without verbosity res2 = to_ari(id, open = FALSE)#>#>#> Warning: Slides with no notes exists#>#>#> Converting page 1 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file139274bb30d4b.png... done! #> Converting page 2 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file13927582dddc0.png... done! #> Converting page 3 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file139272b39957a.png... done! #> Converting page 4 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file13927518492c1.png... done! #> Converting page 5 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file1392756bee6b6.png... done! #> Converting page 6 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file13927f1ce338.png... done! #> Converting page 7 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file1392731897948.png... done!#># } ex_file = system.file("extdata", "example.pptx", package = "ariExtra") have_soffice = try(docxtractr:::lo_assert()) if (!inherits(have_soffice, "try-error")) { pngs = try({ pptx_to_pngs(ex_file) }, silent = TRUE) soffice_config_issue = inherits(pngs, "try-error") if (soffice_config_issue) { warning( paste0("soffice does not seem configured properly, may need to ", "adapt LD_LIBRARY_PATH, ", "try ariExtra:::fix_soffice_library_path()") ) # this can be due to a library issue: url = paste0("https://codeyarns.github.io/tech/2019-09-05", "-libregloso-cannot-open-shared-object-file.html") if (interactive()) { utils::browseURL(url) } } if (!soffice_config_issue) { res = pptx_to_ari(ex_file, open = FALSE) if (interactive()) { file.edit(res$output_file) } res2 = to_ari(ex_file, open = FALSE) } }#>#>#> Converting page 1 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file1392738dda1df.png... done! #> Converting page 2 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file139275eae54a3.png... done!#>#>#>#> Converting page 1 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file1392764abe336.png... done! #> Converting page 2 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file1392750d221dc.png... done!#>#>#>#>#> Converting page 1 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file139271da1746.png... done! #> Converting page 2 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file13927152df59d.png... done!#>ex_file = system.file("extdata", "example.pdf", package = "ariExtra") res = pdf_to_ari(ex_file, script = c("hey", "ho"), open = FALSE)#>#> Converting page 1 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file139277df0fc17.png... done! #> Converting page 2 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file1392758368a99.png... done!#>if (interactive()) { file.edit(res$output_file) } # \donttest{ res2 = to_ari(ex_file, script = c("hey", "ho"), open = FALSE)#>#> Converting page 1 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file139275e3f992a.png... done! #> Converting page 2 to /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmptXiJUn/file139272160c4bd.png... done!#># }