Skip to content

Commit

Permalink
Add config$register_columns for html and md
Browse files Browse the repository at this point in the history
  • Loading branch information
angelina-momin committed Sep 13, 2024
1 parent e9a8f34 commit 354ad6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 3 additions & 4 deletions R/utils_render_register_general.r
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,11 @@ generate_table_details <- function(table_key, table, filter, is_reg_table = TRUE
#' @param register_table The register table that needs to be rendered into different files.
#' @param table_details A list of details related to the table (e.g., output directory, metadata).
#' @param filter A string specifying the filter applied to the register data.
#' @param output_type Defaults to "other". A string specifying the desired output format "json" for JSON,
#' "csv" for CSVs and "other" for all other output types.
#' @param output_type A string specifying the desired output format "json" for JSON,
#' "csv" for CSVs, "md" for MD and "html" for HTMLs.
#'
#' @return None. The function generates a file in the specified format.
render_register <- function(register_table, table_details, filter, output_type="other"){

render_register <- function(register_table, table_details, filter, output_type){
register_table <- filter_and_drop_register_columns(register_table, filter, output_type)

switch(output_type,
Expand Down
3 changes: 2 additions & 1 deletion inst/extdata/config.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ CONFIG$MD_TABLE_COLUMN_WIDTHS <- list(

# These are the columns to keep in the register table
CONFIG$REGISTER_COLUMNS <- list(
other = c("Certificate", "Paper Title", "Type", "Venue", "Issue", "Report", "Check date"),
html = c("Certificate", "Paper Title", "Type", "Venue", "Issue", "Report", "Check date"),
md = c("Certificate", "Paper Title", "Type", "Venue", "Issue", "Report", "Check date"),
csv = c("Certificate", "Repository", "Type", "Venue", "Issue", "Report", "Check date"),
json = c("Certificate", "Repository", "Type", "Venue", "Issue", "Report", "Check date")
)
Expand Down

0 comments on commit 354ad6e

Please sign in to comment.