coatless-rpkg / assignr

Tools for Educators Writing Assignments in RMarkdown
https://r-pkg.thecoatlessprofessor.com/assignr/
42 stars 7 forks source link

Output Structure #7

Open daviddalpiaz opened 6 years ago

daviddalpiaz commented 6 years ago

Specify via YAML header?

coatless commented 6 years ago

@daviddalpiaz something along the lines of:

output: 
  assignr::gen_hw: 
    assign: yes
    soln: yes
    output_dir: "path/to/dir"

Sound good?

daviddalpiaz commented 6 years ago

Is output_dir meant to be the "release" directory? Meaning, the files are built internally, but then also certain files are copied to the output_dir?

daviddalpiaz commented 6 years ago

Also, gen_hw implies generating a homework. Would there be multiple gen_** functions at some point?

coatless commented 6 years ago

@daviddalpiaz we can have multiple functions or condense options.

e.g. we presently have:

assignr(file, output_dir = NULL, assign_file = TRUE, soln_file = TRUE, zip_files = TRUE)

The multiple function way could have more clear presets:

gen_assign(file, output_dir = NULL, zip_files = TRUE)
gen_soln(file, output_dir = NULL, zip_files = TRUE)

We can add the parameter copy_to_dir = NULL for the copy case we discussed yesterday.