knitr::opts_chunk$set(echo = FALSE)
knitr::knit_hooks$set(hook_convert_odg = rmdhelp::hook_convert_odg)

```{bash, echo=FALSE, eval=FALSE}

bash - export as jpeg

ls -1 /Users/${USER}/Google\ Drive/Vorlesungen/LBG/FS2021/OHP-L07/* | while read p do CURPICFN=$(basename "$p") echo " * Copy $p ..." cp "$p" ~/Desktop echo " * Convert ~/Desktop/$CURPICFN ..." mogrify -resize 50% -format jpg ~/Desktop/$CURPICFN echo " * Remove ~/Desktop/$CURPICFN ..." rm ~/Desktop/$CURPICFN sleep 2 done

```r
this_rmd_file <- ifelse(rstudioapi::isAvailable(),
                        rstudioapi::getActiveDocumentContext()$path,
                        whereami::thisfile())
this_rmd_file


vec_pics <- list.files(path = "~/Desktop", pattern = ".jpg$")
for (pidx in seq_along(vec_pics)){
   cur_pic <- vec_pics[pidx]
   cur_pic_nr <- as.integer(unlist(strsplit(fs::path_ext_remove(cur_pic), "_"))[2])
  cat("\n## OHP Picture ", pidx, "\n\n", sep = "", file = this_rmd_file, append = TRUE)
  cat("```r\n", sep = "", file = this_rmd_file, append = TRUE)
  cat("rmdhelp::use_odg_graphic(ps_path = 'odg/ohp-page", cur_pic_nr, ".odg')\n", sep = "", file = this_rmd_file, append = TRUE)
  cat("# fs::file_delete(path = '~/Desktop/", cur_pic, "')\n", sep = "", file = this_rmd_file, append = TRUE)
  cat("```\n\n", file = this_rmd_file, append = TRUE)
}

OHP Picture 1

#rmdhelp::use_odg_graphic(ps_path = 'odg/ohp-page3335.odg')
knitr::include_graphics(path = "odg/ohp-page3335.png")
# fs::file_delete(path = '~/Desktop/IMG_3335.jpg')

OHP Picture 2

#rmdhelp::use_odg_graphic(ps_path = 'odg/ohp-page3336.odg')
knitr::include_graphics(path = "odg/ohp-page3336.png")
# fs::file_delete(path = '~/Desktop/IMG_3336.jpg')

OHP Picture 3

#rmdhelp::use_odg_graphic(ps_path = 'odg/ohp-page3337.odg')
knitr::include_graphics(path = "odg/ohp-page3337.png")
# fs::file_delete(path = '~/Desktop/IMG_3337.jpg')

OHP Picture 4

#rmdhelp::use_odg_graphic(ps_path = 'odg/ohp-page3338.odg')
knitr::include_graphics(path = "odg/ohp-page3338.png")
# fs::file_delete(path = '~/Desktop/IMG_3338.jpg')

OHP Picture 5

#rmdhelp::use_odg_graphic(ps_path = 'odg/ohp-page3339.odg')
knitr::include_graphics(path = "odg/ohp-page3339.png")
# fs::file_delete(path = '~/Desktop/IMG_3339.jpg')

OHP Picture 6

#rmdhelp::use_odg_graphic(ps_path = 'odg/ohp-page3340.odg')
knitr::include_graphics(path = "odg/ohp-page3340.png")
# fs::file_delete(path = '~/Desktop/IMG_3340.jpg')

OHP Picture 7

#rmdhelp::use_odg_graphic(ps_path = 'odg/ohp-page3341.odg')
knitr::include_graphics(path = "odg/ohp-page3341.png")
# fs::file_delete(path = '~/Desktop/IMG_3341.jpg')

OHP Picture 8

#rmdhelp::use_odg_graphic(ps_path = 'odg/ohp-page3343.odg')
knitr::include_graphics(path = "odg/ohp-page3343.png")
# fs::file_delete(path = '~/Desktop/IMG_3343.jpg')


charlotte-ngs/lbgfs2021 documentation built on Dec. 19, 2021, 3:01 p.m.