79 lines
2.4 KiB
Bash
79 lines
2.4 KiB
Bash
|
#!/bin/bash
|
||
|
|
||
|
# 2024-03-26
|
||
|
|
||
|
# - part: whole-game.qmd
|
||
|
# chapters:
|
||
|
# - data-visualize.qmd
|
||
|
# - workflow-basics.qmd
|
||
|
# - data-transform.qmd
|
||
|
# - workflow-style.qmd
|
||
|
# - data-tidy.qmd
|
||
|
# - workflow-scripts.qmd
|
||
|
# - data-import.qmd
|
||
|
# - workflow-help.qmd
|
||
|
|
||
|
# - part: visualize.qmd
|
||
|
# chapters:
|
||
|
# - layers.qmd
|
||
|
# - EDA.qmd
|
||
|
# - communication.qmd
|
||
|
|
||
|
# 2024-03-28
|
||
|
|
||
|
# - part: transform.qmd
|
||
|
# chapters:
|
||
|
# - logicals.qmd
|
||
|
# - numbers.qmd
|
||
|
# - strings.qmd
|
||
|
# - regexps.qmd
|
||
|
# - factors.qmd
|
||
|
# - datetimes.qmd
|
||
|
# - missing-values.qmd
|
||
|
# - joins.qmd
|
||
|
#
|
||
|
# - part: import.qmd
|
||
|
# chapters:
|
||
|
# - spreadsheets.qmd
|
||
|
# - databases.qmd
|
||
|
# - arrow.qmd
|
||
|
# - rectangling.qmd
|
||
|
# - webscraping.qmd
|
||
|
|
||
|
# 2024-04-02
|
||
|
|
||
|
# - part: program.qmd
|
||
|
# chapters:
|
||
|
# - functions.qmd
|
||
|
# - iteration.qmd
|
||
|
# - base-R.qmd
|
||
|
#
|
||
|
# - part: communicate.qmd
|
||
|
# chapters:
|
||
|
# - quarto.qmd
|
||
|
# - quarto-formats.qmd
|
||
|
|
||
|
r4dsdir="$HOME/research/r4ds"
|
||
|
|
||
|
datestr="20240326"
|
||
|
|
||
|
mkdir 20240326_1_data-visualize
|
||
|
mkdir 20240326_2_workflow-basics
|
||
|
mkdir 20240326_3_data-transform
|
||
|
mkdir 20240326_4_workflow-style
|
||
|
mkdir 20240326_5_data-tidy
|
||
|
mkdir 20240326_6_workflow-scripts
|
||
|
mkdir 20240326_7_data-import
|
||
|
mkdir 20240326_8_workflow-help
|
||
|
|
||
|
awk '/```{r}/{print "\n##\n\n" $0; flag=1; next} /```/{flag=0} flag || /```/' "${r4dsdir}"/data-visualize.qmd >20240326_1_data-visualize/index.qmd
|
||
|
awk '/```{r}/{print "\n##\n\n" $0; flag=1; next} /```/{flag=0} flag || /```/' "${r4dsdir}"/workflow-basics.qmd >20240326_2_workflow-basics/index.qmd
|
||
|
awk '/```{r}/{print "\n##\n\n" $0; flag=1; next} /```/{flag=0} flag || /```/' "${r4dsdir}"/data-transform.qmd >20240326_3_data-transform/index.qmd
|
||
|
awk '/```{r}/{print "\n##\n\n" $0; flag=1; next} /```/{flag=0} flag || /```/' "${r4dsdir}"/workflow-style.qmd >20240326_4_workflow-style/index.qmd
|
||
|
awk '/```{r}/{print "\n##\n\n" $0; flag=1; next} /```/{flag=0} flag || /```/' "${r4dsdir}"/data-tidy.qmd >20240326_5_data-tidy/index.qmd
|
||
|
awk '/```{r}/{print "\n##\n\n" $0; flag=1; next} /```/{flag=0} flag || /```/' "${r4dsdir}"/workflow-scripts.qmd >20240326_6_workflow-scripts/index.qmd
|
||
|
awk '/```{r}/{print "\n##\n\n" $0; flag=1; next} /```/{flag=0} flag || /```/' "${r4dsdir}"/data-import.qmd >20240326_7_data-import/index.qmd
|
||
|
awk '/```{r}/{print "\n##\n\n" $0; flag=1; next} /```/{flag=0} flag || /```/' "${r4dsdir}"/workflow-help.qmd >20240326_8_workflow-help/index.qmd
|
||
|
|
||
|
find * -type d | grep 0326 | xargs -I{} cp -r ./20240321_0_R实践课程/_extensions {}/
|