datalorax / slidex

Convert PowerPoint Slides to xaringan (remark.js) Slides
Other
290 stars 39 forks source link

Readme example no longer works? #26

Closed rmcd1024 closed 4 years ago

rmcd1024 commented 4 years ago

Hello. I think the changes to unnest have broken slidex, so it doesn't work anymore for xaringan. If I understand the error correctly, unnest (in the body_text function) fails and then xml_find_all fails because it can't handle a list column? I looked into this but I'm having trouble understanding the data structure for text$text so I'm not sure how to modify unnest

> library(slidex)
> pptx <- system.file("examples", "slidedemo.pptx", package = "slidex")
> 
> convert_pptx(path = pptx, author = "Daniel Anderson")
Error in UseMethod("xml_find_all") : 
  no applicable method for 'xml_find_all' applied to an object of class "list"
In addition: Warning message:
`cols` is now required when using unnest().
Please use `cols = c()` 
datalorax commented 4 years ago

Thanks, I appreciate the report. I'll give it a try later today and see if I can track down the error.

rmcd1024 commented 4 years ago

unnest(cols=text) gets rid of the unnest warning. This was a warning, not an error, so it didn't affect the conversion. My guess about the source of the error was wrong.

The error occurs on line 235 of utils.R with the call to xml_find_all. My XML skills are poor so I don't know what's going on or why this problem is occurring now and not previously.

datalorax commented 4 years ago

Thanks Robert. Are you using office 365? If so, could you try installing that branch with remotes::install_github("datalorax/slidex@office365-changes")?

rmcd1024 commented 4 years ago

I do have access to Office 365 but I'm 99% Linux, which is a major reason that I'm so interested in this. Can I help with something?

I did install office365-changes and noted that your sample document now successfully converts to Xaringan again.

datalorax commented 4 years ago

Great. I probably just need to merge that branch in then. This project has honestly sort of just fallen by the wayside. It has always been a side project and has has mostly given way to other competing priorities (mostly equatiomatic, as of late).

Are you able to get other PPTX files to convert with that branch?

rmcd1024 commented 4 years ago

I successfully tested with a real-life pptx that I had re-saved using powerpoint 365.

Thank so much. I understand that you're focusing elsewhere. My colleagues and I frequently observe that "No good deed goes unpunished." :-)

datalorax commented 4 years ago

Great! Thanks so much. I will go ahead and merge the 365 branch. Thanks again for the report and for being patient with me!