conflr
conflr copied to clipboard
post to confluence from html
Is there a sub-function somewhere that will post an html I've already rendered from Rmd to confluence? Sometimes I have Rmds that take a while to compile and I don't want to spend time re-rendering if avoidable...
thank you this package is awesome!!
Hi, thanks for using conflr! I think you can convert the HTML to a Markdown file first by pandoc, and then you can add the YAML front-matter and rename it to .Rmd
.
https://rmarkdown.rstudio.com/docs/reference/pandoc_convert.html
Hmm I must be doing that wrong -- I tried
rmarkdown::pandoc_convert("/path/to/test.html",
output = "/path/to/test.md")
# Rename test.md to test2.Rmd
conflr::confl_create_post_from_Rmd("/path/to/test2.Rmd",
interactive = FALSE,
title = "Test",
space_key = "SPACE",
parent_id = 63322513,
toc = TRUE,
toc_depth = 7,
code_folding = "hide",
update = TRUE,
minor_edit = TRUE)
And get the error:
Checking the existing images...
Uploading the images...
Error in httr::upload_file(path) : file.exists(path) is not TRUE
I also tried pasting the Yaml info at the top of test2.Rmd but got the same error. Doing conflr::confl_create_post_from_Rmd("/path/to/test.Rmd", ...)
works fine...
Sorry, I forgot to comment. It seems the image path needs some tweak to let conflr to find the actual file.
Anyway, I decided to close this issue as supporting the already rendered HTML is out of scope of conflr... Sorry!