init_lesson_meta: init_lesson_meta()

View source: R/init_lesson_meta.R

init_lesson_metaR Documentation

init_lesson_meta()

Description

Add galacticPubs Google Workspace working documents to a given lesson's /meta folder. You must have access to GP-Studio shared drive.

Usage

init_lesson_meta(
  WD = "?",
  overwrite = FALSE,
  template = NULL,
  override = FALSE
)

lesson_init_meta(
  WD = "?",
  overwrite = FALSE,
  template = NULL,
  override = FALSE
)

Arguments

WD

the working directory for the virtualized lesson path; default=getwd() if you're working in the lesson's .Rproj. If "?" is supplied, it will invoke pick_lesson()

overwrite

logical; Do you want to overwrite target if exact file name found? Does not get passed to googledrive::drive_cp() because the way this works is stupid and slow. Instead, we check using virtualized Google Drive for Desktop paths and will overwrite the exact file name if T. Default= FALSE.

template

which template do you want to copy; default=NULL copies all; options= "standards" and "teach-it"

override

boolean; do you want to force copying this, overriding the overwrite logic (which only kinda works); default= FALSE

Details

WD is used for hybrid file path navigation using virtualized paths on Google Drive for desktop to reach the Edu/Lessons/meta/front-matter.yml for the project of interest. Then, using get_fm() to lookup the GoogleDrive ID for the cloud version of this folder, files will then be copied from the template folder to this project folder using the google web API. All of this is necessary because Google Drive for Desktop doesn't allow copying of Google Documents. It will check existence of templates in target directory using virtualized system for efficiency and to prevent duplications.

Value

logical of success; T=template gsheets copied to meta/ and front-matter updated with update_fm()

Functions

  • lesson_init_meta():

See Also

Other Google Drive Functions: drive_contents(), drive_copy_missing_files(), drive_cp_dir(), drive_find_path(), drive_get_info(), drive_inSync(), drive_new_from_template(), drive_open(), update_teach_links()


galacticpolymath/GPpub documentation built on April 5, 2025, 6:04 p.m.