datalorax / slidex

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

Specify save location #10

Closed pkq closed 6 years ago

pkq commented 6 years ago

I don't know the first thing about how to implement it, but it would be really handy to be able to specify a location other than the current working directory to save the generated Rmd file. 😄

datalorax commented 6 years ago

Thanks Patrick! That’s probably pretty easily implementable. And thanks for posting those issues! There was only one I knew about. I’ll try to take a look tomorrow or the next day.

pkq commented 6 years ago

Yeah, I imagine there are quite a few examples of how to do that floating around. It's certainly common enough. Sounds good. Let me know if you have any questions.

datalorax commented 6 years ago

So thinking about this more I just wanted to clarify... were you thinking having the RMD save in a location other than the current wd? Or the html after rendering the RMD? The former is easy while the latter I don't really have much control over.

Also related - what do you think about creating a new folder (in the current wd or otherwise) to put the RMD and assets folder in? might be nice in terms of keeping things contained.

pkq commented 6 years ago

I was thinking the former: allow the user to specify where the generated Rmd gets saved.

Yeah, I think containing everything in a folder is a good idea. You could probably use the same base name as the presentation? In which case, this proposed argument for where to save things could be described as the location to save the folder containing generated Rmd, assets, notes file, etc.

datalorax commented 6 years ago

Yup, I like it. I'll implement those changes. Thanks again for your feedback! Really helpful.

datalorax commented 6 years ago

Got this implemented now too. I still need to make a few more revisions to get this to be perfect - namely having all of the conversion stuff happen in a temporary directory - but it should be basically good to go. If you get the chance to try it out and it's not working for you, would love to hear.

pkq commented 6 years ago

Awesome, thanks! I loathe setwd() so this is really handy, especially when the presentation belongs inside an RStudio project. Seems to work great!