jhudsl / ottrpal

Tools for converting OTTR courses into Leanpub or Coursera courses :otter:
https://jhudatascience.org/ottrpal/
GNU General Public License v3.0
3 stars 1 forks source link

`gs_png_download()`: Double backslash #120

Closed howardbaik closed 1 year ago

howardbaik commented 1 year ago

When gs_png_download() is run inside include_slide() with the default output_dir = knitr::opts_chunk$get("fig.path"), I see that outfile will have double blackslashes: figure//XX.png.

See this line that constructs file path: https://github.com/jhudsl/ottrpal/blob/main/R/gs_png.R#L85

Was this by design to accomodate Windows file paths? Or can we get rid of the extra backslash?

@muschellij2 @cansavvy

muschellij2 commented 1 year ago

I think it depends if fig.path has ending /, but // shouldn’t cause any issues in R (\ can), but remove them if causes issues.

On Mon, Sep 25, 2023 at 7:52 PM Howard Baek @.***> wrote:

When gs_png_download() is run inside include_slide() with the default output_dir = knitr::opts_chunk$get("fig.path"), I see that outfile will have double blackslashes: figure//XX.png.

See this line that constructs file path: https://github.com/jhudsl/ottrpal/blob/main/R/gs_png.R#L85

Was this by design to accomodate Windows file paths? Or can we get rid of the extra backslash?

@muschellij2 https://github.com/muschellij2 @cansavvy https://github.com/cansavvy

— Reply to this email directly, view it on GitHub https://github.com/jhudsl/ottrpal/issues/120, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIGPLWG7MCRCIWWBWJJPE3X4IKMZANCNFSM6AAAAAA5G26TDM . You are receiving this because you were mentioned.Message ID: @.***>

howardbaik commented 1 year ago

Okay, thanks @muschellij2