Skip to content

Commit

Permalink
Merge pull request #66 from fhdsl/run-all
Browse files Browse the repository at this point in the history
Get all the files!!!
  • Loading branch information
avahoffman authored Jul 3, 2024
2 parents 54c8967 + ca4f620 commit b38e137
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 b38e137

Please sign in to comment.