This commit is contained in:
2023-12-25 03:33:09 +08:00
parent f275f4b83e
commit 6e7e207274
10 changed files with 541 additions and 15 deletions
+9 -12
View File
@@ -1,8 +1,7 @@
---
subtitle: "演示材料"
subtitle: "Track Changes"
---
<iframe title="项目启动汇报" width=800 height=600 src = "./20230101_项目启动/index.html"></iframe>
```{r}
#| include: false
@@ -13,16 +12,14 @@ 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"))))) |>
data.frame(fn = dir(".", pattern = "-.*.qmd")) |>
dplyr::mutate(rawfn = gsub("^.*_", "", fn)) |>
dplyr::mutate(time1 = lubridate::ymd_h(gsub("-.*$", "", fn))) |>
dplyr::mutate(time2 = lubridate::ymd_h(gsub("^.*-(.*)_.*$", "\\1", fn))) |>
dplyr::arrange(dplyr::desc(time2), rawfn, dplyr::desc(time1)) |>
dplyr::mutate(htmlstr = paste0("- [**", rawfn, "**: ",
format(time1, "%y-%m-%d %H:%M"), " ⇨ **", format(time2, "%Y-%m-%d %H:%M"),
"**](", gsub("qmd$", "html", fn), ")\n\n")) |>
dplyr::pull(htmlstr) |>
paste(collapse = "") |>
cat()