Skip to content

Commit

Permalink
Get all the files!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
avahoffman committed Jul 3, 2024
1 parent 1b95c84 commit ca4f620
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/render-all-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ jobs:
# Render the cheatsheets
- name: Render Cheatsheet pdfs
run: |
Rscript --vanilla "scripts/render_cheatsheets.R" --files "${{ steps.all-files.outputs.files }}"
Rscript --vanilla "scripts/render_cheatsheets.R" --files "all"
# Render resource pdfs
- name: Render Resource pdfs
run: |
Rscript --vanilla "scripts/render_resources.R" --files "${{ steps.all-files.outputs.files }}"
Rscript --vanilla "scripts/render_resources.R" --files "all"
# Generate list of files that need pdfs
- name: Generate list of lectures that need pdfs generated
Expand Down
5 changes: 5 additions & 0 deletions scripts/render_cheatsheets.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ opt_parser <- optparse::OptionParser(option_list = option_list)
opt <- optparse::parse_args(opt_parser)
files <- opt$files

if (files == "all"){
# If no argument supplied, do all
files <- list.files(recursive = T)
}

# Split files up if multiple
files <- stringr::str_split(files, " ")
if (class(files) == "list")
Expand Down
5 changes: 5 additions & 0 deletions scripts/render_resources.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ opt_parser <- optparse::OptionParser(option_list = option_list)
opt <- optparse::parse_args(opt_parser)
files <- opt$files

if (files == "all"){
# If no argument supplied, do all
files <- list.files(recursive = T)
}

# Split files up if multiple
files <- stringr::str_split(files, " ")
if (class(files) == "list") files <- unlist(files)
Expand Down

0 comments on commit ca4f620

Please sign in to comment.