|
|
@@ -205,6 +205,14 @@ parse_speakerlist <- function(speakerliste_xml) { |
|
|
rolle_lang = d["rolle_lang",]) |
|
|
rolle_lang = d["rolle_lang",]) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#' Write the parsed and repaired results into a csv file to make loading and developing faster and easier |
|
|
|
|
|
#' |
|
|
|
|
|
#' @param tables tibble list |
|
|
|
|
|
#' @param path char |
|
|
|
|
|
#' @param create bool |
|
|
|
|
|
#' |
|
|
|
|
|
#' if create is set to TRUE, the directory given in path is created |
|
|
|
|
|
#' |
|
|
#' @export |
|
|
#' @export |
|
|
write_to_csv <- function(tables, path="csv/", create=F) { |
|
|
write_to_csv <- function(tables, path="csv/", create=F) { |
|
|
check_directory(path, create) |
|
|
check_directory(path, create) |
|
|
@@ -215,6 +223,12 @@ write_to_csv <- function(tables, path="csv/", create=F) { |
|
|
write.table(tables$applause, str_c(path, "applause.csv")) |
|
|
write.table(tables$applause, str_c(path, "applause.csv")) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#' Read the needed tables for developing from a csv file. |
|
|
|
|
|
#' |
|
|
|
|
|
#' @param path char |
|
|
|
|
|
#' |
|
|
|
|
|
#' Reading the tables from a csv is way faster than reading and repairing the data every single time |
|
|
|
|
|
#' |
|
|
#' @export |
|
|
#' @export |
|
|
read_from_csv <- function(path="csv/") { |
|
|
read_from_csv <- function(path="csv/") { |
|
|
list(speaker = read.table(str_c(path, "speaker.csv")) %>% |
|
|
list(speaker = read.table(str_c(path, "speaker.csv")) %>% |
|
|
|