gs_to_ari: Convert Google Slides and notes to video with ari

Description Usage Arguments Value Examples

View source: R/gs_ari.R

Description

Convert Google Slides and notes to video with ari

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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()

...

Arguments passed to make_ari_document

verbose

print diagnostic messages

dpi

resolution (dots per inch) to render images

Value

The output from make_ari_document

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# 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)

ariExtra documentation built on June 23, 2021, 9:07 a.m.