gs_to_ari: Convert Google Slides and notes to video with ari

gs_to_ariR Documentation

Convert Google Slides and notes to video with ari

Description

Convert Google Slides and notes to video with ari

Usage

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)

Arguments

path

Identifier of google slides presentation, or PPTX filename

script

passed to make_ari_document()

...

additional arguments to pptx_notes

verbose

print diagnostic messages

dpi

resolution (dots per inch) to render images

Value

The output from make_ari_document

Examples


# takes > 5 seconds to run
  id = "1Opt6lv7rRi7Kzb9bI0u3SWX1pSz1k7botaphTuFYgNs"
  res = gs_to_ari(id, verbose = 2, open = FALSE)
  if (interactive()) {
    file.edit(res$output_file)
  }
  # replicates same thing as above without verbosity
  res2 = to_ari(id, open = FALSE)


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)
  }
}
ex_file = system.file("extdata", "example.pdf", package = "ariExtra")
res = pdf_to_ari(ex_file, script = c("hey", "ho"), open = FALSE)
if (interactive()) {
file.edit(res$output_file)
}

res2 = to_ari(ex_file,  script = c("hey", "ho"), open = FALSE)


jhudsl/ariExtra documentation built on April 29, 2023, 8:03 p.m.