R/sync_notes.R

Defines functions sync_notes

#' Sync Notes from Joplin Directory
#'
#' @param note_repo path
#' @param force logical
#'
#' @return invisible
#' @export
#'
sync_notes <- function(note_repo = fs::path_abs("C:\\Users\\jimmy.briggs\\Documents\\Notes"), force = FALSE) {

  # fs::dir_create("notes")

  notes <- fs::dir_ls(note_repo, type = "file", glob = "*.md")

  notes %>%
    purrr::walk(
      fs::file_copy, new_path = "inst/notes"
    )


}
jimbrig2011/knowledge-repo documentation built on Feb. 11, 2020, 2:37 a.m.