Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to not generate an HTML/Markdown output #8

Open
klmr opened this issue Sep 9, 2016 · 3 comments
Open

Option to not generate an HTML/Markdown output #8

klmr opened this issue Sep 9, 2016 · 3 comments

Comments

@klmr
Copy link
Collaborator

klmr commented Sep 9, 2016

In my opinion, ezknitr does a bit too much:

At the moment, ezknitr always generates HTML output via markdown::markdownToHTML. I’d argue that this shouldn’t happen by default (it’s fundamentally a separate concern from knitting a file). However, such a change would break backwards compatibility.

At the very least it should be optional though, because the user (= yours truly) may want to have more control over how the HTML is generated (or, indeed, not generate any HTML output at all). The only recourse at the moment is to delete the generated HTML and re-generate it differently, a wasteful process.

The same, to a lesser extent, is true for the generation of an .md file (when the user calls ezspin).

@daattali
Copy link
Collaborator

Just to make sure we're on the same page: the keep_html argument is not what you want? What do you mean by generating it differently?

I do see your point that it shouldn't generate the HTML by default. I'd be happy to accept a PR that only generates the HTML if the keep_html param is TRUE, instead of always generating it and then deleting it

@klmr
Copy link
Collaborator Author

klmr commented Sep 10, 2016

Yeah, you’re right of course: keep_* is perfectly sufficient as an API, the implementation should just be changed to only generate the files as needed.

What do you mean by generating it differently?

Well rmarkdown::render for instance accepts different parameters. What’s more, we might not want to generate an HTML file at all, but instead a PDF (or stop at Markdown). And finally, there are different flavours of Markdown such as Scholarly Markdown, which require a different processor.

I’ll see if I can get a PR together but I’m unfortunately a bit busy at the moment. :-/

@daattali
Copy link
Collaborator

Got it. I'm away without a computer until the 19th and have a few pressing contracts to work on when back so I also won't do much other than accept PRs :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants