Description Usage Arguments Value Examples
Get Google Slide Elements IDs
1 2 3 4 5 6 7 8 9 10 11 12 13 | gs_slide_df(id, extract_code = TRUE, use_google_drive = FALSE, ...)
notes_from_slide(id)
gs_notes_from_slide(id)
notes_from_slide_output(slides)
gs_get_slides(id)
gs_speaker_notes_id(id)
gs_replace_notes(id, notes)
|
id |
Slide id passed to |
extract_code |
If you have text with |
use_google_drive |
Use Google Drive to host the PNGs, calling
|
... |
additional arguments to pass to |
slides |
an output of |
notes |
a character vector of notes to be added to the slides |
A data.frame
of the identifiers and properties of the
slides
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 47 48 49 50 51 52 53 54 | ## Not run:
id = "1XoRj0pwaLI34XKZ7TljVeDHu-tbgGmXRmQa528JIwmw"
slides = gs_slide_df(id)
all_notes = notes_from_slide(id)
slides$slideProperties$notesPage$pageElements[[1]]
pe = slides$slideProperties$notesPage$pageElements
text = pe[[1]]$shape$text$textElements[[2]]$textRun$content
notes = sapply(pe,
function(r) {
res = sapply(r$shape$text$textElements, function(x) x$textRun$content)
res = unlist(res)
res = res[!is.na(res)]
if (is.null(res)) {
res = ""
}
paste(res, collapse = " ")
})
notes
## End(Not run)
## Not run:
id = "1XoRj0pwaLI34XKZ7TljVeDHu-tbgGmXRmQa528JIwmw"
slides = gs_get_slides(id)
tfile = tempfile(fileext = ".txt")
writeLines(slides$content, con = tfile)
ss = strsplit(slides$content, split = "\n")[[1]]
ind = grep("uthinkk", ss)
ss[(ind -30):(ind + 5)]
slides$parsed$slides$slideProperties$notesPage
slides$parsed$slides$slideProperties$notesPage$pageElements
## End(Not run)
## Not run:
id = "1XoRj0pwaLI34XKZ7TljVeDHu-tbgGmXRmQa528JIwmw"
parsed = gs_get_slides(id)$parsed
parsed$slides$slideProperties$notesPage$notesProperties$speakerNotesObjectId
notes_id = gs_speaker_notes_id(id)
## End(Not run)
## Not run:
id = "1XoRj0pwaLI34XKZ7TljVeDHu-tbgGmXRmQa528JIwmw"
shape_ids = gs_speaker_notes_id(id)
notes = sample(letters, size = length(shape_ids))
res = gs_replace_notes(id, notes)
curr_notes = notes_from_slide(id)
all(curr_notes == notes)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.