Skip to content

Commit 6be1bcb

Browse files
author
Dominique Quatravaux
committed
[feature] Parse moar
1 parent 19c6d1a commit 6be1bcb

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

confluence.R

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ summary <- entities %>%
3434
arrange(n)
3535

3636
confluence_id <- function (node_or_nodeset) {
37-
xml_find_first(node_or_nodeset, 'id[@name="id"]') %>%
37+
xml_find_first(node_or_nodeset, 'id') %>%
3838
xml_text
3939
}
4040

@@ -159,3 +159,18 @@ stopifnot(bodies %>%
159159
filter(! is.na(content.CustomContentEntityObject)) %>%
160160
filter(type != "CustomContentEntityObject") %>%
161161
nrow == 0)
162+
163+
user2content <- {
164+
ns <- entities_xml %>%
165+
xml_find_all('//object[@class="User2ContentRelationEntity"]')
166+
tibble(u2c_id = ns %>% confluence_id) %>%
167+
mutate(ns %>% props_tibble) %>%
168+
mutate(ns %>% classful_props_tibble)
169+
}
170+
171+
users <- {
172+
ns <- entities_xml %>%
173+
xml_find_all('//object[@class="ConfluenceUserImpl"]')
174+
tibble(user_key = ns %>% confluence_id) %>%
175+
mutate(ns %>% props_tibble)
176+
}

0 commit comments

Comments
 (0)