Skip to content

Commit

Permalink
i #284 Update Mailing List Exec to use "refresh"
Browse files Browse the repository at this point in the history
Signed-off-by: Dao McGill <[email protected]>
  • Loading branch information
daomcgill committed Dec 6, 2024
1 parent dceded0 commit 5515d7c
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions exec/mailinglist.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ doc <- "
USAGE:
mailinglist.R parse help
mailinglist.R parse <tools.yml> <project_conf.yml> <project_key> <save_file_name_path>
mailinglist.R download modmbox help
mailinglist.R download modmbox <project_conf.yml> <project_key> <start_year_month>
mailinglist.R download pipermail help
mailinglist.R download pipermail <project_conf.yml> <project_key> <start_year_month> <end_year_month>
mailinglist.R refresh modmbox help
mailinglist.R refresh modmbox <project_conf.yml> <project_key> <start_year_month>
mailinglist.R refresh pipermail help
mailinglist.R refresh pipermail <project_conf.yml> <project_key> <start_year_month> <end_year_month>
mailinglist.R (-h | --help)
mailinglist.R --version
Expand Down Expand Up @@ -58,10 +58,10 @@ if (arguments[["parse"]] & arguments[["help"]]) {
data.table::fwrite(parsed_mbox, save_path)
cli::cli_alert_success(paste0("Parsed mbox file was saved at: ", save_path))

} else if (arguments[["download"]] & arguments[["modmbox"]] & arguments[["help"]]) {
cli::cli_alert_info("Downloads mailing list archives from mod_mbox using download_mod_mbox().")
} else if (arguments[["refresh"]] & arguments[["modmbox"]] & arguments[["help"]]) {
cli::cli_alert_info("Refreshes mailing list archives from mod_mbox using refresh_mod_mbox().")

} else if (arguments[["download"]] & arguments[["modmbox"]]) {
} else if (arguments[["refresh"]] & arguments[["modmbox"]]) {

conf_path <- arguments[["<project_conf.yml>"]]
project_key <- arguments[["<project_key>"]]
Expand All @@ -78,11 +78,11 @@ if (arguments[["parse"]] & arguments[["help"]]) {
verbose = TRUE
)

cli::cli_alert_success(paste0("Downloaded mailing list archives were saved at: ", save_folder_path))
cli::cli_alert_success(paste0("Refreshed mailing list archives were saved at: ", save_folder_path))

} else if (arguments[["download"]] & arguments[["pipermail"]] & arguments[["help"]]) {
cli::cli_alert_info("Downloads mailing list archives from pipermail using download_pipermail().")
} else if (arguments[["download"]] & arguments[["pipermail"]]) {
} else if (arguments[["refresh"]] & arguments[["pipermail"]] & arguments[["help"]]) {
cli::cli_alert_info("Refreshes mailing list archives from pipermail using refresh_pipermail().")
} else if (arguments[["refresh"]] & arguments[["pipermail"]]) {

conf_path <- arguments[["<project_conf.yml>"]]
project_key <- arguments[["<project_key>"]]
Expand All @@ -99,7 +99,7 @@ if (arguments[["parse"]] & arguments[["help"]]) {
verbose = TRUE
)

cli::cli_alert_success(paste0("Downloaded mailing list archives were saved at: ", save_folder_path))
cli::cli_alert_success(paste0("Refreshed mailing list archives were saved at: ", save_folder_path))

} else if (arguments[["-h"]] || arguments[["--help"]]) {
cli::cli_alert_info(doc)
Expand Down

0 comments on commit 5515d7c

Please sign in to comment.