File tree Expand file tree Collapse file tree 3 files changed +38
-2
lines changed
Expand file tree Collapse file tree 3 files changed +38
-2
lines changed Original file line number Diff line number Diff line change 1+ get_conferences <- function (my_xml ) {
2+
3+ all_conf <- xml2 :: xml_find_all(my_xml , " .//APRESENTACAO-DE-TRABALHO" )
4+
5+ if (length(all_conf ) != 0 ) {
6+
7+ df_conf <- tibble :: tibble()
8+
9+ for (i_node in all_conf ) {
10+ conf_dados_basicos <- fetch_df(i_node , " .//DADOS-BASICOS-DA-APRESENTACAO-DE-TRABALHO" )
11+
12+ conf_detalhes <- fetch_df(i_node , " .//DETALHAMENTO-DA-APRESENTACAO-DE-TRABALHO" )
13+
14+ df_conf <- dplyr :: bind_rows(
15+ df_conf ,
16+ dplyr :: bind_cols(
17+ conf_dados_basicos ,
18+ conf_detalhes
19+ )
20+ )
21+ }
22+
23+ } else {
24+ df_conf <- tibble :: tibble()
25+ }
26+
27+ return (df_conf )
28+ }
Original file line number Diff line number Diff line change @@ -62,6 +62,13 @@ gld_read_zip2 <- function(f_zip){
6262 " got {nrow(accepted_papers)} accepted papers"
6363 )
6464
65+ # conference papers
66+ conferences <- get_conferences(my_xml )
67+
68+ cli :: cli_alert_success(
69+ " got {nrow(conferences)} conferences"
70+ )
71+
6572 # books ----
6673 books <- get_books(my_xml )
6774
@@ -111,7 +118,8 @@ gld_read_zip2 <- function(f_zip){
111118 supervisions = superv_all ,
112119 at_prof = at_prof ,
113120 projects = projs ,
114- coauthors = coauthors
121+ coauthors = coauthors ,
122+ conferences = conferences
115123 )
116124
117125 # parse and fix list output
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ f <- "~/Desktop/6915544029415506.zip"
1919l_out <- gld_read_zip2(f )
2020
2121# # -----------------------------------------------------------------------------
22- dplyr :: glimpse(l_out )
22+ dplyr :: glimpse(l_out $ conferences )
2323
2424# # -----------------------------------------------------------------------------
2525tpesq <- l.out $ tpesq
You can’t perform that action at this time.
0 commit comments