适配为文章模版

This commit is contained in:
2023-11-10 13:31:46 +08:00
parent db71ec6afa
commit 4c17581235
68 changed files with 15984 additions and 296 deletions
Binary file not shown.
+5
View File
@@ -0,0 +1,5 @@
---
title: "文章讨论"
format: revealjs
---
-12
View File
@@ -1,12 +0,0 @@
---
title: "项目启动汇报"
format: revealjs
---
# 项目背景
# 科学问题
# 主要进展
# 小结与计划
+24 -2
View File
@@ -2,6 +2,28 @@
subtitle: "演示材料"
---
## [项目启动汇报](./20230101_项目启动/index.qmd)
<iframe title="项目启动汇报" width=800 height=600 src = "./20230101_项目启动/index.html"></iframe>
```{r}
#| include: false
require(drwateR)
require(rmdify)
rmdify::rmd_init()
```
```{r}
#| output: asis
data.frame(fd = dir(".", pattern = "[-_]")) |>
dplyr::mutate(fn = purrr::map_chr(fd, ~ file.path(.x, dir(.x,
pattern = "index.qmd|index.doc|index.pdf|index.ppt")))) |>
dplyr::transmute(htmlstr = purrr::map_chr(fn, ~ paste0("## [", .x, "](", .x, ")\n\n",
ifelse(!grepl("qmd$", .x), "",
paste0("<iframe title='",
gsub("^.*[_-]([^\\/]*)\\/.*$", "\\1", .x),
"' width=800 height=600 src = '",
gsub("qmd$", "html", .x),
"'></iframe>\n\n"))))) |>
dplyr::pull(htmlstr) |>
paste(collapse = "") |>
cat()
```