#' make an outline md template to add contents
#' @author lgm
#' @param date
#' @return md
#' @export
#' @examples
#'
#'#create_outline_template("2016-03-01","microCn-2016")
#'
create_outline_template <- function(beginDate,subjyear) {
# test
outdir <-"/Users/gabe/liguomin.teaching/syllabus/outlines/"
## all date to teach
dates <- gmdata::teach_date(beginDate)
#
create_cont <- function(weekNo,tdate)
{
cont <- paste0("## week ", weekNo,"\n- 时间 ",tdate,"\n- 课时数 3\n- 讲授内容\n \n- 作业安排\nex3\n\n")
return(cont)
}
content.f <- c()
for (i in 1:length(dates)) {
ct <- create_cont(i, dates[i])
content.f <- paste0(content.f,ct)
}
cat(content.f, file = paste0(outdir,subjyear,".md"),sep = "\n")
return("well done,save to /Users/gabe/liguomin.teaching/syllabus/output/")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.