Skip to content

Commit

Permalink
i #284 Edit exec/mailinglist.R parse to take file as arg
Browse files Browse the repository at this point in the history
- Takes file path for mbox file to parse
- No longer need to pass project_conf

Signed-off-by: Dao McGill <[email protected]>
  • Loading branch information
daomcgill committed Dec 9, 2024
1 parent 1cf86e5 commit f3048a9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions exec/mailinglist.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require(data.table, quietly = TRUE)
doc <- "
USAGE:
mailinglist.R parse help
mailinglist.R parse <tools.yml> <project_conf.yml> <project_key> <save_file_name_path>
mailinglist.R parse <tools.yml> <mbox_file_path> <save_file_name_path>
mailinglist.R refresh modmbox help
mailinglist.R refresh modmbox <project_conf.yml> <project_key> <start_year_month>
mailinglist.R refresh pipermail help
Expand All @@ -40,16 +40,13 @@ if (arguments[["parse"]] & arguments[["help"]]) {
} else if (arguments[["parse"]]) {

tools_path <- arguments[["<tools.yml>"]]
conf_path <- arguments[["<project_conf.yml>"]]
project_key <- arguments[["<project_key>"]]
mbox_file_path <- arguments[["<mbox_file_path>"]]
save_path <- arguments[["<save_file_name_path>"]]

tools <- yaml::read_yaml(tools_path)
conf <- yaml::read_yaml(conf_path)

perceval_path <- get_tool_project("perceval", tools)
mbox_file_path <- get_mbox_input_file(conf, project_key)

cli::cli_alert_info(paste0("Parsing mbox file: ", mbox_file_path))
parsed_mbox <- parse_mbox(
perceval_path = perceval_path,
mbox_file_path = mbox_file_path
Expand Down

0 comments on commit f3048a9

Please sign in to comment.