Skip to content

Commit

Permalink
update dir and html link for entries not in a subcategory
Browse files Browse the repository at this point in the history
  • Loading branch information
angelina-momin committed May 29, 2024
1 parent 8415ced commit e652a2c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion R/register.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
CONFIG <- new.env()
# Registers can be further divided into filter subgroups
# For cases where an entry does not fall into any subgroup, it's rendered files
# are stored in a folder with its own name
CONFIG$FILTER_SUB_GROUPS <- list(
venues = list("community", "journal", "conference", "codecheck nl")
venues = list("community", "journal", "conference")
)
CONFIG$MD_COLUMNS_WIDTHS <- "|:-------|:--------------------------------|:------------------|:---|:--------------------------|:----------|"
CONFIG$REGISTER_COLUMNS <- list("Certificate", "Repository", "Type", "Issue", "Report", "Check date")
Expand Down
2 changes: 1 addition & 1 deletion R/utils_create_filtered_register_csvs.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ get_output_dir <- function(filter, column_value) {
venue_category <- determine_venue_category(column_value)
# In case the venue_category itself has no further subgroups we do not need subgroups
if (is.null(venue_category)){
return(paste0("docs/", filter, "/", gsub(" ", "_", venue_category), "/"))
return(paste0("docs/", filter, "/", gsub(" ", "_", column_value), "/"))
}

# Removing the venue category to obtain the venue name and replace the brackets
Expand Down
2 changes: 1 addition & 1 deletion R/utils_render_reigster_html.r
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ generate_href <- function(filter, register_table_name, href_type) {

# In the case where the venue_category is NULL we do not need a venue category subfolder
if (is.null(venue_category)){
return(paste0(href_details$base_url, filter, "/", register_table_name, "/register", href_details$ext))
return(paste0(href_details$base_url, filter, "/", gsub(" ", "_", register_table_name), "/register", href_details$ext))
}

venue_name <- trimws(gsub("[()]", "", gsub(venue_category, "", register_table_name)))
Expand Down

0 comments on commit e652a2c

Please sign in to comment.